CREATE TRIGGER trigger_name 
ON { table | view } 
[ WITH ENCRYPTION ] 
{
    { { FOR | AFTER | INSTEAD OF } { [ INSERT ] [ , ] [ UPDATE ] }
        [ WITH APPEND ]
        [ NOT FOR REPLICATION ]
        AS
        [ { IF UPDATE ( column )
            [ { AND | OR } UPDATE ( column ) ]
                [ ...n ]
        | IF ( COLUMNS_UPDATED ( ) { bitwise_operator } updated_bitmask )
                { comparison_operator } column_bitmask [ ...n ]
        } ] 
        sql_statement [ ...n ] 
    } 
} NOT FOR REPLICATION表示当复制进程更改触发器所涉及的表时,不应执行该触发器。

解决方案 »

  1.   

    执行DTS导入时,触发器是不会触发的。
      

  2.   

    If you have a trigger on a base table thats fired for INSERTs/UPDATEs but the trigger fails when executed as a part of DTS package, then you may need to check the mode of execution whether via BULK INSERT/BCP because these are minimally logged.Thus you may need to edit the particular DTS task and uncheck the "Bulk Insert" check box under the advanced. 
    This action should fire the triggers but would affect the import/export performance.One of the many reasons why you should have second thoughts before having triggers!"Bulk Insert" 是啥东西?