Solved

Transfer 'LONG RAW" data from one database to another

Posted on 2000-04-28
2
688 Views
Last Modified: 2008-03-06
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
Comment
Question by:jiayiloo
2 Comments
 

Accepted Solution

by:
askjervold earned 50 total points
ID: 2758961
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
 

Expert Comment

by:mphilipp
ID: 2761779
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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

Cursors in Oracle: A cursor is used to process individual rows returned by database system for a query. In oracle every SQL statement executed by the oracle server has a private area. This area contains information about the SQL statement and the…
How to Unravel a Tricky Query Introduction If you browse through the Oracle zones or any of the other database-related zones you'll come across some complicated solutions and sometimes you'll just have to wonder how anyone came up with them.  …
This video shows how to recover a database from a user managed backup
This video explains what a user managed backup is and shows how to take one, providing a couple of simple example scripts.

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now