I am using the SQL import wizzard to import my file into an existing table on my DB. I have created ad trigger using the below code. but it does not run. How do I make this run. Note when I import data I am importing many rows.
create trigger [dbo].[A_ImportRun] on [dbo].[A_Import] after insert
asked Mar 19, 2012 at 09:14 AM in Default
If you have used the data import wizard to import the data then you will need to have saved the import process as a SSIS package. Providing you have the Business Intelligence Development Studio installed you can edit this package and add an "Execute SQL" step to it that executes the script you need.
answered Mar 19, 2012 at 09:23 AM
This is the default behavior if you are using the data import wizard i.e. triggers are not fired during the bulk load. For that you must save the package and change the OLEDB destination's "FastLoadOptions" property i.e. After opening the saved package in BIDS do the following
But please keep in mind that your trigger should be able to handle multiple rows insertion. Hope it helps.
answered Mar 19, 2012 at 09:47 AM