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.

Please share your ideas and opinions about this topic with me, your contribution will add true value to this topic.
If anyone has doubts on this topic then please do let me know by leaving comments or send me an email.

If you like this post, then please share it with others.
Please follow, I will share my experience towards the success of Database Research and Development Activity.

I put up a post every day, please keep reading and learning.
Discover Yourself, Happy Blogging !
Anvesh M. Patel.

More from

Leave a Reply

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

Notify of
Sort by:   newest | oldest | most voted

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.