Search code examples
sql-server-2000transaction-logshrink

Is there are a way to check the last time a shrink operation was done on a SQL Server 2000 transaction log


I've got a database running on a clients SQL Server 2000 box where the transaction log file is only 1MB in size. This seems very perculiar.

I can't find any Database Maintenance Plan or individual SQL agent job that is explicitly shrinking it so I'm not sure how to find out when it has happened.

Is there a system table or view that I could use to find out when the last shrink operation on transaction log was done?


Solution

  • You should be able to determine this from the "last modified" time on the "ldf" file (unless it has autogrown in the interim - which seems unlikely as it is still only 1MB)

    Does the database have logged activity happening? Is the autoshrink database option turned on? (You wouldn't see a SQL agent job if that was the case a background task performs these shrink operations). This setting is extremely unrecommended