SQL Server database last updated date time

Nagendra Baliga picture Nagendra Baliga · Apr 9, 2015 · Viewed 72.6k times · Source

Is there any sql script to find out when the database in SQL server is last updated?

I want to know the last updated date time for the changes done on meta data of the database rather than actual data inside the table. Particularly when:

  • Any new table is created/dropped from Database.
  • Any new column is added/removed from table in the Database.
  • Any new views/Stored Procedures/Functions are added/altered inside the Database.

Answer

Daniel Stackenland picture Daniel Stackenland · Apr 9, 2015

Look in sys.objects should be enough, try this query

 select * from sys.objects
order by modify_date desc