Script to find last DDL changes in SQL Server

In this post, I provide you one script to find who last performed DDL changes in SQL Server.
As a DBA, this script is very useful to monitor last DDL changes in SQL Server.
Below is a script:

In above script, sys.fn_trace_getinfo(NULL) will fetch default trace file.

Anvesh Patel

Leave a Reply

3 Comments on "Script to find last DDL changes in SQL Server"

Notify of
avatar
Sort by:   newest | oldest | most voted
kranthi
Guest

Hi Anvesh,

I am getting below error when i try to execute the query.
Msg 19050, Level 16, State 1, Line 1
Trace file name ” is invalid.

wpDiscuz