I am working with a client who has been receiving the following error from their Log backups of one of their SharePoint databases:
Backup detected log corruption in database FOOPORTAL_SP2010_Config. Context is FirstSector.
LogFile: 2 'D:\MSSQL2K8\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\FOOPORTAL_SP2010_Config_log.LDF'
VLF SeqNo: x864 VLFBase: x172d0000 LogBlockOffset: x176b1800
SectorStatus: 2 LogBlock.StartLsn.SeqNo: x771 LogBlock.StartLsn.Blk: x1f0c
Size: x400 PrevSize: x200
I understand that this is indicative of problems with the disk HW and or IO subsystem, and we have been pursuing that with the Hosting Provider. Specifically, this appears to be a "bad spot" on the/a disk, because it is consistently reported for the log file of this DB, but not other errors have been reported for the other 6 DB log backups over the last few week, nor for any of the 20+ other DB's full data backups.
My immediate issue is that the client has been running this way for several weeks, because this is a mandated 24x7 service and they haven't been able to give me a downtime service window to fix this problem until (suddenly) tonight, for 2 hours. Unfortunately, DB corruption and this kind of Admin work is not my specialty in SQL Server, and I am not certain what the best/safest/most reliable way to proceed is.
My tentative plan right now is:
- Take a full backup of the DB as soon as the downtime window starts (full backups have been working without error through out this)
- Detach the old DB
- Delete the data files for the space
- Rename the Log file (still retaining it)
- Restore a new copy of the DB from the fresh backup from step 1.
My concerns/anxiety over this are:
- Should this work? Or is htere a safer/more reliable approach?
- I only have 2 hours, so is there a more time efficient approach?
Any other suggestions are welcome.
CHKDSK
would be a worthwhile step to add. However, a bad block is usually a sign of impending doom and excluding them withCHKDSK
is just buying time.