I am dealing with application wherein its partial data is in Oracle12c database and remaining in SQL Server 2012
The end goal is to extracting documents from both databases along with other information which is in Oracle tables.
To make connectivity between Oracle 12c and SQL Server 2012, I've just installed Oracle Gateway.
Now, accessing SQL server tables from Oracle 12 c instance using a database link.
The challenge I am facing is to copy the documents from SQL Server database to Oracle 12c.
In SQL Server Database Documents are in varBinary column which in Oracle side describe as LONG RAW data type,
My concern here is how do I do copy this "Blob" column in Oracle 12c instance.
Currently, Oracle is throwing "ORA-00997: illegal use of LONG datatype"
DocUid is the primary key column, to join with other tables to connect other records with their actual document.
11:37:36 SQL> create table Doc_local_copy
11:37:45 2 as
11:37:45 3 select docref."DocUid",docref."Blob" from DocRefTab@SEQSRV12_dev docref, File_Master fm
11:37:45 4 where docref."DocUid"=fm."DocUid";
select docref."DocUid",docref."Blob" from DocRefTab@SEQSRV12_dev docref, File_Master fm
*
ERROR at line 3:
ORA-00997: illegal use of LONG datatype
11:37:48 SQL> desc DocRefTab@SEQSRV12_dev;
Name
Null? Type
-------------------------------------- ------------
DocUid NOT NULL CHAR(36)
Blob
LONG RAW
On SQL Server side, the table described as
DocRefTab:
---------------- ---------------
DocUid uniqueidentifier
Blob varbinary
I tried creating an Oracle table with Long Raw data type and Insert but couldn't succeed
insert into doc_long_raw
select docref."DocUid",docref."Blob" from DocRefTab@SEQSRV12_dev docref, File_Master fm
where docref."DocUid"=fm."DocUid";
ERROR at line 2: ORA-00997: illegal use of LONG datatype
ERROR at line 2:ORA-00997: illegal use of LONG datatype