dbTalk Databases Forums  

Ignore Relation on Import

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


Discuss Ignore Relation on Import in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Roy Goldhammer
 
Posts: n/a

Default Ignore Relation on Import - 03-03-2005 , 01:59 AM






Hello there

I have database with some relationships

One of them declare as one to many.

In order to import the data correctly i need to import first the table with
the primary key and after that the table with the foreign key.

Because the DTS import the tables by the table name (as far as i know) the
table with the foreign key is being imported before the table with primary
key and that's whay can't import this table

Is there a way to force the DTS to import first the tables with the primary
key or to ignore the relations while importing data?



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

Default RE: Ignore Relation on Import - 03-03-2005 , 02:47 AM






There is no internal "switch" to do this so you have a couple of options

1. Build the package yourself and not use the wizard thereby specifying the
order correctly.
2. Disable all constraints prior to the package, import, reapply the
constraints.

The problem with #2 of course is that you MUST know your data is clean
before doing this otherwise you will have some nasty shocks later.

Allan

"Roy Goldhammer" wrote:

Quote:
Hello there

I have database with some relationships

One of them declare as one to many.

In order to import the data correctly i need to import first the table with
the primary key and after that the table with the foreign key.

Because the DTS import the tables by the table name (as far as i know) the
table with the foreign key is being imported before the table with primary
key and that's whay can't import this table

Is there a way to force the DTS to import first the tables with the primary
key or to ignore the relations while importing data?




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

Default RE: Ignore Relation on Import - 03-03-2005 , 03:11 AM



Another option you have is if you are moving the database, lock, stock and
barrel then a BACKUP and RESTORE may be the best and simplest way forward.

Allan

"Allan Mitchell" wrote:

Quote:
There is no internal "switch" to do this so you have a couple of options

1. Build the package yourself and not use the wizard thereby specifying the
order correctly.
2. Disable all constraints prior to the package, import, reapply the
constraints.

The problem with #2 of course is that you MUST know your data is clean
before doing this otherwise you will have some nasty shocks later.

Allan

"Roy Goldhammer" wrote:

Hello there

I have database with some relationships

One of them declare as one to many.

In order to import the data correctly i need to import first the table with
the primary key and after that the table with the foreign key.

Because the DTS import the tables by the table name (as far as i know) the
table with the foreign key is being imported before the table with primary
key and that's whay can't import this table

Is there a way to force the DTS to import first the tables with the primary
key or to ignore the relations while importing data?




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.