export with referential integrity intact
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 2 of 2

Thread: export with referential integrity intact

Hybrid View

  1. #1
    Join Date
    May 2001
    Posts
    5

    Question

    Here's a bit of a doozie
    I have written a an sql package to export data from tables owned by a schema entered at run time by the user. The script exports the data to a comma delimeted file this is fine but I have to take referential integrity into consideration and export the data in the order that it needs to be imported back into the database if needed. I know that I need to look at the user_constraints table but does anyone know how I deduce what order I need to export the data, I am only concerned on a table by table situation but I don't know how to see what foreign keys are associated with what tables. Basiccaly the first data written should be the ultimate parent and so on.
    Any sugestions at all would be great.
    Suggs.
    Suggs

  2. #2
    Join Date
    Apr 2001
    Posts
    107
    Hi,

    If you are sure of the validity of your data, you could disable foreign keys before importing, and the enable them...

    Is it of any use ?

    Fabien

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width