December 1, 2003 at 12:22 pm
We have a daily database maintenance job that tries to shrink the database. Sometimes we get the following error:
Cannot shrink log file 2 (<transaction log>) because requested size (568KB) is larger than the start of the last logical log file (SQLSTATE 01000) (Message 9007) DBCC execution completed. If DBCC printed error messages, contact your system administrator (SQLSTATE 01000) (Message2528). The setup succeeded.
The maintenance task executes the following DBCC command to shrink the database:
DBCC SHRINKDATABASE ([<database name>], 10)
Any ideas?
December 1, 2003 at 2:26 pm
The log file consists of a bunch of logical files and if one of those is active, you cannot shrink below it. There is a script in our lbrary that can force the shrink by running dummy transactions.
http://www.sqlservercentral.com/scripts/contributions/26.asp
Steve Jones
http://www.sqlservercentral.com/columnists/sjones
The Best of SQL Server Central.com 2002 - http://www.sqlservercentral.com/bestof/
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply