Results 1 to 5 of 5
  1. #1
    Join Date
    Dec 2002
    Location
    Washington D.C.
    Posts
    164

    Unanswered: Copying/Transferring Tables

    Is there a way to copy all tables (not the data, just the structure) and their relationship diagrams from one SQL server db to another?

    What is the easiest way?


    Thanks

  2. #2
    Join Date
    May 2002
    Location
    Timbaktu
    Posts
    185
    Right click on the Database,Generate Sql Script and set the condition on all the tabs.In order to transfer the permissions,roles,relationship you need to go under option in the same wizard.

  3. #3
    Join Date
    Feb 2002
    Location
    Houston, TX
    Posts
    809
    IMHO DTS is the best choice here as it will take care of all dependent objects and constraints. In this case you would elect NOT to transfer the data or probably user id and permissions. The only problem with this is it will not transfer the relationship diagram.
    Paul Young
    (Knowledge is power! Get some!)

  4. #4
    Join Date
    Dec 2002
    Location
    Washington D.C.
    Posts
    164
    I just want to transfer Tables and diagrams. I don't want other objects.
    I know I can use a wizard to transfer the tables but it doesn't have an option to transfer the diagrams.


    Originally posted by sqlserver2k
    Right click on the Database,Generate Sql Script and set the condition on all the tabs.In order to transfer the permissions,roles,relationship you need to go under option in the same wizard.

  5. #5
    Join Date
    Feb 2002
    Location
    Houston, TX
    Posts
    809
    I am not aware of any tool or wizard that will transfer a relationship diagram, however the data is contained in a table called dtProperties and you could use the following to transfer a diagram:


    Code:
    set identity_insert dtproperties on
    INSERT INTO <target db>.dbo.dtproperties(id, objectid, property, value, uvalue, lvalue, version)
    select * from <source db>.dbo.dtproperties
    set identity_insert dtproperties off
    Paul Young
    (Knowledge is power! Get some!)

Posting Permissions

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