Skip to content
Advertisement

How to get history of table structure change in SQL Server

I have a table in SQL Server 2012. The table has few columns. Now I need to check for which column and what is the DDL script has been executed on this table. Or if it is possible to get what is the latest ALTER has been executed for this table.

Thanks in advance.

Advertisement

Answer

You cannot achieve this if you do not have a historical or archive table that store this data (using a DDL Trigger) or using a source control.

OR

You have to use a third-party log reader (if log is not shrinked) like ApexSQL LOG

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement