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

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

If so, how do you do it?

SQL Server 2005

+2


a source to share


2 answers


Sure:

SELECT name, create_date, modify_date 
FROM sys.tables

SELECT name, create_date, modify_date 
FROM sys.procedures

      



Schema system catalog views sys

are present in SQL Server 2005 and later and provide a wealth of (metadata) information about database objects.

Check out the online MSDN / SQL Server docs on Query the SQL Server System Catalog for more details and information.

+5


a source


If you want to take things to the next level and implement your own schema change tracking solution, you can do so using DDL triggers.

Take a look at Using DDL Triggers in SQL Server 2005



It is common to use such techniques to record what has changed and even block / roll back unwanted changes.

0


a source







All Articles