Unix Technical Forum

HELP: How to move nested table across database link

This is a discussion on HELP: How to move nested table across database link within the Oracle Database forums, part of the Database Server Software category; --> We are using Oracle 9.2. We have a big table which has a user-defined objects. I need to move ...


Go Back   Unix Technical Forum > Database Server Software > Oracle Database

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-24-2008, 05:32 AM
charlie cs
 
Posts: n/a
Default HELP: How to move nested table across database link

We are using Oracle 9.2.

We have a big table which has a user-defined objects. I need to move it to
another database. "Insert .. select * from.." does not work. What I am
doing now is "Insert .. select non_object column" to move all the
non-user_defined objects. Then I made a big file, containing huge amount of
sql statements, to update the user-defined objects.

The object is like this

SQL> desc Parent_OBJTYPE
Name Null? Type
----------------------------------------- -------- ------------------------
----
Col1 COl1_OBJTYPE
Col2 Col2_OBJTYPE

SQL> desc Col1_OBJTYPE
Name Null? Type
----------------------------------------- -------- -------------------------
-
Col1_1 VARCHAR2(255)
Col1_2 VARCHAR2(30)

SQL> desc Col2_OBJTYPE
Name Null? Type
----------------------------------------- -------- -------------------------
-
Col2_1 VARCHAR2(255)
Col2_2 VARCHAR2(30)

To update the table, I use

update table test
set Parent_Col=Parent_OBJTYPE(Col1_OBJTYPE ('test1','test2'),
Col2_OBJTYPE ('test3','test4'))
where id=1;

There are several millions of records to update.

Is there any other better way of doing this?

Thanks for your help.





Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 01:59 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com