Database trigger and Visual database project

  • I have a database trigger on the DB that detects DDL changes, using EVENTDATA().  And then logs these changes to a user defined table.

    This trigger works 100% when CREATE or ALTER scripts are executed in SSMS.

    But when these scripts are Published from a Visual Studio Database Project, the database trigger does not detect these at all, and nothing is logged in my logging table. The DDL changes are published and executed successfully to the DB and those changes are made, but the trigger does not detect them.

    Any suggestions on how I can amend my trigger to detect the published changes from VS?

    Or perhaps a change/setting in Visual studio perhaps?

    Thank you

  • unless changed the deploy process and/or schema compare will disable all triggers (both DML and database) - make sure you change that setting.

  • Thank you!

    I found this under Advanced Publish Settings

    Appreciate your help!

     

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply