What are the challenges you face when working across database platforms? Take the survey

Update script generation for database trigger is wrong.

Zelimir BozicZelimir Bozic Posts: 4
edited March 5, 2015 12:10PM in SQL Compare 11
if we change database trigger - generated update script is wrong and produce error, if object don't exists in database. (with option "Add object existence checks" turned on)

wrong update script started with:

IF NOT EXISTS (SELECT 1 FROM sys.triggers WHERE name = N'tr_db_OnDBChange' AND parent_class = 0)
EXEC sp_executesql N'
ALTER TRIGGER [tr_db_OnDBChange]

I using last


  • Options
    This looks like a bug in SQL Compare - I've raised it in our bug-tracking system as SC-7788. We'll get it fixed as soon as we can, and I'll reply to this forum post to let you know when that happens.

    Thanks for reporting the problem.
    Development Lead
    Redgate Software
  • Options
    I think this is fixed in our latest Frequent Updates release ( -- we should be getting the existence check the right way round now.
Sign In or Register to comment.