Wednesday, September 3, 2008

Thankfully the backups were good

I got a call from our System Administrator this morning telling me that the main database for a financial system was suspect. In 9 years of working with SQL Server I'd only dealt with this once and that was last fall with a suspect msdb. The last time I had no backups of msdb so I had to rebuild it and then rebuild all the jobs. As a side note, I was not made aware of this key departmental SQL Server until after the problem. Needless to say I started gettting backups of the system databases. After this occurred we upgraded from SQL Server 2000 to 2005 and moved the databases to a true server in our climate controlled server room with UPS and generator power backups. It was a brand new server purchased in the 1st quarter of this year.

This time I had backups and had the database restored in under 15 minutes to a point withing 3 minutes of the failure. Unfortunately there were no errors in either the SQL Server Error logs or the Windows Event logs. We'll have to watch the server for errors as we go forward. This was also the first time I had run a point in time restore using the STOPAT parameter of the RESTORE command. I'm glad I was able to get everything up and running quickly after pushing to have the databases moved to a central SQL Server that I could manage and monitor.

After restoring I did a DBCC CheckDB which found consistency errors in an index on one table. So, before releasing the database to the users I dropped and recreated the index to fix that error as well. Again the first time I've had a consistency error to fix as well.

As you can see, even though I've been working with SQL Server for many years, there are still many issues I have yet to deal with, and, to be honest, I hope I never have to deal with anything more complex than I did today.

No comments:

Post a Comment

So what do you think I am?