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

  • Home
  • SEARCH
  • 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 6611807
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T20:01:10+00:00 2026-05-25T20:01:10+00:00

This is a very strange problem. I’ve asked about it before here: How did

  • 0

This is a very strange problem. I’ve asked about it before here:
How did my trigger get deleted?

I renamed my trigger and I thought it had stopped happening but the problem seems to have come back again.

I’ve added a trigger to a table in our database. The server is SQL 2008. The trigger doesn’t do anything particularly tricky. Just changes a LastUpdated field in the table when certain fields are changed. It’s a "After Update" trigger.

There is a large C++ legacy app that runs all kind of huge queries against this database. Somehow (I’ve got absolutely no idea how) it is deleting this trigger. It doesn’t delete any other triggers and I’m certain that it’s not explicitly dropping the trigger or table. The developers of this app don’t even know anything about my triggers.

How is this possible?

I’ve tried running a trace using SQL Server Profiler and I’ve gone through each command that it’s sending and run them using SQL Management Studio but my trigger is not affected. It only seems to happen when I run the app.

The other devs reckon that they are not deleting it explicitly. It doesn’t exist in sys.objects or sys.triggers so it’s not a glitch with SSMS. Guess I’ll just rename it and hope for the best? I can’t think of anything else to try. A few comments below have asked if the trigger is being deleted or just disabled or not working. As I stated, it’s being deleted completely. Also, the problem is not related to the actual contents of the trigger. As I stated, it I remove the contents and replace with some extremely simple code that doesn’t do anything then it is still deleted.

  • 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-25T20:01:10+00:00Added an answer on May 25, 2026 at 8:01 pm

    Thanks for the suggestions everyone. In particular Billinkc’s suggestion of creating a DDL trigger was cool. I didn’t know that such a thing exists.

    Anyway after three months of wondering what was going on here I finally got to the bottom of it.

    I have a bunch of scripts to create various triggers. They have the typical format of "if trigger exists then delete", "go", followed by "create trigger" and another "go". I use a script to add all these individual triggers to the database in one go. I missed one of the "go" commands at the bottom of a create command (in all these hundreds of lines). This means that trigger A got added to the database with "if trigger B exists then delete" at the bottom of it. That was so confusing…

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

Sidebar

Related Questions

This is a very strange problem, and I just hope that I can clearly
This problem is very strange and I'm hoping someone can help me. For the
I have this very strange problem while compiling the project. MOC seems to be
Have a very strange problem with Apache .htaccess URL Rewriting and Redirection. Here's my
This is a very strange problem. I've got a rails app in which I
I have a very strange problem with facebook OG. https://fit.upjet.com/en/pages/news/270/ - this is a
Okay, so this is a very strange problem and it has a lot of
This is a very strange problem I've been struggling with for a few days.
I'm having a very strange problem with my custom listview. This Listview shows a
I have this very strange problem on a big flex app where it would

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.