Re: Create trigger - do users need to be out?



rdraider (rdraider@xxxxxxxxxxxxx) writes:
I created and successfully tested a trigger on a test database. Now
that I want to put this on a production system, the create trigger
statement takes way too long to complete. I cancelled after a few
minutes. The test trigger took just a second to create. The test and
production databases are identical in design. Only difference is that
there are users in the production system.

Does the trigger by chance access a linked server?

Else, I guess it could be blocking from a running query. Use sp_who
to determine if you have any blocking. The Blk column is non-zero if
the spid on the row is blocked. Blk is the spid of the blocker.


--
Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
.



Relevant Pages

  • Re: Record level security?
    ... the trigger is not sensing the delete action and it is allowing it to ... as prefixes; using the table names as prefixes causes code clutter. ... Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx ... Books Online for SQL Server 2005 at ...
    (microsoft.public.sqlserver.security)
  • Re: Add a datestamp to an existing table
    ... Books Online for SQL Server 2005 athttp://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books ... ... Are there examples of creating a trigger for tracking table data ... If you choose a design with a seperate history table that holds all ...
    (comp.databases.ms-sqlserver)
  • Re: Record level security?
    ... and then another one that lists ... I would probably do it in one trigger, but I grow up in a cruel world ... Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx ... Books Online for SQL Server 2005 at ...
    (microsoft.public.sqlserver.security)
  • Re: History/audit without history tables
    ... I would typically do this in a trigger. ... JOIN pledgegroupmembership pgm ON i.accno = pgm.accno ... Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx ... Books Online for SQL Server 2005 at ...
    (comp.databases.ms-sqlserver)
  • Re: Auditing and IP addresses
    ... Create a certificate and which you sign the trigger with. ... Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx ... Books Online for SQL Server 2005 at ...
    (microsoft.public.sqlserver.security)