Log in
::
Register
::
Not logged in
Home
Tags
Articles
Editorials
Stairways
Forums
Scripts
Videos
Blogs
QotD
Books
Ask SSC
SQL Jobs
Training
Authors
About us
Contact us
Newsletters
Write for us
Recent Posts
Recent Posts
Popular Topics
Popular Topics
Home
Search
Members
Calendar
Who's On
Home
»
SQL Server 2008
»
T-SQL (SS2K8)
»
Do you really need the log file
Do you really need the log file
Rate Topic
Display Mode
Topic Options
Author
Message
mike 57299
mike 57299
Posted Tuesday, February 05, 2013 10:28 PM
SSC-Enthusiastic
Group: General Forum Members
Last Login: Monday, February 18, 2013 12:05 PM
Points: 110,
Visits: 256
We have a 70 GB mdf w/ a 29GB ldf. After doing full backup, can I truncate the log via the following plan:
<Break mirroring>
alter database xxx set recovery simple
< right click - properties - files - set size to 5GB >
alter database xxx set recovery full
<Reset mirroring>
What do I lose by truncating the log after a full backup?
Thanks,
Mike
Post #1416238
Lynn Pettis
Lynn Pettis
Posted Tuesday, February 05, 2013 11:30 PM
SSC-Insane
Group: General Forum Members
Last Login: Today @ 8:19 AM
Points: 21,625,
Visits: 27,471
One, the ability to do point in time recovery of the database if it is needed. Having a mirror database is good for high availability but it doesn't replace the need for a good set of backups from which to recover if necessary.
Second, breaking and re-establishing the mirror is not really the best thing you can do.
Why do you want to truncate the log, or is shrinking the log what you are actually talking about. They are two entirely different things.
Lynn Pettis
For better assistance in answering your questions, click here
For tips to get better help with Performance Problems, click here
For Running Totals and its variations, click here
or
when working with partitioned tables
For more about Tally Tables, click here
For more about Cross Tabs and Pivots, click here
and
here
Managing Transaction Logs
SQL Musings from the Desert
Fountain Valley SQL
(My Mirror Blog)
Post #1416257
mike 57299
mike 57299
Posted Tuesday, February 05, 2013 11:41 PM
SSC-Enthusiastic
Group: General Forum Members
Last Login: Monday, February 18, 2013 12:05 PM
Points: 110,
Visits: 256
We are running out of space on our mirror server. I though that if I could reduce the log, it would give us some breathing room while we figure out a solution.
We do daily backups at 11pm, a diff backup at 6am and hourly transaction logs from 7 am - 6 pm - plus the mirroring.
I don't think the shrink would work. It hasn't in the past when I restore a backup to my local machine.
Mike
Post #1416259
GilaMonster
GilaMonster
Posted Wednesday, February 06, 2013 12:31 AM
SSC-Dedicated
Group: General Forum Members
Last Login: Today @ 8:25 AM
Points: 37,738,
Visits: 30,011
You can't switch to simple recovery with active database mirroring. You'll need to completely drop the database mirroring setup, then you can change recovery models. Recreating the mirror will require copying over and restoring a full or diff backup. That's a fair bit of work and you'll be completely without the mirror while that's done.
We do daily backups at 11pm, a diff backup at 6am and hourly transaction logs from 7 am - 6 pm - plus the mirroring.
That's probably part of the cause of the large log, the lack of log backups for 13 hours a day. I suggest log backups on the hour, every hour.
Gail Shaw
Microsoft Certified Master: SQL Server 2008, MVP
SQL In The Wild
: Discussions on DB performance with occasional diversions into recoverability
We walk in the dark places no others will enter
We stand on the bridge and no one may pass
Post #1416281
mike 57299
mike 57299
Posted Wednesday, February 06, 2013 7:59 AM
SSC-Enthusiastic
Group: General Forum Members
Last Login: Monday, February 18, 2013 12:05 PM
Points: 110,
Visits: 256
We do hourly transaction log backups during the work day.
Mike
Post #1416521
anthony.green
anthony.green
Posted Wednesday, February 06, 2013 8:06 AM
SSCertifiable
Group: General Forum Members
Last Login: Friday, April 12, 2013 3:51 AM
Points: 5,075,
Visits: 4,831
Between 6pm and 7am you dont do transaction log backups, during that time the log cannot be marked as re-usable so that is why you have a huge transaction log as you have 13 hours worth of transactions waiting to be backed up.
Do your transaction logs every hour on the hour all day, not just during the working day.
Want an answer fast? Try here
How to post data/code for the best help - Jeff Moden
Need a string splitter, try this - Jeff Moden
How to post performance problems - Gail Shaw
CrossTabs-Part1
&
Part2 - Jeff Moden
SQL Server Backup, Integrity Check, and Index and Statistics Maintenance - Ola Hallengren
Managing Transaction Logs - Gail Shaw
Troubleshooting SQL Server: A Guide for the Accidental DBA - Jonathan Kehayias and Ted Krueger
Post #1416525
mike 57299
mike 57299
Posted Wednesday, February 06, 2013 9:10 AM
SSC-Enthusiastic
Group: General Forum Members
Last Login: Monday, February 18, 2013 12:05 PM
Points: 110,
Visits: 256
A full backup doesn't set the log to re-usable?
Post #1416578
GilaMonster
GilaMonster
Posted Wednesday, February 06, 2013 9:24 AM
SSC-Dedicated
Group: General Forum Members
Last Login: Today @ 8:25 AM
Points: 37,738,
Visits: 30,011
mike 57299 (2/6/2013)
A full backup doesn't set the log to re-usable?
No.
Please read through this -
Managing Transaction Logs
Gail Shaw
Microsoft Certified Master: SQL Server 2008, MVP
SQL In The Wild
: Discussions on DB performance with occasional diversions into recoverability
We walk in the dark places no others will enter
We stand on the bridge and no one may pass
Post #1416593
« Prev Topic
|
Next Topic »
Permissions
You
cannot
post new topics.
You
cannot
post topic replies.
You
cannot
post new polls.
You
cannot
post replies to polls.
You
cannot
edit your own topics.
You
cannot
delete your own topics.
You
cannot
edit other topics.
You
cannot
delete other topics.
You
cannot
edit your own posts.
You
cannot
edit other posts.
You
cannot
delete your own posts.
You
cannot
delete other posts.
You
cannot
post events.
You
cannot
edit your own events.
You
cannot
edit other events.
You
cannot
delete your own events.
You
cannot
delete other events.
You
cannot
send private messages.
You
cannot
send emails.
You
may
read topics.
You
cannot
rate topics.
You
cannot
vote within polls.
You
cannot
upload attachments.
You
may
download attachments.
You
cannot
post HTML code.
You
cannot
edit HTML code.
You
cannot
post IFCode.
You
cannot
post JavaScript.
You
cannot
post EmotIcons.
You
cannot
post or upload images.
Copyright © 2002-2013 Simple Talk Publishing. All Rights Reserved.
Privacy Policy.
Terms of Use.
Report Abuse.