Insert Trigger is not firing

Insert Trigger is not firing

Post by Azad Ada » Sun, 09 May 1999 04:00:00



I have created an insert trigger which executes a stored procedure which
does a dbcc checkident on tables in the current database

The code is below:

    CREATE TRIGGER admin_ITrig ON admin FOR INSERT AS

        EXEC sp_checkident
        GO

This trigger just does not want to fire on inserts.  the stored procedure is
in the master database and this database logs in as sa.  Another strange
thing is that an insert trigger on another table in this database fires
perfectly well calling the Stored Procedure sp_checkident.  Both databases
master and this database are logging in as sa, so why is one trigger firing
on one table and not on the other table.

All help is much appreciated

Thanks in Advance,

Azad Adam

 
 
 

Insert Trigger is not firing

Post by Tony Rogerso » Mon, 10 May 1999 04:00:00


Azad,

Are inserts definitely occuring on the admin table ?

Try putting some debug code into the trigger and test execution by running
an insert into admin.

--
Tony Rogerson MCP,SQL Server MVP
Torver Computer Consultants Ltd.


>I have created an insert trigger which executes a stored procedure which
>does a dbcc checkident on tables in the current database

>The code is below:

>    CREATE TRIGGER admin_ITrig ON admin FOR INSERT AS

>        EXEC sp_checkident
>        GO

>This trigger just does not want to fire on inserts.  the stored procedure
is
>in the master database and this database logs in as sa.  Another strange
>thing is that an insert trigger on another table in this database fires
>perfectly well calling the Stored Procedure sp_checkident.  Both databases
>master and this database are logging in as sa, so why is one trigger firing
>on one table and not on the other table.

>All help is much appreciated

>Thanks in Advance,

>Azad Adam