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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

why is the primary key lost when you import tables? 1

Status
Not open for further replies.

jgoodman00

Programmer
Joined
Jan 23, 2001
Messages
1,510
I am trying to import tables from one SQL server database to another. Each table has a primary key & autonumber (id) field. There are approximately 60 tables.
When I run the dts import wizard it successfully creates the tables & imports the data. However, it does copy across which fields made up the primary key.

Is this normal? Is there any way around this?


James Goodman
j.goodman00@btinternet.com
 

When you create a package using the DTS Import/Export Wizard you have three choices of methods to copy or import.

[li]Copy table(s) and view(s) from source database
[li]Use a query to specify the data to transfer
[li]Copy objects and data between SQL Server databases

Only the third option will copy Primary and Foreign keys. Terry L. Broadbent
FAQ183-874 contains tips for posting questions in these forums.
NOTE: Reference to the FAQ is not directed at any individual.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top