As the error message says, the service name could not be resolved. This means that the tnsnames.ora entry for one or both of the instances is not present or is incorrect. Correct your tnsnames.ora file and try again. To determin which one it is try to connect to both from SQL*Plus. Whichever you can't connect to is the problem.
I should add. that in this case oracle uses tnsnames.ora on your DB server, not the one that you have on your workstation.
So, make sure you have correct entries in tnsnames.ora on your db server.
When you use SQL* COPY you must be connected to one of the databases involved, it does not matter which one but you MUST be connected to the source or target.
Sorry kavithared;
I was looking at your syntax and it appeared that you were not connected to one of the DB's. I am pretty sure your syntax is incorrect, unfortunately I am not in the office and do not have access to my files.
I know that there is a copy of a COPY.DOC out there somewhere, I posted it several times on this website.
Originally posted by Mr.Hanky When you use SQL* COPY you must be connected to one of the databases involved, it does not matter which one but you MUST be connected to the source or target.
Check you db_links too.
MH
not true, you can connect from any database to perform COPY, however if you dont wanna generate twice network traffic you should do it from one of the two database you are moving the data
For example I have 3 instances running, dev817, rep817 and dev920
Code:
I am connected to dev920 and goingto move data between dev817 and rep817 (tried from 9.2.0 to 8.1.7 but got ORA-00904: invalid column name, guess bug?)
SQL> select instance_name from v$instance;
INSTANCE_NAME
----------------
dev920
set copycommit 2
set arraysize 1000
SQL> copy from lsc/lsc@dev817 to lsc/lsc@rep817 create dept using select * from dept
Array fetch/bind size is 1000. (arraysize is 1000)
Will commit after every 2 array binds. (copycommit is 2)
Maximum long size is 80. (long is 80)
SQLRCN in cpytbl failed: -1075
Table DEPT created.
5 rows selected from lsc@dev817.
5 rows inserted into DEPT.
5 rows committed into DEPT at lsc@rep817.
the data first travel from dev817 to dev920, i.e my session then from my session I send the data to rep817
well his problem is he has not configured tnsnames.ora nothing more
SGH node tnsnames.ora must have entries of SGH
if you look my previous post:
the data first travel from dev817 to dev920, i.e my session then from my session I send the data to rep817
that means dev920 must be able to connect to dev817 and rep817
if he logon to a rep817 session then rep817 must be able to see dev817 and so on
For better performance you should issue copy from one of two nodes locally not from any remote sqlplus session or the network traffic will be generate twice
Bookmarks