MSSQLTips.com - your daily source for SQL Server tips

Google
 
Web mssqltips.com

ESSENTIALS: Home | Tips | Search | Categories | Top 10 | Products | Authors | Blogs | Forums | Webcasts | Advertise | About
Issues with running backup log with no_log or truncate_only - MSSQLTips

MSSQLTips

MSSQLTips.com - your daily source for SQL Server tips
Welcome to MSSQLTips Sign in | Join | Help
in Search

Issues with running backup log with no_log or truncate_only

Last post 04-11-2008 10:25 AM by grobido. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 03-27-2008 12:30 AM

    Issues with running backup log with no_log or truncate_only

    This post is related to this tip: Issues with running backup log with no_log or truncate_only

    http://www.mssqltips.com/tip.asp?tip=1464

  • 03-27-2008 12:24 PM In reply to

    • mikeb
    • Top 500 Contributor
    • Joined on 03-27-2008
    • Posts 1

    Re: Issues with running backup log with no_log or truncate_only

    There are some run-away log situations in SQL 2000/2005 where there is no other way to reduce the log file size unless you truncate it and do a shrinkfile on it. You can try many things like backing up the log, shrinking the log, adding dummy transactions like suggested by some kb articles but the log will never become smaller. In such cases, there is no harm in using this command to truncate the log (to be safe do a log backup before doing the truncation), do a shrinkfile on the log file and immediately do a FULL database backup.

    Switching to simple recovery mode is not an alternative since you can't anyway do transaction log backups in simple recovery mode. The best option when you run into a run-away log situation is to do the backup with no_log, shrink the log file and then immediately backup the database.

     

  • 04-10-2008 6:31 AM In reply to

    Re: Issues with running backup log with no_log or truncate_only

    There is nothing wrong with using truncate only and no_log in your nightly scripts as long as they are followed immediately with a full backup. Once again Microsoft thinks everybody lives in a perfect world. In the future when this useful statement is taken away from us, what will we do to regain valuable log space?

  • 04-11-2008 10:25 AM In reply to

    • grobido
    • Top 10 Contributor
    • Joined on 10-11-2007
    • Wilton, NH
    • Posts 66

    Re: Issues with running backup log with no_log or truncate_only

    The functionality won't totally disappear it is just that you will need to change the recovery model for this to clear the transaction log.

     I do agree there that this is needed, but as long as you use this and take another full backup right afterwards you should be covered.

Page 1 of 1 (4 items)