Omair Shakeel

Thursday, October 21, 2010

Finding the modified date of your tables, views and stored procedures in SQL Server 2005

Working on the next version of a product that uses a back-end database requires you to track all the modifications done on the tables, views and stored procedures.

A quick way to find the modified dates of your tables, views, stored procedures in SQL Server is:

For stored procedures:

select [name], create_date, modify_date from sys.procedures
order by modify_date desc

For tables:

select [name], modify_date from sys.tables
order by modify_date desc

For views:
select [name], modify_date from sys.views
order by modify_date desc

Using these scripts, you can get the list of the recently added / modified tables. Tracking your team's activities on your database will help you create the final deployment SQL script.


0 Comments:

Post a Comment

<< Home