Update script generation for database trigger is wrong.
Zelimir Bozic
Posts: 4
Hi,
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 11.1.5.21
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 11.1.5.21
Comments
Thanks for reporting the problem.
Redgate Software