• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 738
  • Last Modified:

Transfer 'LONG RAW" data from one database to another

Hi Expert,
I have two database. IE database 1 and database 2. Both have a table that contain a column with "LONG RAW" data type.
I would like to transfer some of this column data from database 1 to database 2.
Pls propose a solution for this.
Thks!
0
jiayiloo
Asked:
jiayiloo
1 Solution
 
askjervoldCommented:
If you do not want all the data transfered you ought to copy the table to a working table:

create table tmp_table as
select * from table;

in database 1,

and then export and import the table to database 2 using exp and imp utilities.

in database 2 use direct load to insert data into the table:

insert into table
select * from tmp_table
where <your clause for selecting data>;

This data is inserted above HWM (High Water mark) so if this is big tables you should give this a thought.

rgds andy
0
 
mphilippCommented:
I don't think this will work, Andy. You can't copy LONG fields like that(ORA-0997 - illegal use of Long datatype). There are two options:

1-export/import. Here you can't make a selection of the records you want to transfer.
2-write the content of the long field to a file and read them with SQL*Loader. I did that once, but was only able to do it because ot was ASCII data in a LONG collumn. I'm not sure if you can do the same thing with a binary values. Maybe you should try something in Visual Basic, for Oracle doesn't leave you with much option for LONG columns.
0

Featured Post

Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now