Re: Droping suspect publication database
From: Adrian Mos (AdrianMos_at_discussions.microsoft.com)
Date: 11/23/04
- Next message: Hilary Cotter: "Re: Problems with identity range in merge replication."
- Previous message: Adrian Mos: "Transactional replication and the publisher’s transaction log"
- In reply to: Esio Nunes: "Re: Droping suspect publication database"
- Next in thread: Esio Nunes: "Re: Droping suspect publication database"
- Reply: Esio Nunes: "Re: Droping suspect publication database"
- Messages sorted by: [ date ] [ thread ]
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.
- Next message: Hilary Cotter: "Re: Problems with identity range in merge replication."
- Previous message: Adrian Mos: "Transactional replication and the publisher’s transaction log"
- In reply to: Esio Nunes: "Re: Droping suspect publication database"
- Next in thread: Esio Nunes: "Re: Droping suspect publication database"
- Reply: Esio Nunes: "Re: Droping suspect publication database"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|