March 30, 2010 at 8:01 am
All,
I have a db that goes into recovery each night when we backup the log. I have never experienced this before and the problem began last week after we restored a new production copy to our dmz environment.
Any help is appreciated.
Thanks
MCTS: BI 2008, MCITP: BI 2008
Stay Thirsty My Friends
March 30, 2010 at 8:46 am
What is the exact script that is running to backup the log?
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
March 30, 2010 at 8:55 am
Database may go into recovery while restore. Never seen while backing up. :hehe: Please share the command
March 30, 2010 at 9:12 am
vidya_pande (3/30/2010)
Database may go into recovery while restore. Never seen while backing up. :hehe:
It's possible. There's a documented option to backup to do just that.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
March 30, 2010 at 9:20 am
select 'BACKUP LOG ' + @dbname + ' WITH TRUNCATE_ONLY'
exec ('dbcc shrinkdatabase (' + @dbname + ',TRUNCATEONLY)')
MCTS: BI 2008, MCITP: BI 2008
Stay Thirsty My Friends
March 30, 2010 at 9:27 am
Why the hell are you truncating your log and shrinking your database?
Please read through this - Managing Transaction Logs[/url]
Shrinking causes massive fragmentation and will just result in the data file growing again next time data gets added. When that happens, the entire system will slow down as the file is expanded. Also repeated shrinks and grows will cause fragmentation at the file-system level, which is hard to fix.
See - http://sqlinthewild.co.za/index.php/2007/09/08/shrinking-databases/
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
March 30, 2010 at 12:00 pm
I am not sure while but somehow this is a part of the maintenance plan in the dmz I inherited in the last few weeks. Basically the db's are set to simple recovery and the first task after restoring a production copy is to dump the log.
Thanks the article and blog - very helpful reading.
costa,
MCTS: BI 2008, MCITP: BI 2008
Stay Thirsty My Friends
March 30, 2010 at 12:39 pm
cos_ta393 (3/30/2010)
Basically the db's are set to simple recovery and the first task after restoring a production copy is to dump the log.
If the database is in simple recovery, you don't need to do anything at all to the log. It's auto-truncated. Just delete that maintenance plan
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
March 30, 2010 at 12:43 pm
Absolutely. I am working on a new plan now.
Thanks for your input - really appreciated.
costa,
MCTS: BI 2008, MCITP: BI 2008
Stay Thirsty My Friends
Viewing 9 posts - 1 through 8 (of 8 total)
You must be logged in to reply to this topic. Login to reply