SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Help with 250 million row table and Suspect mode


Help with 250 million row table and Suspect mode

Author
Message
linkusnet
linkusnet
Forum Newbie
Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)

Group: General Forum Members
Points: 2 Visits: 20
ICBM came up in suspect
Errorlog reported a torn page.

USE master

go

update sysdatabases set status=32768 where name='ICBM'

restart SQL server

dbcc checkdb('ICBM', NOINDEX) with all_errormsgs, no_infomsgs

Server: Msg 2515, Level 16, State 1, Line 7
Page (1:16881268), object ID 751341741, index ID 0 has been modified but is not marked modified in the differential backup bitmap.
Server: Msg 8928, Level 16, State 1, Line 7
Object ID 751341741, index ID 0: Page (1:18360105) could not be processed. See other errors for details.
Server: Msg 8939, Level 16, State 1, Line 7
Table error: Object ID 751341741, index ID 0, page (1:18360105). Test (IS_ON (BUF_IOERR, bp->bstat) && bp->berrcode) failed. Values are 2057 and -1.
Server: Msg 8928, Level 16, State 1, Line 7
Object ID 751341741, index ID 0: Page (1:18659809) could not be processed. See other errors for details.
Server: Msg 8939, Level 16, State 1, Line 7
Table error: Object ID 751341741, index ID 0, page (1:18659809). Test (IS_ON (BUF_IOERR, bp->bstat) && bp->berrcode) failed. Values are 2057 and -1.
Server: Msg 8928, Level 16, State 1, Line 7
Object ID 751341741, index ID 0: Page (1:18699033) could not be processed. See other errors for details.
Server: Msg 8939, Level 16, State 1, Line 7
Table error: Object ID 751341741, index ID 0, page (1:18699033). Test (IS_ON (BUF_IOERR, bp->bstat) && bp->berrcode) failed. Values are 2057 and -1.
CHECKDB found 0 allocation errors and 7 consistency errors in table 'inv_detail_rtest' (object ID 751341741).
CHECKDB found 0 allocation errors and 7 consistency errors in database 'ICBM'.
repair_allow_data_loss is the minimum repair level for the errors found by DBCC CHECKDB (ICBM noindex).

Table inv_detail_rtest is objectid 751341741.

I did DBCC PAGE on each of the pages listed and looked at the few rows that are bad. Each row is about 800 bytes so there are not many rows per page therefore not many bad rows.

*** How can I run DBCC CHECKDB with REPAIR DATA LOSS?? or how do I manually delete the bad pages.
*** I get "You are in recovery bypass mode" and can't do anything and I can't get Single User mode to stick.



exec sp_configure 'allow updates', 1

exec sp_dboption 'ICBM', 'single_user', 'true'

RECONFIGURE WITH OVERRIDE

DBCC CHECKDB('ICBM', REPAIR_ALLOW_DATA_LOSS)

Configuration option 'allow updates' changed from 1 to 1. Run the RECONFIGURE statement to install.
Server: Msg 7919, Level 16, State 2, Line 7
Repair statement not processed. Database needs to be in single user mode.
DBCC execution completed. If DBCC printed error messages, contact your system administrator.




It's a 330 GB database and I have a backup from Tuesday night but I don't have 330GB available on this server to restore the Backup Exec data. I can't find a way to restore the pages I need from Backup Exec. I don't have extra slots in the RAID cage and I don't have the drives even if I did and it's a 2 hour drive to the datacenter. There was a power failure Wednesday afternoon that caused the issue. I'm moving to a new data center ASAP, by the way. I spent yesterday on google.

THANKS!!
GilaMonster
GilaMonster
SSC Guru
SSC Guru (87K reputation)SSC Guru (87K reputation)SSC Guru (87K reputation)SSC Guru (87K reputation)SSC Guru (87K reputation)SSC Guru (87K reputation)SSC Guru (87K reputation)SSC Guru (87K reputation)

Group: General Forum Members
Points: 87269 Visits: 45272
Best bet - drop the database and restore from backup (make space, get an external drive if necessary)

There's no way to manually drop the damaged pages, that's what checkDB is for, but that seems to not be a workable solution at the moment.

If you just run this, what's the output? (no reconfigure needed for setting to single user mode)

exec sp_dboption 'ICBM', 'single_user', 'true'



Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass


linkusnet
linkusnet
Forum Newbie
Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)

Group: General Forum Members
Points: 2 Visits: 20
Actually, I kept digging and found the database was put into Full log mode instead of Simple during the power outage.

There was an event in Event Viewer that said it had a bad transaction log.

So I rebuilt the transaction log.
Changed status back to 0.
Restarted server.
Database came back up in regular mode.

Immediately put it in Single User and started DBCC CHECKDB. It took 1 hour 2 minutes and had a bunce of non-clustered index errors and the 4 or 5 page errors from above.

T
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search