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 working with DTS import

Author  Topic 

MDiwakar
Starting Member

6 Posts

Posted - 2008-01-15 : 00:57:33
I have a table that looks like

CREATE TABLE tblMarks ( marks INT , created_date DATETIME NULL )


I created a TRIGGER on the table and it looks like


ALTER TRIGGER tr_tblMarks
ON tblMarks
AFTER INSERT
AS
BEGIN
Print('After trigger tr_tblMarks - Trigger executed')
UPDATE tblMarks SET created_date = GETDATE()
END


If i insert data through manual inserts, the trigger is working.
It updates the created_date column to the current date.

But if i import data from Excel into the table, the trigger does not work.

Anyone have any idea about this?

Thanks in advance

jackv
Master Smack Fu Yak Hacker

2179 Posts

Posted - 2008-01-15 : 03:12:34
How are you inserting?

Jack Vamvas
--------------------
Search IT jobs from multiple sources- http://www.ITjobfeed.com
Go to Top of Page

jackv
Master Smack Fu Yak Hacker

2179 Posts

Posted - 2008-01-15 : 03:16:41
I forgot to ask: do you have the 'Use Fast Load' option ticked in your DTS package , as I think this option bypasses triggers to speed up the load , if you're doing some sort of bulk load

Jack Vamvas
--------------------
Search IT jobs from multiple sources- http://www.ITjobfeed.com
Go to Top of Page

MDiwakar
Starting Member

6 Posts

Posted - 2008-01-15 : 05:16:14
I am not sure about that. Can you tell me how to enable it?
Go to Top of Page

MDiwakar
Starting Member

6 Posts

Posted - 2008-01-15 : 05:41:32
I have figured out the way to enable 'Use fast Load' option. Anyway thank you for the assistance.
It's working.

Thank you Jack
Go to Top of Page
   

- Advertisement -