Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase 12»»

SQL Server detected a logical consistency-based I/O error Expand / Collapse
Author
Message
Posted Tuesday, February 25, 2014 9:13 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Monday, March 17, 2014 2:28 AM
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…..
Post #1545204
Posted Wednesday, February 26, 2014 12:36 AM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Yesterday @ 1:13 PM
Points: 40,428, Visits: 36,879
Restore from a clean backup (backup taken before the corruption occurred)


Gail Shaw
Microsoft Certified Master: SQL Server 2008, MVP
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

Post #1545232
Posted Wednesday, February 26, 2014 2:03 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Monday, March 17, 2014 2:28 AM
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
Post #1545268
Posted Wednesday, February 26, 2014 2:52 AM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Yesterday @ 1:13 PM
Points: 40,428, Visits: 36,879
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>) 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 2008, MVP
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

Post #1545283
Posted Wednesday, February 26, 2014 4:12 AM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Friday, November 21, 2014 7:37 AM
Points: 2,127, Visits: 1,485
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?
Post #1545313
Posted Wednesday, February 26, 2014 4:21 AM


Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Yesterday @ 3:33 PM
Points: 397, Visits: 785
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
Post #1545323
Posted Wednesday, February 26, 2014 6:00 AM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Yesterday @ 1:13 PM
Points: 40,428, Visits: 36,879
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 2008, MVP
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

Post #1545350
Posted Wednesday, February 26, 2014 6:23 AM


Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Monday, November 24, 2014 4:53 AM
Points: 3,422, Visits: 5,368
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!
Post #1545365
Posted Wednesday, February 26, 2014 7:36 AM


Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Yesterday @ 5:46 AM
Points: 312, Visits: 3,530
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


I'm a DBA.
I'm not paid to solve problems. I'm paid to prevent them.
Post #1545395
Posted Wednesday, February 26, 2014 5:22 PM


Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Monday, November 24, 2014 4:53 AM
Points: 3,422, Visits: 5,368
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


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!
Post #1545646
« Prev Topic | Next Topic »

Add to briefcase 12»»

Permissions Expand / Collapse