December 8, 2003 at 6:55 am
Hi All,
I run this DBCC script on my database once a week.
dbcc shrinkdatabase ([dbname],10)
Last time it ran I got this error message :
Executed as user: RJRWS\USERNAME. ...---- [SQLSTATE 01000] (Message 0) Cannot shrink log file 2 (DB_Log) because requested size (56768KB) 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] (Message 2528)
Any Idea what could have happened ?
Thanks.
December 8, 2003 at 10:12 am
Backup or truncate the transaction log before doing the Shrinkfile. (Don't truncate the log if you might need it for recovery)
Francis
December 8, 2003 at 11:29 am
There is also a script here that can help
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/
December 9, 2003 at 8:23 am
quote:
There is also a script here that can helphttp://www.sqlservercentral.com/scripts/contributions/26.asp
Steve,
I use SQL Server 2000, and that code doesn't work. For example, dbcc loginfo returns CreateLSN, which is a large integer such as 115000000048700025, not a datetime value. I changed the type to varchar(25). Executing it, the same values are always returned regardless of the active database.
Steve Jones
http://www.sqlservercentral.com/columnists/sjones
The Best of SQL Server Central.com 2002 - http://www.sqlservercentral.com/bestof/
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply