SQLTeam.com | Weblogs | Forums

SQL Db Consistency Error

Hi,

I had problems with my sql 2008 r2 database and i dont know if this could be fixed this db was on a virtual server and was moved from the physical server "A" to Physical server "B" nothing changed, i can log an work on the dabatase almost normally without issues, the message received after the dbcc is this :

The statement has been terminated.
Msg 824, Level 24, State 2, Line 1
SQL Server detected a logical consistency-based I/O error: incorrect pageid (expected 1:4442349; actual 0:0).
It occurred during a read of page (1:4442349) in database ID 7 at offset 0x000008791da000 in file
'C:\Program Files\Microsoft SQL Server\MSSQL12.VKSQL2014\MSSQL\DATA\006.mdf'

Thanks in advance.

hi

this is a sql server developer TSQL section

i think this question is appropriate
for sql server developer DBA section
image

:+1: :+1:

You need to perform an integrity check on that database:

DBCC CHECKDB({database name here}) WITH all_errormsgs, no_infomsgs;

Once that completes, it will list all of the issues to be addressed and the options available. With that said - the ideal solution would be to restore the database from a known good backup and apply all transaction logs from that backup to current point in time.

And - you need to determine how the database was corrupted. If you don't figure that out it will happen again and the next time it could be catastrophic - as in, you could lose the entire database.

Hi jeffw8713
i dont understand about apply all the transaction logs to the current point on time so this means that i would lost the current information? on march 31 the db was stored on a virtual server hosted on physical server a and was exported to another virtual server on a physical server b.

please help me i dont know if i could do something or my database dont has solution.

thanks in advance

How important is this database to you?

How much is it worth?

Is it in any way critical?

If you are not in a position where "apply all the transaction logs to the current point in time" is meaningful to you AND the database is important/valuable/critical then asking the internet for help may be counter productive / result in even more damage if you cant assess the validity of the suggestions.

You might be best paying for external help from a specialist.

BUT, if you need to tackle this then a good place to start is with Paul Randal...


This refers to your backup/restore strategy - and how the databases are configured. The first part is how the database is configured - which is the recovery model.

Simple Recovery Model - means you can perform full and differential database backups but not transaction log backups. For recovery - you can restore a full backup and a differential backup.

Full Recovery Model - means you can perform full, differential and transaction log backups. For recovery you can restore a full backup, followed by a differential - and then any/all transaction log backups since the full/diff backup.

A general backup plan would be a daily full database backup - with frequent (every 15 minutes) transaction log backups. With this approach you can restore to any point in time up to the latest transaction log backup that is available.

For a database that is set to simple recovery model - you can only restore to the latest full backup file - and the latest available differential. You cannot restore to a specific point in time.

Before going any further - please run the integrity check as outlined and provide the output. This will tell us what is corrupted and what options are needed to correct the problem.

You should also follow @uberbloke advice - you really should hire someone to review the system and help you determine how to get that system back up and available.