我正在尝试创建 SQL Developer 目录并使用以下代码在其中创建一个简单的文本文件:
CREATE DIRECTORY ABC AS '/abc';
DECLARE
fileHandler UTL_FILE.FILE_TYPE;
BEGIN
fileHandler := UTL_FILE.FOPEN('ABC', 'test_file.txt', 'W');
UTL_FILE.PUTF(fileHandler, 'Writing to a file\n');
UTL_FILE.FCLOSE(fileHandler);
END;
Run Code Online (Sandbox Code Playgroud)
但最终还是出现了这个错误
29283. 00000 - "invalid file operation"
*Cause: An attempt was made to read from a file or directory that does
not exist, or file or directory access was denied by the
operating system.
*Action: Verify file and directory access privileges on the file system,
and if reading, verify that the file exists.
Run Code Online (Sandbox Code Playgroud)
在 SQL …