terça-feira, 18 de março de 2014

Oracle - How to copy a table to another server?

You can copy a table to another server/database, in Oracle, using this command:

Sqlplus:
 SQL> COPY FROM username1/password1@tnsname1 
           TO username2/password2@tnsname2
      INSERT table_name (*) USING (SELECT * FROM table_name); 


Other way is using dump file in Unix:

Export:
 exp username/password@tnsname FILE=filename.dmp \
    TABLES=owner.table_name COMPRESS=y  


Import:
 impdp username/password dumpfile=filename.dmp 

Nenhum comentário:

Postar um comentário