SQLTeam.com | Weblogs | Forums

Error in Database after Login?

sql2012

#1

Respected Team,
I have integrated my database with SqlServer 2012.It was working Perfectly uptill.But recently the error is coming after login.

Here is the following error:-
Msg 824, Level 24, State 2, Line 1
SQL Server detected a logical consistency-based I/O error: incorrect pageid (expected 1:41978; actual 0:0). It occurred during a read of page (1:41978) in database ID 16 at offset 0x000000147f4000 in file 'D:\Program Files\RayMedi RPOS 7\database\RPOS7.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


#2

It means the database has corruption.
Run DBCC CHECKDB on the database and that will give more details.


#3

Thank 's For your Reply Sir.
But how can i get rid of the Problem?


#4

you need to restore the database with a good backup.


#5

... and fix whatever hardware (or other) problem caused the corruption in the first place :slight_smile:


#6

And all transaction log backups up to the current point in time - after taking a tail-log backup of the corrupted database. If you don't have transaction log backups set up and don't have every one of the backup files from the known good backup all the way through the current point in time - then you will lose data in that database.

Depending on the type of corruption and when it occurred you could be looking at a significant loss of data.

If you run the following - and post the results here - we may be able to help you recover the database, but most likely you are looking at a significant loss of data either way.

DBCC CHECKDB {database} WITH NO_INFOMSGS, ALL_ERRORMSGS; -- {database} = your database name


#7

Check which Table is Corrupted using

DBCC Checktable ('Your_Table_Name’). if it is corrupted then you should restore the database from a healthy backup or if you don't have a good backup then you must go with third party tool to repair corrupt .mdf file in SQL server database.