Copy File from Filesystem to ASM

In this exercise we will copy a file residing on a filesystem onto ASM disk.

[sourcecode language=”sql”]

SQL> create or replace directory asm_dir as ‘+FRA/BACKUP’;

Directory created.

SQL> grant read, write on directory asm_dir to public;

Grant succeeded.

SQL> create or replace directory export_dump as ‘/filesystem/exportdump’;

Directory created.

SQL> grant read,write on directory export_dump to public;

Grant succeeded.

[/sourcecode]

— Copy file from Filesystem into ASM —

[sourcecode language=”sql”]

SQL> exec dbms_file_transfer.COPY_FILE(‘export_dump’,’backup_dump.dmp’,’asm_dir’,’backup_dump.dmp’);

PL/SQL procedure successfully completed.

[/sourcecode]

Leave a Reply