Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Import/Export

Status
Not open for further replies.

hlybbi

Programmer
Mar 19, 2003
91
IS
What is the best way to export sql data into another sql server

the porblem when i use the Enterprise manager is that my configurations to fields to not transfer along

Examble :
Id fields is the identity ON
test field has default value 0

when i get the data in the new sql server

id field is identity OFF
test has no default value Best regards Hlynur
 
Hi

You are selecting the first DTS option:

"copy tables, views and data"

you need to select the third option which is:

"copy database objects between sql servers"

You see identities, defaults, primary keys etc are all objects and relate to the table.

Have a look at the following thread where I explained to someone how to copy the identities across.

thread183-354710

Hope this helps

John
 
i always get the error "Failed to copy objects from Microsoft SQL Server to Microsoft SQL Server"

i thing i have tried everything

is there not any other method to do this Best regards Hlynur
 
When you build the DTS package make sure you uncheck the box that tells SQL to enable itentity insert. That will leave the identity colum alone. The default values for any col are only used if the col does not allow null values.

Hope this helps...
Dave
 
Sometimes, it is easier to script the objects in the database on the old server and then run the script on the new server. After that, you can transfer the data using DTS.

If you want to get the best answer for your question read faq183-874 and faq183-3179.
Terry L. Broadbent - DBA
SQL Server Page:
 
well i imported 1 table at time and that worked, but when i tried to take all the tables i got error.
but i have finised this.
so thx avery body for the help
and i found another way that works fine to, and that is to backup and restore on the new server.

Best regards Hlynur
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top