Solved

Copy all table designes from on Server to another

Posted on 2009-05-14
7
240 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 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
Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

 
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

Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

Question has a verified solution.

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

In this article I will describe the Copy Database Wizard method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

617 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