Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to copy a table with LONG and CLOB datatype over a dblink?

Padmocho-OracleJan 18 2007 — edited Jan 18 2007
Hi All,
I need to copy a table from an external database into a local one. Note that this table has both LONG and CLOB datatypes included.

I have taken 2 approaches to do this:

1. Use the CREATE TABLE AS....

SQL> create table XXXX_TEST as select * from XXXX_INDV_DOCS@ext_db;
create table XXXX_TEST as select * from XXXX_INDV_DOCS@ext_db
*
ERROR at line 1:
ORA-00997: illegal use of LONG datatype

2. After reading some threads I tried to use the COPY command:
SQL> COPY FROM xxxx/pass@ext_db TO xxxx/pass@target_db REPLACE XXXX_INDV_DOCS USING SELECT * FROM XXXX_INDV_DOCS;

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




If my understanding is correct the 1st statement fails because there is a LONG datatype in XXXX_INDV_DOCS table and 2nd one fails because there is a CLOB datatype.

Is there a way to copy the entire table (all columns including both LONG and CLOB) over a dblink?

Would greatelly appriciate any workaround or ideas!

Regards,
Pawel.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 15 2007
Added on Jan 18 2007
2 comments
866 views