December 16, 2003 at 8:57 am
When I take a backup DB and try to restore it and then do a DBBCC SHRINKFILE, the log file does not shrink. If I do that to the original database from where the backup was doen the shtink log file works. Anyone any ideas?
Thanks Kavita
December 16, 2003 at 10:34 am
I suspect that the "restore" creates a new db first with the log of that size. An interesting problem.
Steve Jones
http://www.sqlservercentral.com/columnists/sjones
The Best of SQL Server Central.com 2002 - http://www.sqlservercentral.com/bestof/
December 16, 2003 at 1:29 pm
This could be related to virtual logs and logical logs. Just a guess. Virtual logs that hold part of the logical log cannot be freed. If all the virtual logs in a log file hold parts of the logical log, the file cannot be shrink until a truncation marks one or more of the virtual logs at the end of the physical log as inactive(BOL - Shrinking the Transaction Log)
Maybe because the log has no truncation marks (because it has just been restored) then it cannot be shrunk.
Dr. Peter Venkman: Generally you don't see that kind of behavior in a major appliance.
Patrick
Quand on parle du loup, on en voit la queue
December 17, 2003 at 3:53 am
see these links
http://www.sqlmag.com/Forums/messageview.cfm?catid=3&threadid=6207
http://www.sqlmag.com/Articles/Index.cfm?ArticleID=9011
they will help you understand the problem and the solutions
I hope this help u
Alamir Mohamed
Alamir Mohamed
Alamir_mohamed@yahoo.com
December 17, 2003 at 6:04 am
Thanks a lot for the info, I will try running the script.
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply