views:

31

answers:

1

Hi,

In SQL 2000, 2005 and 2008, how can I know when databases were last shrunk on a MS SQL server?

I want to do this using TSQL.

Regards

Manjot

+1  A: 

Because for shrinking of database one uses DBCC SHRINKDATABASE or DBCC SHRINKFILE, you can try to solve your problem with server audits from the group DBCC_GROUP (see http://technet.microsoft.com/en-us/library/cc280663.aspx and http://msdn.microsoft.com/en-us/library/cc280386.aspx)

Oleg
can i use it on sql 2000?
Manjot