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
  • 0 Views
  • 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

We have been storing our staging database on the production database server with the
I have a live search on my help page that searches our help database
trying to set up an import form live database to our development database. I
Is it safe to run LogParser against our live production IIS log file? Currently,
I am writing code to migrate data from our live Access database to a
In our app, we currently live with the legacy of a decision to store
When developing (works fine live) the pages for our website don't pick up the
[edit] I should note that I need to do this on a live production
We have a setup where most code, before being promoted to full production, is
We need to regularly create a clone of a production server's live MySQL 4

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.