by Scott Lowe
Software

How to manage database log files gone wild

December 1, 2008, 09:40 PM — 


Last week, we upgraded our ERP at Westminster College, the college at which I am the CIO.  At the same time, we moved from SQL Server 2000 to SQL Server 2005.  For the past week, our DBA has been taking manual backups of the database while our network person, who handles long-term backup, was busy with other priorities.  Unfortunately, we did not realize that the log files were growing out of control.  Our 16GB ERP database had just over 100GB of associated log files, successfully filling up the disk volume on which they were stored.

Of course, all of this happened on the same day that I was leaving for a conference and the DBA and his backup both called in sick.  So, from afar, I was on the hook to fix the problem.  I'm not an expert when it comes to SQL Server, but I do know my way around and can figure things out.  Furthermore, listserv queries to others are always handy in order to make sure that what we're seeing is truly unusual and not just a function of the new ERP or database software.

Here's what we did:

  1. I added a scratch volume from our SAN to the server so that we had some place to which we could copy files or take backups as necessary.

  2. I called the person that handles backups and asked him to make the new database server a priority to get into a permanent, automated backup schedule -- as opposed to the existing manual method -- and to take an immediate backup of the database.

  3. Once that was complete, I did a manual backup of the log files using SQL Server Management Studio.

  4. Next, I shrunk the log files  --  again, using SQL Server Management Studio.

  5. Once shrunk, I took another manual backup of the database, just for good measure.

By the end of the process, we went from having 90MB free on a 100GB volume to having 98GB free.  And, with the database server now a permanent part of the backup cycle, we shouldn't run into this problem again.

Lessons learned

I learned a couple of things from this fiasco:

  • We should have simply instituted the permanent backup solution instead of getting by with manual backups.  Next time, we'll prioritize the work differently.  Of course, all of the work is important and it's only through hindsight that we see some things that should have been handled differently.

  • No upgrade is without problems.  Of course, this is something well-known by anyone that's spent any time at all in IT, but it gets reinforced every time an upgrade happens.  No matter how much planning goes into the project, or what steps you take to get around short-term problems (in this case, taking manual backups), something will always come up.

I like it!
Post a comment
The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
Free books

Build your tech library with our book giveaways.

Hacking Exposed, Sixth Edition
By Stuart McClure, Joel Scambray, George Kurtz; Published by McGraw-Hill/Osborne

The original Hacking Exposed authors rejoin forces on this tenth anniversary edition to offer completely up-to-date coverage of today's most devastating hacks and how to prevent them. Using their proven methodology, the authors reveal how to locate and patch system vulnerabilities. The book includes new coverage of ISO images, wireless and RFID attacks, Web 2.0 vulnerabilities, anonymous hacking tools, Ubuntu, Windows Server 2008, mobile devices, and more. Enter now!

Featured Sponsor

AISO founders envisioned a Web hosting company that was environmentally friendly. While the company employed energy-efficient innovations like solar panels, its infrastructure produced unacceptable power and cooling requirements. Find out how AISO leveraged AMD technology to overcome their challenge in this case study white paper.

In this whitepaper, Scalar explores the opportunity to change the landscape with respect to mission critical databases built around Oracle. Leveraging technologies such as Linux, high-end commodity processing power and Oracle RAC technology to architect, design, build and maintain database infrastructure that delivers maximum availability, reliability and performance at a fraction of traditional cost.

On a typical day, weather.com, the Web site for The Weather Channel in Atlanta, serves up between 15 million and 20 million page views. But in September 2004, when back-to-back hurricanes ransacked Florida, the peak traffic on one day more than tripled: over 70 million page views by more than 7 million unique visitors. Read the full success story now.

Marketplace