How to handle the schema or stored procedure chang

2019-07-29 12:47发布

问题:

In SQL :-

How to handle the schema or stored procedure change logs in a table?

Whenever there some changes applied on the stored procedure, that change has to be store in a table. Changes will provide additional details on what was changed and when was changed. Will it be possible to store the change logs in a table? If so, how we do that?

回答1:

You can use DDL Triggers for this. See the list of DDL Events here.

Aaron Bertrand has blogged about this, and has provided some useful scripts.