Powered By Blogger

Friday, May 22, 2009

File transfer using dbms_file_transfer between servers

Steps:
create directory a as 'D:\backup_log\'
CREATE DATABASE LINK "EDU.REGRESS.RDBMS.DEV.US.ORACLE.COM"
CONNECT TO NV
IDENTIFIED BY *******
USING 'EDD';
grant read,write on directory a to nv1
exec dbms_file_transfer.GET_FILE('t1','test.txt','edu','a','test.txt');

>> t1 is the directory created on the source machine.
>> test.txt is the file placed in the source directory location.
>> edu is the database link created between the source and destination database servers.
>> 'a' is the directory object created on the destination database server as shown above.
>> test.txt is the file that is to be copied to the destination server.

2 comments: