Fixing a corrupt Log File in small downtime window 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.
If your log file is corrupt, my concern is that a backup/restore would retain the corruption.  My approach (which would probably be faster to complete) would be:


Run a full backup.
Detach database.
Delete/rename the log file.
Attach the database and rebuild the log file.
Take a second full backup.


To attach the database and rebuild the log file, it's just additional syntax in the CREATE DATABASE statement:

CREATE DATABASE [foo]
ON (FILENAME=&lt;&lt;Path to data file&gt;&gt;)
FOR ATTACH_REBUILD_LOG;


This will force SQL Server to rebuild the log file when it attaches the database.

The risk in this is losing whatever transactions happen between the completion of the full backup and detaching the database, but it sounds like this will be a minimal risk.  If you can "freeze" Sharepoint at the beginning of the downtime window, this would help mitigate that risk.