Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Copy all table designes from on Server to another

Posted on 2009-05-14
7
Medium Priority
?
247 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 1200 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 400 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 does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 14

Assisted Solution

by:Jagdish Devaku
Jagdish Devaku earned 400 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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

There are some very powerful Dynamic Management Views (DMV's) introduced with SQL 2005. The two in particular that we are going to discuss are sys.dm_db_index_usage_stats and sys.dm_db_index_operational_stats.   Recently, I was involved in a di…
by Mark Wills Attending one of Rob Farley's seminars the other day, I heard the phrase "The Accidental DBA" and fell in love with it. It got me thinking about the plight of the newcomer to SQL Server...  So if you are the accidental DBA, or, simp…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…

721 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