Solved

Copy all table designes from on Server to another

Posted on 2009-05-14
7
217 Views
Last Modified: 2012-05-07
I want to copy all my table definitions for all my tables from one SQL Server 2005 to another SQL Server 2005.  I don't want the data copied.  How would I do this?

I can generate script for each table, copy it, and paste it into the new server's script window using the Server Management Studio.  There must be a better way?
0
Comment
Question by:schmir1
7 Comments
 
LVL 75

Expert Comment

by:Aneesh Retnakaran
ID: 24390215
You can generate entire table script and paste it on the other server's management studio
0
 
LVL 60

Accepted Solution

by:
chapmandew earned 300 total points
ID: 24390293
open management studio, go to object explorer and navigate to the tables folder.  highlight all of the tables, right click and select script As...from there you can script to a file, new window, clipboard, etc.
0
 
LVL 75

Assisted Solution

by:Anthony Perkins
Anthony Perkins earned 100 total points
ID: 24391941
>>There must be a better way?<<
Yes, see here:
SQL Compare®
http://www.red-gate.com/products/SQL_Compare/index.htm
0
Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

 
LVL 14

Assisted Solution

by:Jagdish Devaku
Jagdish Devaku earned 100 total points
ID: 24392412
generating the scripts will sometimes give an error while creating them back... like while adding foreign key relationships...
you can do onething ie. generate the scripts. seperate add foreign key relationship queries from the scripts...  and run the scripts seperately or if you want to execute everything in one click then add the foreign key relationship scripts below the create tables script.
or
we have third party tools which do this...
like red-gate (link given in the above post) & sql delta 4 (http://www.sqldelta.com/)
all the best... bye
 
0
 

Author Comment

by:schmir1
ID: 24484168
I got help from the server guy and he used SSIS.
0
 

Author Comment

by:schmir1
ID: 24484257
chapmandew:
  I tried this for future reference and it works great.  I had previously tried it using the Management Studio Object Explorer List (not the Object Explorer Details)  The list doesn't work but the Details does.  So now I know what good is the Details window.  Thanks a lot.
0
 

Author Closing Comment

by:schmir1
ID: 31581721
Thanks for your help.
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

by Mark Wills PIVOT is a great facility and solves many an EAV (Entity - Attribute - Value) type transformation where we need the information held as data within a column to become columns in their own right. Now, in some cases that is relatively…
In SQL Server, when rows are selected from a table, does it retrieve data in the order in which it is inserted?  Many believe this is the case. Let us try to examine for ourselves with an example. To get started, use the following script, wh…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

822 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question