views:

37

answers:

2

SQL Server: is it possible to get procedure or table creation and last alter date?

If it is then how do to it?

SQL Server 2005

+4  A: 

Sure:

SELECT name, create_date, modify_date 
FROM sys.tables

SELECT name, create_date, modify_date 
FROM sys.procedures

The system catalog views in the sys schema are present in SQL Server 2005 and up, and provide a wealth of (metadata) information about the database objects.

Check out the MSDN / SQL Server Books Online docs on Querying the SQL Server System Catalog for a lot more details and information.

marc_s
A: 

If you want to take things to the next level and implement a custom schema change tracking solution you can do so by using DDL Triggers.

Take a look at Using DDL Triggers in SQL Server 2005

It is common to use such techniques in order to record what has changed and to even block/rollback changes of an undesirable nature.

John Sansom