Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Import/Export (DTS) and Replication (2000)
 DTS package in predefined order?

Author  Topic 

djorre
Yak Posting Veteran

94 Posts

Posted - 2009-06-22 : 07:50:50
Hi,

Because of Foreign Keys I now have 6 DTS packages which have to be executed one after another. If I put all the tables in one DTS Packages this gives errors because the DTS fills the tables not one by one but by 4 (seems random, but anyway I cant give the tables any order) and this gives problems with insertions of values that need foreign keys. Is there any way to fix this and still make it one dts package? And is there a way to empty all tables automatically before the packages goes?

Thank, greetings,

Joris

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2009-06-22 : 12:51:29
We don't know how it looks when you say "DTS fills the tables...".
There are many ways to fill tables with data using DTS.
And I never have had a problem like yours because of making some simple steps (tasks) and give them an order using the workflow.

Can you explain in more detail what you are trying to do in what steps?


No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2009-06-22 : 13:07:22
quote:
Originally posted by djorre

Hi,

Because of Foreign Keys I now have 6 DTS packages which have to be executed one after another. If I put all the tables in one DTS Packages this gives errors because the DTS fills the tables not one by one but by 4 (seems random, but anyway I cant give the tables any order) and this gives problems with insertions of values that need foreign keys. Is there any way to fix this and still make it one dts package? And is there a way to empty all tables automatically before the packages goes?

Thank, greetings,

Joris


i think you need only a single dts package.
you can guarantee the order of filling of table as long as you've defined precedence constraints correctly. you can empty all the tables at first by using an execute sql task and giving staements as

DELETE FROM table1
DELETE FROM table2
...

make sure you start from child tables first and move to parent else it will throw foreign key error.
Go to Top of Page
   

- Advertisement -