I want to pickup file names from a directory that resides on a specific server. I am using below code:
set serveroutput on DECLARE TYPE file_rec IS RECORD (FileName dbms_sql.varchar2_table); frec file_rec; CURSOR fcur IS SELECT fname_krbmsft AS FileName FROM x$krbmsft WHERE fname_krbmsft LIKE '%.%'; dirname VARCHAR2(1024) := '\\x.x.x.x\ack'; ns VARCHAR2(1024); BEGIN dbms_backup_restore.searchfiles(dirname, ns); OPEN fcur; FETCH fcur BULK COLLECT INTO frec; CLOSE fcur; FOR i IN 1 .. frec.FileName.COUNT LOOP dbms_output.put_line(frec.FileName(i)); END LOOP; dbms_output.put_line('SUCCESS'); EXCEPTION WHEN OTHERS THEN dbms_output.put_line('EXCEPTION: '||SQLERRM); END; / On the above script the x.x.x.x is the ip of the server and "ack" is the folder where I want to pickup file names. The problem is that I am not able to pickup these names since x$krbmsft is empty when selected after script exec. Meanwhile if I Replace the server directory with a local directory that resides on my machine (i.e.: C:\test) I am able to pickup file names with this script. I have read access on \x.x.x.x\ack and I am able to enter to this folder from my local PC.
What I am doing wrong?
2Related questions 1 How to recreate an oracle 9i database from backup files (ora files) 1 Oracle 10g Backup & Restore 1 How to backup and restore records in database (Oracle 10) Related questions 1 How to recreate an oracle 9i database from backup files (ora files) 1 Oracle 10g Backup & Restore 1 How to backup and restore records in database (Oracle 10) 0 Oracle Database object File backup 8 How to use Oracle DMP files? 0 Table restoring oracle10g 3 How to restore dump file in Oracle 12c 1 Restore Oracle Database From Oradata Folder 0 how to restore a database backup file using java 1 Can I Restore data from ORACLE datafiles folder? Load 7 more related questions Show fewer related questions
Reset to default