Re: Droping suspect publication database

From: Adrian Mos (AdrianMos_at_discussions.microsoft.com)
Date: 11/23/04


Date: Tue, 23 Nov 2004 11:17:02 -0800

1. Put the db into EMERGENCY BYPASS STATUS (32768)
-- so you can rebuild the log
sp_configure 'allow', 1
go
reconfigure with override

update sysdatabases
set status = -32768
where name='yourDBname'

2. Stop sql server - rename log file (You will delete
it later)

3. Start sql server. Rebuild the log.

dbcc rebuild_log
('yourDBname', 'TheDriveForLogFiles:\PathToLogFiles\logfilename.ldf')

3. Put db back from EMERGENCY BYPASS STATUS (32768) to
status 16

update sysdatabases
set status = 16 -- or 24
where 'yourDBname'

4. Clean up
sp_configure 'allow', 0
go
reconfigure with override

Now you have solved the most probable cause of your 'Suspect’ status: a
corrupted log file. After this you have a clean log file and SQL will be able
to start the DB not heaving to roll back or forward corrupted transactions.
Then you can run DBCC CheckDB to see if the data file is OK or you can drop
the database as you wish.



Relevant Pages

  • Re: Droping suspect publication database
    ... I tryied this but the problem is with the data file, not log file. ... > reconfigure with override ...
    (microsoft.public.sqlserver.replication)
  • Re: VSFTP question
    ... # Activate logging of uploads/downloads. ... # You may override where the log file goes if you like. ... Shiva wrote: ...
    (linux.redhat)
  • How can I read a locked VMS file?
    ... I have a log file that is locked. ... is production critical; I cannot terminate it. ... Is there a way to override the ... VMS file lock in order to view the contents of this file? ...
    (comp.os.vms)