SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 Script Library
 SQL Schema Foreign key Relationships
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

sanoasis
Starting Member

India
1 Posts

Posted - 10/26/2012 :  07:44:54  Show Profile  Reply with Quote
I have a SQL Server 2008 DB (A)with more than 400 tables where in tables have many constraints(foreign key relationships). I need to transfer a chunk of data from Database (A) to another DB (B) based upon many rules.
In order to append the data from tables in DB (A) to tables in DB (B) the data in the child table needs to be appended and then the data in the parent table needs to be appended.

Is there any tool that would generate the complete relationships of the schema starting from the base child table and cascading along.

Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)

USA
7020 Posts

Posted - 10/26/2012 :  10:26:36  Show Profile  Reply with Quote
This script finds table references and ranks them by level in order to be able to load tables with FK references in the correct order.

Find Table Reference Levels
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=72957




CODO ERGO SUM
Go to Top of Page

chen123
Starting Member

China
6 Posts

Posted - 11/20/2012 :  22:40:33  Show Profile  Reply with Quote
Thank you for this article. That’s all I can say. You most definitely have made this blog into something special. You clearly know what you are doing, you’ve covered so many bases.Thanks!
unspammed

xingchen chen123
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.11 seconds. Powered By: Snitz Forums 2000