dbTalk Databases Forums  

Transfer IDENTITY column foreign keys across servers?

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Transfer IDENTITY column foreign keys across servers? in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Axel Dahmen
 
Posts: n/a

Default Transfer IDENTITY column foreign keys across servers? - 08-01-2004 , 03:38 PM






Hi,

I want to copy a few tables from SQL Server 2000 to Excel and back. The data
in these tables has foreign key relationships made through IDENTITY columns.

e.g.:
CREATE TABLE Reservation
(ID INT IDENTITY PRIMARY KEY
,SomeColumns ...)

CREATE TABLE ReservationItem
(ID INT IDENTITY PRIMARY KEY
,Reservation INT NOT NULL REFERENCES Reservation (ID)
,SomeColumns ...)

How can I simply perform transfer of the data while maintaining the foreign
key relationship? As far as I can see there is no way to perform a "SET
IDENTITY_INSERT Reservation ON" in a simple DTS data transform task.

TIA,
Axel Dahmen



Reply With Quote
  #2  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: Transfer IDENTITY column foreign keys across servers? - 08-02-2004 , 12:16 AM






Have a look here

Problems With IDENTITY() and the DataPump task.
(http://www.sqldts.com/default.aspx?293)

--
--

Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
www.konesans.com - Consultancy from the people who know


"Axel Dahmen" <NO_SPAM (AT) NoOneKnows (DOT) de> wrote

Quote:
Hi,

I want to copy a few tables from SQL Server 2000 to Excel and back. The
data
in these tables has foreign key relationships made through IDENTITY
columns.

e.g.:
CREATE TABLE Reservation
(ID INT IDENTITY PRIMARY KEY
,SomeColumns ...)

CREATE TABLE ReservationItem
(ID INT IDENTITY PRIMARY KEY
,Reservation INT NOT NULL REFERENCES Reservation (ID)
,SomeColumns ...)

How can I simply perform transfer of the data while maintaining the
foreign
key relationship? As far as I can see there is no way to perform a "SET
IDENTITY_INSERT Reservation ON" in a simple DTS data transform task.

TIA,
Axel Dahmen





Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.