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)
 Trigger Not Firing with DTS import

Author  Topic 

dhw
Constraint Violating Yak Guru

332 Posts

Posted - 2004-03-29 : 13:19:09
Hello...

I have a DTS package that is importing data (INSERT) from one table to another table. The table has an INSERT Trigger defined...that runs fine when I manually INSERT records or run an INSERT operation via my stored procedure. However, when I run the DTS package, the data gets imported (inserted) but the Trigger does not fire.

As a simple test, I created trigger to update a column during inserts....and it just does not work with DTS. Is there some setting that I need to check to make sure that the Trigger fires with DTS?

thanks
- dw

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2004-03-29 : 13:29:29
DTS does not actually use an INSERT statement if you are importing data. It uses bulk copy. You'll need to redesign your DTS package to do an INSERT INTO/SELECT command instead of import in order to get the trigger to fire.

If your DTS package is moving data, why not use stored procedures instead?

Tara
Go to Top of Page

dhw
Constraint Violating Yak Guru

332 Posts

Posted - 2004-03-29 : 14:06:54
Doh!

Thanks Tara....I didn't even think about trying to import the data with a stored proc. Whenever I need to import data, I automatically use DTS. This should prove better for me.

...dw
Go to Top of Page

byrmol
Shed Building SQL Farmer

1591 Posts

Posted - 2004-03-29 : 17:54:39
You can tell the "Tansform Data Task" not to use bulk copy by unchecking the "Use fast load" option...This will run slower, but will fire triggers.... Frankly it is a glaring omission not to have a "FIRE_TRIGGERS" hint included.. (just about) every other bulk copy hint is there....

DavidM

"The easiest way to give up marijuana is to smoke so much you forget that you smoke it."
Go to Top of Page

dhw
Constraint Violating Yak Guru

332 Posts

Posted - 2004-03-31 : 16:46:38
I noticed that check box before....but didn't realize what its purpose was. That is good to know.

thanks...
Go to Top of Page

aetherly
Starting Member

3 Posts

Posted - 2009-04-20 : 00:26:30
David,

Where is the fast load "switch" in Enterprise Manager (2000)???
[/quote]

Andre Etherly
Go to Top of Page
   

- Advertisement -