Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 Data Corruption Issues
 After the DBCC storm

Author  Topic 

bs
Starting Member

2 Posts

Posted - 2008-03-11 : 12:03:13
After a series of IT inspired power cycles, I woke up to a Suspect database last week. I'm not a DBA but am the sole user of a Sql Server 2005 reporting database running on Server 2003. My last backup was from September (ridicule accepted) and I've been using a Simple instead of Full recovery strategy due to limited space.

After much research here, BOL, googling, etc. I managed to determine that I had a torn page. Many thanks for your years of collected wisdom! Emergency mode gave me some leverage, and I generated scripts for all of the objects and dumped the data out to new database on an external drive. DBCC with REPAIR_ALLOW_DATA_LOSS was eventually able to fix the problem, and as of right now it feels like the storm has passed.

My question is: am I safe to keep using this database? I don't believe that it's a hardware problem, since this is the first time I've had this issue and IT has admitted to power outages during their upgrades. Although I have one new database created from the generated scripts and one new database created from the data dump, assembling the identities and indexes would be quite a chore for 200 tables (or would it?).

It's working fine, I'm backing it all up tonight and setting up an actual strategy for backup/recovery.

Bite the bullet or cross the fingers?


tia-
Ben

dataguru1971
Master Smack Fu Yak Hacker

1464 Posts

Posted - 2008-03-11 : 12:29:08
Use it, but you might want to back more frequently from now on.



Poor planning on your part does not constitute an emergency on my part.

Go to Top of Page

bs
Starting Member

2 Posts

Posted - 2008-03-11 : 14:36:51
Thanks, guru, for being gentle.

As an amateur DBA, I needed this reassurance but found conflicting advice online. Unless someone says otherwise, provided one has identified and eliminated the root cause of the consistency error, after DBCC fixes a database it's (almost) as good as new.

Much obliged.
Go to Top of Page

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2008-03-11 : 16:08:59
create a backup, restore that backup and perform a dbcc checkdb on the restored backup.
if that works you're ok.

_______________________________________________
Causing trouble since 1980
blog: http://weblogs.sqlteam.com/mladenp
SSMS Add-in that does a few things: www.ssmstoolspack.com
Go to Top of Page

paulrandal
Yak with Vast SQL Skills

899 Posts

Posted - 2008-03-27 : 20:17:04
The torn page is most likely directly related to the power failures. If this is an important DB, get it onto some drives that have enough battery in them to allow the cache to be flushed before power is lost.

Sounds like you've got it sorted out. Given that you're on SS2005, I would move to page checksums rather than torn-page protection as it gives you more protection. ALTER DATABASE yourdb SET PAGE_VERIFY CHECKSUM. Search my blog for page checkums for a bunch more info.

Thanks

Paul Randal
Managing Director, SQLskills.com
Go to Top of Page
   

- Advertisement -