Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 71493
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T19:53:47+00:00 2026-05-10T19:53:47+00:00

On our live/production database I’m trying to add a trigger to a table, but

  • 0

On our live/production database I’m trying to add a trigger to a table, but have been unsuccessful. I have tried a few times, but it has taken more than 30 minutes for the create trigger statement to complete and I’ve cancelled it.

The table is one that gets read/written to often by a couple different processes. I have disabled the scheduled jobs that update the table and attempted at times when there is less activity on the table, but I’m not able to stop everything that accesses the table.

I do not believe there is a problem with the create trigger statement itself. The create trigger statement was successful and quick in a test environment, and the trigger works correctly when rows are inserted/updated to the table. Although when I created the trigger on the test database there was no load on the table and it had considerably less rows, which is different than on the live/production database (100 vs. 13,000,000+).

Here is the create trigger statement that I’m trying to run

CREATE TRIGGER [OnItem_Updated]      ON  [Item]    AFTER UPDATE AS  BEGIN     SET NOCOUNT ON;      IF update(State)     BEGIN         /* do some stuff including for each row updated call a stored            procedure that increments a value in table based on the            UserId of the updated row */     END END 

Can there be issues with creating a trigger on a table while rows are being updated or if it has many rows?

In SQLServer triggers are created enabled by default. Is it possible to create the trigger disabled by default?

Any other ideas?

  • 1 1 Answer
  • 1 View
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-10T19:53:48+00:00Added an answer on May 10, 2026 at 7:53 pm

    The problem may not be in the table itself, but in the system tables that have to be updated in order to create the trigger. If you’re doing any other kind of DDL as part of your normal processes they could be holding it up.

    Use sp_who to find out where the block is coming from then investigate from there.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been asked to make a few cosmetic changes to our production deployment.
I have a weekly script that moves data from our live database and puts
After noticing that our database has become a major bottleneck on our live production
Okay, so today I updated my database with new information from our 'live' database...
I have been working on standardizing the source control structure for our Team Foundation
I am writing code to migrate data from our live Access database to a
Is it safe to run LogParser against our live production IIS log file? Currently,
For two weeks now I've been trying to implement Git at our office. Rather
I have an Oracle (10.2.0.4) database table with a column which is encrypted by
I have some queries that are causing timeouts in our live environment. (>30 seconds)

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.