curious_nustian
curious_nustian

Reputation: 616

Copy data from one database to another using SQLPLUS/shell

I need to copy data from one of the remote database to data base in my server. But I am getting eroor below.

insert into table_here@oprdb select * from view_on_remote@AISPRD where rownum<10;

                                      *
ERROR at line 1:
ORA-02019: connection description for remote database not found

I also tried connecting to both before query:

conn schema/password@host:port/srvc_name;
conn schema/password@host:port/srvc_name1;

Trying the COPY command failed as well:

Array fetch/bind size is 15. (arraysize is 15)
Will commit when done. (copycommit is 0)
Maximum long size is 80. (long is 80)

CPY-0012: Datatype cannot be copied

But still it says connection description not found.

Can anyone help me where I am getting this wrong.

Upvotes: 0

Views: 1100

Answers (1)

Suresh
Suresh

Reputation: 442

Use COPY command

--connect to target db    
sqlplus schema/password@host:port/oprdb
sqlplus>copy from schema/password@host:port/AISPRD insert table_here using -
select * from view_on_remote where rownum<10;

Upvotes: 2

Related Questions