Solved

Copy all table designes from on Server to another

Posted on 2009-05-14
7
197 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
What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

 
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

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Join & Write a Comment

If you having speed problem in loading SQL Server Management Studio, try to uncheck these options in your internet browser (IE -> Internet Options / Advanced / Security):    . Check for publisher's certificate revocation    . Check for server ce…
In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

708 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now