Hi All, I need to identify stored procedure changes (i.e altered by anyone) through DML triggers even if the stored procedure is encrypted. Please let me know any useful tips references to start with. Thanks, Kannan
Personally, I wouldn't use triggers for this. Instead, I'd use extended events. You have events for object_altered, objected_created, objected_deleted. You can capture every modification to the object as it occurs. If you need to, you can add the global event for sql_text. I'm pretty sure in this case that will capture the new code (although not for encrypted procs). Plus, with extended events you get very good, low level filtering, you can send information to files or to the ring buffer where you do other things based on the events fired.