This forum is currently locked. You can't register or post questions at this time. (read more)

how to generate a script for table insertion in the correct

All posts relating to Oracle database administration.

Moderator: Tim...

kytemaniac
Senior Member
Posts: 234
Joined: Tue May 19, 2009 12:59 am

how to generate a script for table insertion in the correct

Postby kytemaniac » Mon Feb 18, 2013 2:51 am

Hi,

how should I generate a script for table insertion in the correct order.

let's say there's table A, B, C all with parent child relationship as follows C is the parent of B and B is the parent of A.

understand that there's a table called dba_dependencies but I still could not figure out how to make use of this data dictionary to generate the insert tables in the correct order.

thanks a lot!

Tim...
Site Admin
Posts: 18437
Joined: Mon Nov 01, 2004 5:56 pm
Location: England, UK
Contact:

Re: how to generate a script for table insertion in the corr

Postby Tim... » Mon Feb 18, 2013 4:01 pm

Hi.

I think the best route through this is to use the DBA_CONSTRAINTS view to link the tables together in a free walk. Just be careful as circular references can break things. :)

Cheers

Tim...
Tim...
Oracle ACE Director
Oracle ACE of the Year 2006 - Oracle Magazine Editors Choice Awards
OakTable Member
OCP DBA 7.3, 8, 8i, 9i, 10g, 11g
OCP Advanced PL/SQL Developer
Oracle Database: SQL Certified Expert
My website: http://www.oracle-base.com
My blog: http://www.oracle-base.com/blog


Return to “Oracle Database Administration”

Who is online

Users browsing this forum: No registered users and 0 guests

cron