Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.



share|improve this question

migrated from Jan 22 '12 at 14:39

This question came from our site for professional and enthusiast programmers.

If there's still time to talk you out of shrinking your db, consider this:… – Michael Haren May 13 '10 at 3:55
I am against shrinking, so this is to find if someone has done it. – Manjot May 13 '10 at 4:04
Ah, interesting...I'm curious to see what people come up with – Michael Haren May 13 '10 at 4:08
I have scripts for 2005 and above but not for sql 2000. So I am interested in something that can be applied to all environments. See… – Manjot May 13 '10 at 4:17
surely the only people with sufficient access to shrink a DB are admins? That narrows it down a bit... – Mitch Wheat May 13 '10 at 4:56
up vote 2 down vote accepted

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 and

share|improve this answer
can i use it on sql 2000? – Manjot May 16 '10 at 21:53

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.