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 2005
»
Backups
»
Best Practice Advice on Trans Logs, how to...
Best Practice Advice on Trans Logs, how to automate
Rate Topic
Display Mode
Topic Options
Author
Message
mark_copley
mark_copley
Posted Monday, November 16, 2009 8:50 AM
SSC Veteran
Group: General Forum Members
Last Login: Wednesday, May 15, 2013 11:37 AM
Points: 232,
Visits: 201
All -
Looking for best practice or way to keep transaction logs cleaned up. Working with (5) test region databases , all set to Simple Recovery. I have saw where Best Practices wants you to stay away from Shrinking the database regularly but wondered if there is some code to run regularly that would keep transaction logs trimmed down to acceptable levels. I thought of doing a Check Point then maybe a ShrinkFile on the log file but looking for opinons on that.
Example:
Use myDatabase1;
checkpoint
dbcc shrinkfile (myDatabase1_log, 15)
Any and all help appreciated, thanks !
Post #819433
GilaMonster
GilaMonster
Posted Monday, November 16, 2009 8:56 AM
SSC-Dedicated
Group: General Forum Members
Last Login: Today @ 5:54 AM
Points: 37,726,
Visits: 29,985
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 #819443
mark_copley
mark_copley
Posted Monday, November 16, 2009 9:25 AM
SSC Veteran
Group: General Forum Members
Last Login: Wednesday, May 15, 2013 11:37 AM
Points: 232,
Visits: 201
I have read thru the Managing Transact Logs document but was kind of wanting some practical information. Like is the accepted practice to monitor transaction log files regularly and if they get to big, run a checkpoint and shrinkfile on the log file. (simple recovery)
Thanks
Post #819467
GilaMonster
GilaMonster
Posted Monday, November 16, 2009 9:31 AM
SSC-Dedicated
Group: General Forum Members
Last Login: Today @ 5:54 AM
Points: 37,726,
Visits: 29,985
The accepted practice is to size them for the workload (regardless of recovery model) and leave them alone.
Shrinking a log is a bad idea unless it's after an unusual operation and you know absolutely 100% that the log does not need to be that size. Repeated shrink/grow leaves you with lots of little VLFs in the log (slows down database recovery) and file-level fragmentation. Neither of which is something you want.
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 #819471
mark_copley
mark_copley
Posted Monday, November 16, 2009 9:35 AM
SSC Veteran
Group: General Forum Members
Last Login: Wednesday, May 15, 2013 11:37 AM
Points: 232,
Visits: 201
Thanks I really appreciate the information.
Post #819477
« 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.