Showing posts with label torn. Show all posts
Showing posts with label torn. Show all posts

Tuesday, February 14, 2012

Corrupted distribution.mdf

We have started getting the following in the application event log:
Error: 823, Severity: 24, State: 2
I/O error (torn page) detected during read at offset 0x00000015ba000 in file
'd:\sqldata\MSSQL\Data\distribution.MDF'.
and is being generated during distribution cleanup.
We have NO backup of the distribution database.
How can I repair the database?
In hopes to recreate replication, I've tried to disable publishing and
distribution, but I get the following error:
SQL Server Enterprice manager could not disable the distribution on xxxxx
Error 823: I/O error (torn page) detected during read at offset
0x0000001115ba00 in file .../distribution.MDF
Also ran DBCC CHECKDB and get:
... CHECKDB found 0 allocation errors and 2 consistency errors in database
'distribution'.
repair_allow_data_loss is the minimum repair level for the errors found by
DBCC CHECKDB (distribution ) ...
It's seems I can't run the repair_allow_data_loss on the the distribution
database even if in single user mode. (tried starting in single user mode,
but can't get in query analyzer to run the repair - is there another way?)
Any Ideas on repairing/rebuilding the database would be appreciated.
resolved myself by:
- generate creation script to recreate current replication configuration
- manually deleting distribution database
- disable publishing and distribution
- run creation script