copy from one database to another using oracle sql developer - connection failed -
i trying copy table 1 database using oracle sql developer. have username, password , sids.
copy uname1/password1@sid1 uname2/pwd2@sid2 insert table1 (*) using (select * message_table);
however getting connection failed
error.
the 2 databases present in different host hosts (the hostname different in connection properties).
the table has 5 million records , cumbersome export/import
the copy
command sql*plus command (not sql developer command). if have tnsname entries setup sid1 , sid2 (e.g. try tnsping), should able execute command.
another assumption table1 has same columns message_table (and columns have following data types: char, date, long, number or varchar2). also, insert command, need concerned primary keys (e.g. not inserting duplicate records).
i tried variation of command follows in sql*plus (with no errors):
copy scott/tiger@db1 scott/tiger@db2 create new_emp using select * emp;
after executed above statement, truncate new_emp table , executed command:
copy scott/tiger@db1 scott/tiger@db2 insert new_emp using select * emp;
with sql developer, following perform similar approach copying objects:
on tool bar, select tools>database copy.
identify source , destination connections copy options like.
for object type, select table(s).
- specify specific table(s) (e.g. table1).
the copy command approach old , features not being updated release of new data types. there number of more current approaches oracle's data pump (even tables).
Comments
Post a Comment