none
Transaction Logs Out of Control RRS feed

  • Question

  • We just finished a large migration from both 2003 and 2007 to 2010.  This is all a combination of bad timing, but here is what happened.  One of our databases had so many large users moved into it all at once, while at the same time my backup solution ran out of space, and I didn't find out about either of these problems until about 2 weeks later.  So now I have a 175GB Database, with 350,000 log files, yes, 350,000.  Because there are so many logs my backup solution can not successfully back up this database to force the logs down.  I am running out of Exchange server space and I am running out of time.  Here is my idea, please let me know if this will work.  Can I enable Circular logging for thie DB so that the logs will go down, and then run a full backup of the DB??  I have never used Circular logging so I am unfamilar with it.  Will it even reduce the number of logs I have??

    Thank you in advance for the help,

    Monday, September 12, 2011 7:21 PM

Answers

  • Correct. After you enable circualr logging, a box will tell you that it wont take effect till you dismount and remount the store.

    Do that and then once re-mounted, wait a bit for it to do its thing. With that amount of logs, I have no idea how long that will take, but it should start clearing logs after 5 minutes or so.

    Once removed, get your backup then if you want, then disable circular logging, remount and be done.

     

     

    • Marked as answer by Gavin-Zhang Tuesday, September 13, 2011 9:43 AM
    • Unmarked as answer by Gavin-Zhang Tuesday, September 13, 2011 9:43 AM
    • Proposed as answer by Gavin-Zhang Tuesday, September 13, 2011 9:44 AM
    • Marked as answer by Gavin-Zhang Thursday, September 15, 2011 3:38 AM
    Monday, September 12, 2011 7:52 PM
    Moderator
  • On Mon, 12 Sep 2011 19:52:57 +0000, AndyD_ wrote:
     
    >
    >
    >Correct. After you enable circualr logging, a box will tell you that it wont take effect till you dismount and remount the store.
    >
    >Do that and then once re-mounted, wait a bit for it to do its thing. With that amount of logs, I have no idea how long that will take, but it should start clearing logs after 5 minutes or so.
     
    I dunno. I think I'd go with starting a new log file generation.
    Dismount the database, make sure it's in a clean state, rename the log
    directory, create a new directory with the same name as the old one,
    remove the .chk file, and remount the database. Make a complete/normal
    backup immediately. Once the backup's done delete the old log
    directory you renames.
     
    >Once removed, get your backup then if you want, then disable circular logging, remount and be done.
     
    Ummm, no. Once the log files are removed disable circular logging,
    remount the DB, and THEN make a complete/normal backup of the
    database. Until the 1st complete/normal backup is done without
    circular logging you won't have a backup that can be used to restore
    the database without losses.
     
    ---
    Rich Matheisen
    MCSE+I, Exchange MVP
     

    --- Rich Matheisen MCSE+I, Exchange MVP
    • Marked as answer by Gavin-Zhang Tuesday, September 13, 2011 9:43 AM
    • Unmarked as answer by Gavin-Zhang Tuesday, September 13, 2011 9:44 AM
    • Proposed as answer by Gavin-Zhang Tuesday, September 13, 2011 9:44 AM
    • Marked as answer by Gavin-Zhang Thursday, September 15, 2011 3:39 AM
    Monday, September 12, 2011 9:41 PM

All replies

  • Yes, it will truncate the logs. It will require you to dismount and remount the store after making the change.

    You can also manually remove the logs following the methods descrived here:

    http://support.microsoft.com/kb/240145

     

    Monday, September 12, 2011 7:25 PM
    Moderator
  • Which is the best option, enable Circular or manually dismount and move the logs if I am in a clean shutdown state??  This is a huge DB with tons of logs but it is only going to take down about 30 users.  If this DB crashes the server, it will effect much more.
    Monday, September 12, 2011 7:31 PM
  • Well, I have never had to deal with that amount of logs, but if it were me, I would enable circular logging, then after it clears the logs ( and it may take awhile), I would disable circular logging and get that backup.

     

    Monday, September 12, 2011 7:43 PM
    Moderator
  • Okay, sounds good.  I will try that.  Just so I am clear what is happening, I am going to enable circular logging, it will then force me to dismount and mount that DB ONLY, and then while online it will clean up the logs.  Once the logs are clear I can get a successful backup, then disable circular logging which will prompt another dismount/mount,  correct??

    Thank you.

    Monday, September 12, 2011 7:46 PM
  • Correct. After you enable circualr logging, a box will tell you that it wont take effect till you dismount and remount the store.

    Do that and then once re-mounted, wait a bit for it to do its thing. With that amount of logs, I have no idea how long that will take, but it should start clearing logs after 5 minutes or so.

    Once removed, get your backup then if you want, then disable circular logging, remount and be done.

     

     

    • Marked as answer by Gavin-Zhang Tuesday, September 13, 2011 9:43 AM
    • Unmarked as answer by Gavin-Zhang Tuesday, September 13, 2011 9:43 AM
    • Proposed as answer by Gavin-Zhang Tuesday, September 13, 2011 9:44 AM
    • Marked as answer by Gavin-Zhang Thursday, September 15, 2011 3:38 AM
    Monday, September 12, 2011 7:52 PM
    Moderator
  • On Mon, 12 Sep 2011 19:52:57 +0000, AndyD_ wrote:
     
    >
    >
    >Correct. After you enable circualr logging, a box will tell you that it wont take effect till you dismount and remount the store.
    >
    >Do that and then once re-mounted, wait a bit for it to do its thing. With that amount of logs, I have no idea how long that will take, but it should start clearing logs after 5 minutes or so.
     
    I dunno. I think I'd go with starting a new log file generation.
    Dismount the database, make sure it's in a clean state, rename the log
    directory, create a new directory with the same name as the old one,
    remove the .chk file, and remount the database. Make a complete/normal
    backup immediately. Once the backup's done delete the old log
    directory you renames.
     
    >Once removed, get your backup then if you want, then disable circular logging, remount and be done.
     
    Ummm, no. Once the log files are removed disable circular logging,
    remount the DB, and THEN make a complete/normal backup of the
    database. Until the 1st complete/normal backup is done without
    circular logging you won't have a backup that can be used to restore
    the database without losses.
     
    ---
    Rich Matheisen
    MCSE+I, Exchange MVP
     

    --- Rich Matheisen MCSE+I, Exchange MVP
    • Marked as answer by Gavin-Zhang Tuesday, September 13, 2011 9:43 AM
    • Unmarked as answer by Gavin-Zhang Tuesday, September 13, 2011 9:44 AM
    • Proposed as answer by Gavin-Zhang Tuesday, September 13, 2011 9:44 AM
    • Marked as answer by Gavin-Zhang Thursday, September 15, 2011 3:39 AM
    Monday, September 12, 2011 9:41 PM
  •  
    Ummm, no. Once the log files are removed disable circular logging,
    remount the DB, and THEN make a complete/normal backup of the
    database. Until the 1st complete/normal backup is done without
    circular logging you won't have a backup that can be used to restore
    the database without losses.
     
    ---
    Rich Matheisen
    MCSE+I, Exchange MVP
     

    --- Rich Matheisen MCSE+I, Exchange MVP

    Fair enough. I did state to get the backup after disabling circular logging in a previous post. I guess I was just trying to be friendly.

    Monday, September 12, 2011 10:01 PM
    Moderator
  •  
    I dunno. I think I'd go with starting a new log file generation.
    Dismount the database, make sure it's in a clean state, rename the log
    directory, create a new directory with the same name as the old one,
    remove the .chk file, and remount the database. Make a complete/normal
    backup immediately. Once the backup's done delete the old log
    directory you renames.
     
    Perhaps. I think that method makes some people nervous if they havent done it before.
    Monday, September 12, 2011 10:03 PM
    Moderator
  • Hi CB333,

    Above gave some good methods for resolving your issue.
    If you still have some issue, please feel free let us know.

    Regards!
    Gavin

    TechNet Subscriber Support in forum

    If you have any feedback on our support, please contact tngfb@microsoft.com
    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

    Tuesday, September 13, 2011 9:45 AM
  • I just enabled circular logging and no new logs are being generated.  Holding steady at 336,492 logs.  I assume this will take some time, I am going to let it sit over night and I will post an update in the morning to the status.  Thank you all for your input with my problem.  Cheers.
    Wednesday, September 14, 2011 1:23 AM
  • As of this morning I am down to only about 200 logs.  This freed up almost 300GB of space and saved me from a crash.  I am going to disable circular logging tonight, dismount/mount the DB, then take a good backup.  I think we are all set.  Thank you all for the help with this.
    Wednesday, September 14, 2011 8:24 PM