SQL Schema Foreign key Relationships Diagram

  • 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 to show the way which table needs to be updated first and in which sequence.

  • Check Redgate package tool

    in that "Redgate compare" may help you

  • exec sp_fkeys TableName will list all the relations for a single table, if you want to use that as a basis for a script.

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply