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 7613031
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T02:04:13+00:00 2026-05-31T02:04:13+00:00

My application is based on a sql server db. All customers has the same

  • 0

My application is based on a sql server db.

All customers has the same db except for customizations.

Some customizations include: new tables, modified tables, custom views, custom triggers…

When I run the software update some scripts are executed. Now I manually disable triggers and reenable after the scripts are done.

Anyway I would like automatically to disable all the triggers (that are enabled, may be some of them could be already disabled) and then reenable them at the end.

Not to reinvent the whell, how to do that?

How to get only the active triggers on the current db?

Once I got this I can programmatically create and run the

DISABLE TRIGGER triggername ON TABLENAME

ENABLE TRIGGER triggername ON TABLENAME
  • 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. Editorial Team
    Editorial Team
    2026-05-31T02:04:14+00:00Added an answer on May 31, 2026 at 2:04 am
    select objectproperty(object_id('TriggerName'), 'ExecIsTriggerDisabled') 
    

    1 means true, 0 means false obviously

    Use Jeff O’s query and modify it a bit

    SELECT  
           TAB.name as Table_Name 
         , TRIG.name as Trigger_Name
         , TRIG.is_disabled  --or objectproperty(object_id('TriggerName'), 'ExecIsTriggerDisabled')
    FROM [sys].[triggers] as TRIG 
    inner join sys.tables as TAB 
    on TRIG.parent_id = TAB.object_id 
    

    or add it as a where clause.

    where TRIG.is_disabled = 0 -- or 1 depends on what you want
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a web application that loads some 50 tables from SQL Server into
I'm implementing a web - based application using silverlight with an SQL Server DB
I have an SQL Server (2008 R2) based (C# WinForms) application that predominantly runs
We have a .NET e-commerce application with a SQL Server 2005 back-end. A new
Trying to make a MySQL-based application support MS SQL, I ran into the following
We have an Excel 2002/XP based application that interacts with SQL 2000/5 to process
Microsoft's new Windows Live Application Based Storage API is a RESTful API. More info
I need to run my application on network. The application is based on SQL
We have a cloud based SaaS application and many of our customers (school systems)
Good Evening All, A client has asked that I develop a web application as

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.