使用pl / sql如何打开目录?
答案 0 :(得分:1)
这是only valid for Oracle 10g+ (lots of info in the comment here):
DECLARE
pattern VARCHAR2(1024) := 'C:\temp\*';
ns VARCHAR2(1024);
BEGIN
SYS.DBMS_BACKUP_RESTORE.searchFiles(pattern, ns);
-- List files in the directory
FOR each_file IN (SELECT FNAME_KRBMSFT AS name FROM X$KRBMSFT) LOOP
DBMS_OUTPUT.PUT_LINE(each_file.name);
END LOOP;
END;
/
答案 1 :(得分:0)
请记住,您需要DBA权限才能写入文件系统,或者拥有一个愿意授予您这些权限的DBA(在许多环境中不太可能)。