Home » Archive

Articles tagged with: oracle database cloning

ORA-HOWTO, Oracle, Tips Scripts »

[23 Nov 2009 | No Comment | 448 views]

There are lot of ways in which files are copied from one database to the other during database cloning or transporting tablespaces.
File transfers can be done using oracle package called “DBMS_FILE_TRANSFER”.
Let us assume we need to transfer a file x.dbf from database SOURCE_DB to database DEST_DB
Do the following :
AT SOURCE_DB:
==============
1)Create directory source_dir as ‘/u01/dbdata’;
2)Create database link remote_db
connect to system identified by manager
using ‘remmote_db’;
Make sure to add this entry in TNSNAMES.ORA file.
Check if the database link works by
select count(1) from dba_tables@remote_db;
AT DEST_DB:
============
create directory dest_dir as ‘/u02/dbdata’;
Now back to SOURCE_DB:
exec dbms_file_transfer.put_file(‘SOURCE_DIR’,’x.dbf’,’DEST_DIR’,’x.dbf’,’REMOTE_DB’);
Now the …