Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


SQL Server detected a logical consistency-based I/O error


SQL Server detected a logical consistency-based I/O error

Author
Message
VIII
VIII
Forum Newbie
Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)

Group: General Forum Members
Points: 4 Visits: 33
First, when I run this sql : select * from mydatabase.dbo.mytable, I got this

Msg 824
SQL Server detected a logical consistency-based I/O error: incorrect pageid (expected 1:2412; actual 0:0). It occurred during a read of page (1:2412) in database ID 5 at offset 0x000000012d8000 in file 'mydatabase.mdf'. Additional messages in the SQL Server error log or system event log may provide more detail. This is a severe error condition that threatens database integrity and must be corrected immediately. Complete a full database consistency check (DBCC CHECKDB). This error can be caused by many factors; for more information, see SQL Server Books Online.

Second, when I run DBCC CHECKDB ('mydatabase') WITH NO_INFOMSGS, ALL_ERRORMSGS, I got same message

Msg 824
SQL Server detected a logical consistency-based I/O error: incorrect pageid (expected 1:2412; actual 0:0). It occurred during a read of page (1:2412) in database ID 13 at offset 0x000000012d8000 in file 'mydatabase.mdf:MSSQL_DBCC13'. Additional messages in the SQL Server error log or system event log may provide more detail. This is a severe error condition that threatens database integrity and must be corrected immediately. Complete a full database consistency check (DBCC CHECKDB). This error can be caused by many factors; for more information, see SQL Server Books Online.

Third, I right click on database, Properties, and

TITLE: Microsoft SQL Server Management Studio
------------------------------

Cannot show requested dialog.

------------------------------
ADDITIONAL INFORMATION:

Cannot show requested dialog. (SqlMgmt)

------------------------------

Property Size is not available for Database 'mydatabase'. This property may not exist for this object, or may not be retrievable due to insufficient access rights. (Microsoft.SqlServer.Smo)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=10.50.1600.1+((KJ_RTM).100402-1540+)&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.PropertyCannotBeRetrievedExceptionText&EvtID=Size&LinkId=20476

------------------------------
BUTTONS:

OK
------------------------------

Can you suggest me to resolve this please…. I am using sql server 2008 r2

Can you please let me know if you need any other details….

Thank you in Advance…..

GilaMonster
GilaMonster
SSC-Forever
SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)

Group: General Forum Members
Points: 47279 Visits: 44392
Restore from a clean backup (backup taken before the corruption occurred)


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


VIII
VIII
Forum Newbie
Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)

Group: General Forum Members
Points: 4 Visits: 33
GilaMonster (2/26/2014)
Restore from a clean backup (backup taken before the corruption occurred)


I don't have clean backup. For some reason, my customer stopped weekly backup and the last backup is several month ago
GilaMonster
GilaMonster
SSC-Forever
SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)

Group: General Forum Members
Points: 47279 Visits: 44392
I hope that database isn't very important... It's very likely there will be some data loss here, it's possible that said data loss could be the entire DB.

Find some downtime, take the database into single user mode (make sure you get the single connection) and run the following (just the following, exactly as it is with no extra options, settings or switches)

DBCC CheckDB(<Database Name>Wink WITH NO_INFOMSGS, ALL_ERRORMSGS, TABLOCK


Let's see if that will give anything useful in terms of the actual errors.


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


Lempster
Lempster
SSCrazy
SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)

Group: General Forum Members
Points: 2683 Visits: 1657
VIII (2/26/2014)
GilaMonster (2/26/2014)
Restore from a clean backup (backup taken before the corruption occurred)


I don't have clean backup. For some reason, my customer stopped weekly backup and the last backup is several month ago


One question: why is your customer taking (or not taking) backups? Isn't that your job as a DBA?
Kenny Jozi
Kenny Jozi
Say Hey Kid
Say Hey Kid (684 reputation)Say Hey Kid (684 reputation)Say Hey Kid (684 reputation)Say Hey Kid (684 reputation)Say Hey Kid (684 reputation)Say Hey Kid (684 reputation)Say Hey Kid (684 reputation)Say Hey Kid (684 reputation)

Group: General Forum Members
Points: 684 Visits: 1275
I don't have clean backup. For some reason, my customer stopped weekly backup and the last backup is several month ago


Since you don't have backup , try to repair the database,

TRY

ALTER DATABASE corrupted_db SET SINGLE_USER WITH ROLLBACK IMMEDIATE
DBCC ChECKDB ('corrupted_db', REPAIR_ALLOW_DATA_LOSS)
ALTER DATABASE corrupted_db SET MULTI_USER



CAUTION : There is a high chance of data loss

If you mange to get database online, make sure you implement database backup strategy

SQL 2000/2005/2008/2012 DBA - MCTS/MCITP
GilaMonster
GilaMonster
SSC-Forever
SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)

Group: General Forum Members
Points: 47279 Visits: 44392
kenneth.mofokeng (2/26/2014)
I don't have clean backup. For some reason, my customer stopped weekly backup and the last backup is several month ago


Since you don't have backup , try to repair the database,

TRY

ALTER DATABASE corrupted_db SET SINGLE_USER WITH ROLLBACK IMMEDIATE
DBCC ChECKDB ('corrupted_db', REPAIR_ALLOW_DATA_LOSS)
ALTER DATABASE corrupted_db SET MULTI_USER



NO! NO! NO!
Recommending repairing with no idea of what's actually wrong is insane! We don't even know what the errors are, a sensible recommendation cannot be made on no data. When dealing with corrupt databases the extent of the corruption is essential to know before any useful recommendations can be made. To be honest, since CheckDB's throwing errors I suspect repair will not be a option, it'll likely fail as well.

DO NOT attempt a repair at this point.


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


dwain.c
dwain.c
SSCarpal Tunnel
SSCarpal Tunnel (4.3K reputation)SSCarpal Tunnel (4.3K reputation)SSCarpal Tunnel (4.3K reputation)SSCarpal Tunnel (4.3K reputation)SSCarpal Tunnel (4.3K reputation)SSCarpal Tunnel (4.3K reputation)SSCarpal Tunnel (4.3K reputation)SSCarpal Tunnel (4.3K reputation)

Group: General Forum Members
Points: 4259 Visits: 6431
kenneth.mofokeng (2/26/2014)
I don't have clean backup. For some reason, my customer stopped weekly backup and the last backup is several month ago


Since you don't have backup , try to repair the database,

TRY

ALTER DATABASE corrupted_db SET SINGLE_USER WITH ROLLBACK IMMEDIATE
DBCC ChECKDB ('corrupted_db', REPAIR_ALLOW_DATA_LOSS)
ALTER DATABASE corrupted_db SET MULTI_USER



CAUTION : There is a high chance of data loss

If you mange to get database online, make sure you implement database backup strategy


Odd. I'd always heard that what's important is to have a recovery strategy.


My mantra: No loops! No CURSORs! No RBAR! Hoo-uh!

My thought question: Have you ever been told that your query runs too fast?

My advice:
INDEXing a poor-performing query is like putting sugar on cat food. Yeah, it probably tastes better but are you sure you want to eat it?
The path of least resistance can be a slippery slope. Take care that fixing your fixes of fixes doesn't snowball and end up costing you more than fixing the root cause would have in the first place.


Need to UNPIVOT? Why not CROSS APPLY VALUES instead?
Since random numbers are too important to be left to chance, let's generate some!
Learn to understand recursive CTEs by example.
Splitting strings based on patterns can be fast!
My temporal SQL musings: Calendar Tables, an Easter SQL, Time Slots and Self-maintaining, Contiguous Effective Dates in Temporal Tables
andrew gothard
andrew gothard
Mr or Mrs. 500
Mr or Mrs. 500 (521 reputation)Mr or Mrs. 500 (521 reputation)Mr or Mrs. 500 (521 reputation)Mr or Mrs. 500 (521 reputation)Mr or Mrs. 500 (521 reputation)Mr or Mrs. 500 (521 reputation)Mr or Mrs. 500 (521 reputation)Mr or Mrs. 500 (521 reputation)

Group: General Forum Members
Points: 521 Visits: 5530
dwain.c (2/26/2014)
kenneth.mofokeng (2/26/2014)
I don't have clean backup. For some reason, my customer stopped weekly backup and the last backup is several month ago


Since you don't have backup , try to repair the database,

TRY

ALTER DATABASE corrupted_db SET SINGLE_USER WITH ROLLBACK IMMEDIATE
DBCC ChECKDB ('corrupted_db', REPAIR_ALLOW_DATA_LOSS)
ALTER DATABASE corrupted_db SET MULTI_USER



CAUTION : There is a high chance of data loss

If you mange to get database online, make sure you implement database backup strategy


Odd. I'd always heard that what's important is to have a FREQUENTLY TESTED recovery strategy.


FTFY :-D

I'm a DBA.
I'm not paid to solve problems. I'm paid to prevent them.
dwain.c
dwain.c
SSCarpal Tunnel
SSCarpal Tunnel (4.3K reputation)SSCarpal Tunnel (4.3K reputation)SSCarpal Tunnel (4.3K reputation)SSCarpal Tunnel (4.3K reputation)SSCarpal Tunnel (4.3K reputation)SSCarpal Tunnel (4.3K reputation)SSCarpal Tunnel (4.3K reputation)SSCarpal Tunnel (4.3K reputation)

Group: General Forum Members
Points: 4259 Visits: 6431
andrew gothard (2/26/2014)
dwain.c (2/26/2014)
kenneth.mofokeng (2/26/2014)
I don't have clean backup. For some reason, my customer stopped weekly backup and the last backup is several month ago


Since you don't have backup , try to repair the database,

TRY

ALTER DATABASE corrupted_db SET SINGLE_USER WITH ROLLBACK IMMEDIATE
DBCC ChECKDB ('corrupted_db', REPAIR_ALLOW_DATA_LOSS)
ALTER DATABASE corrupted_db SET MULTI_USER



CAUTION : There is a high chance of data loss

If you mange to get database online, make sure you implement database backup strategy


Odd. I'd always heard that what's important is to have a FREQUENTLY TESTED recovery strategy.


FTFY :-D


I stand corrected sir!


My mantra: No loops! No CURSORs! No RBAR! Hoo-uh!

My thought question: Have you ever been told that your query runs too fast?

My advice:
INDEXing a poor-performing query is like putting sugar on cat food. Yeah, it probably tastes better but are you sure you want to eat it?
The path of least resistance can be a slippery slope. Take care that fixing your fixes of fixes doesn't snowball and end up costing you more than fixing the root cause would have in the first place.


Need to UNPIVOT? Why not CROSS APPLY VALUES instead?
Since random numbers are too important to be left to chance, let's generate some!
Learn to understand recursive CTEs by example.
Splitting strings based on patterns can be fast!
My temporal SQL musings: Calendar Tables, an Easter SQL, Time Slots and Self-maintaining, Contiguous Effective Dates in Temporal Tables
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