You are here

Find recent object changes in SQL Server Database

Submitted by Asif Nowaj, Last Modified on 2019-11-08

If some new or existing user tables or stored procedure is added or modified in a particular database and server, you can find the list of the object's name with help of below query.

This becomes helpful when you keep changing the database objects and at some point you decided to update those changes to the source control system. Then you need to know what are the database objects that you have changed after last day you checked in the details in source control.

It is simple. Run the below query when you want to know, list of tables and stored procedure that you have changed in last 7 days.


SELECT name [Object name], type_desc [Object Type], create_date [Date of Creation], modify_date [Last date of modification]
FROM sys.objects 
WHERE (TYPE = 'U' or TYPE = 'P') 
AND modify_date >  (getdate() -7) 

Type U is for user table and P is for stored procedure.

Please note that this will not tell you the details of changes that you have made

Discussion or Comment

If you have anything in mind to share, please bring it in the discussion forum here.

https://forum.everyething.com/sql-server-f38/