Quantcast
Channel: Question and Answer » data-integrity
Viewing all articles
Browse latest Browse all 10

CheckDB error 9003 SQL server 2014

$
0
0

Currently I am restoring SAN snapshots to another server nightly and running weekly checkdbs on that test server. The checkdb is throwing the following errors.

The log scan number (105217:402:0) passed to log scan in database
‘db_with_error’ is not valid. This error may indicate data corruption
or that the log file (.ldf) does not match the data file (.mdf). If
this error occurred during replication, re-create the publication.
Otherwise, restore from backup if the problem results in a failure
during startup.

I have used the following to resolve the checkdb error.

EXECUTE dbo.DatabaseIntegrityCheck
@Databases = 'db_with_error',
@CheckCommands = 'CHECKDB'

EXEC sp_resetstatus 'db_with_error';

ALTER DATABASE db_with_error SET EMERGENCY;

dbcc checkdb ('db_with_error')

ALTER DATABASE db_with_error SET SINGLE_USER WITH ROLLBACK IMMEDIATE;

ALTER DATABASE db_with_error SET multi_user WITH ROLLBACK IMMEDIATE;

ALTER DATABASE db_with_error SET online;
EXECUTE dbo.DatabaseIntegrityCheck
@Databases = 'db_with_error',
@CheckCommands = 'CHECKDB'

Why is the above resolving the error?

Things to note that the test server is running 12.0.2495 and the prod server is running 11.0.5548. Also the prod server is apart of an availability group which is in good standing as I understand it.


Viewing all articles
Browse latest Browse all 10

Latest Images

Trending Articles



Latest Images