Groups | Blog | Home
all groups > sql server new users > october 2006 >

sql server new users : Copy Table


Kevin3NF
10/26/2006 12:00:00 AM
You can use DTS to move the table and its data.

If you are not familiar with DTS, and just want the table definition,
right-click the table in Enterprise manager, select all tasks, generate sql
script. Look through the options so you can also get the indexes and
constraints as well as the table def itself.

Once you have the script, Select the Dev server and open a Query Analyzer
connection (Tools>>Query Analyzer). Open the .sql file created in the first
step and execute it.

Make sure you are connected to the correct servers when you do these steps.



--
Kevin Hill
3NF Consulting
www.3nf-inc.com
http://kevin3nf.blogspot.com


[quoted text, click to view]

Striker
10/26/2006 4:35:58 AM
This may be a silly question, but I just got SQL 2000 Enterprise Mgr loaded.
I have registered two different servers. Can I copy one table from one
server to the other server? If so how do I do it? I don't care if the data
comes along or not. One of the servers is production, and the other a
development one. So I want to copy a table to development so I can play
with some code that runs against it.

Thanks in Advance.

Striker
10/26/2006 5:27:26 AM
You mentioned MOVE, I only want to copy the table. Sounds like the
"Generate SQL Script" will do that.
[quoted text, click to view]

Kevin3NF
10/26/2006 7:54:07 AM
typo...DTS would not delete the table on the source

--
Kevin Hill
3NF Consulting
http://www.3nf-inc.com/NewsGroups.htm
http://kevin3nf.blogspot.com


[quoted text, click to view]

Arnie Rowland
10/26/2006 11:21:30 AM
In Enterprise manager, Select your Production Database, Click on the Wizards
icon (the magic wand). Select the Import/Export Wizard, then select [DTS
Export].

Walk through the wizard, select the prod server as the source and the dev
server as the destination. You will later be asked to select tables, there
is a checkbox to include the data.

At the end, you can save all of your selections so that you can do this
again.

--
Arnie Rowland, Ph.D.
Westwood Consulting, Inc

Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous

You can't help someone get up a hill without getting a little closer to the
top yourself.
- H. Norman Schwarzkopf


[quoted text, click to view]

AddThis Social Bookmark Button