Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2003
    Posts
    15

    Unhappy Unanswered: trigger for insert is not fired when importing data???

    hallo , have trigger on table for insert, it works perfectly if I manually add record in db. But it seems not to be fired when importing data from another table.... why???

    thanks

  2. #2
    Join Date
    Jan 2003
    Location
    India
    Posts
    523
    From BOL:
    Trigger Execution
    All bulk copy operations (the BULK INSERT statement, bcp utility, and the bulk copy API) support a bulk copy hint, FIRE_TRIGGERS. If FIRE_TRIGGERS is specified on a bulk copy operation that is copying rows into a table, INSERT and INSTEAD OF triggers defined on the destination table are executed for all rows inserted by the bulk copy operation. By default, bulk copy operations do not execute triggers.

    These considerations apply to bulk copy operations that specify FIRE_TRIGGERS:

    Bulk copy operations that would usually be minimally logged are fully logged.


    Triggers are fired once for each batch in the bulk copy operation. The inserted table passed to the trigger contains all of the rows inserted by the batch. Specify FIRE_TRIGGERS only when bulk copying into a table with INSERT and INSTEAD OF triggers that support multiple row inserts.


    No result sets generated by the insert triggers are returned to the client performing the bulk copy operation.


    regards,
    Harshal.

  3. #3
    Join Date
    Jan 2003
    Posts
    15
    thanks, I have already found it too, but, in fact, it didnt help me at all. Could you help me how to add FIRE_TRIGGERS when using import wizard in Enterprise Manager? (that wouldnt be me who would import data to DB, and the users who will do it wont be too handy...) I am completely confused....

    thanks a lot!!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •