Results 1 to 5 of 5
  1. #1
    Join Date
    Jul 2002
    Location
    India
    Posts
    3

    Unanswered: Trigger in SQLSERVER

    Hi
    Trigger in SQLSERVER is not firing for me when i try to import data from text file to table1 which is having a trigger.
    I'm not Using Bulk Insert
    Is there any other option.

    pls help me

    Venkat

  2. #2
    Join Date
    Dec 2001
    Location
    Toronto, Canada
    Posts
    335
    My understanding of the word "Import" is BULK COPY or BCP. Niether one of these options will fire a trigger. A trigger is fired on one of three events INSERT, UPDATE and DELETE.
    MCDBA

  3. #3
    Join Date
    Feb 2002
    Location
    Houston, TX
    Posts
    809
    If you are using BCP you can add a hint to tell BCP to fire triggers. -h "FIRE_TRIGGERS"
    Paul Young
    (Knowledge is power! Get some!)

  4. #4
    Join Date
    Dec 2001
    Location
    Toronto, Canada
    Posts
    335
    The hint -h "FIRE_TRIGGERS" is not supported if you are running a version of SQL Server prior to 2000 I believe.
    MCDBA

  5. #5
    Join Date
    Feb 2002
    Location
    Houston, TX
    Posts
    809
    Yes, you are correct. I should have included the pre 2k solution wich is to BCP data into a holding table and then do an insert into the target table from the holding table. This was VERY common in the days when you had decide on supporting bulk inserts on a database level.
    Paul Young
    (Knowledge is power! Get some!)

Posting Permissions

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