Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2002-08-21 : 10:32:15
|
| Umesh writes "Sir, I have a database named as 'CmsRepl' which is gone in a suspect mode. We wanted to delete the database, but we are unable to do so. This Database was used for replication also.We try to workaround this problem.We try to Detach the database using 'sp_detachdb', but it says that your database is used in replication.So what we did was remove all the related publication entries related with that database from the distibution table.But even then the same error , it is used in replication. Kindly suugest any way by which the database whch has gone in suspect mode, can be deletd from the sql server." |
|
|
KnooKie
Aged Yak Warrior
623 Posts |
Posted - 2002-08-21 : 10:55:26
|
| had this lying around for a while now which may help ? Might help you drop it.//If your have a database that is marked suspect but there is no real //problem this script will change the status flag and allow you to use//the database. If you have more than one suspect database, comment//the shutdown database section until you have changed the status on//all suspect databases.use mastergosp_configure "allow updates", 1reconfigure with overridegoupdate sysdatabasesset status = status - 256where name = "database name"and status & 256 = 256gosp_configure "allow updates", 0reconfiguregocheckpointgoshutdowngoPaul |
 |
|
|
jasper_smith
SQL Server MVP & SQLTeam MVY
846 Posts |
Posted - 2002-08-21 : 12:41:08
|
| You can also run sp_removedbreplication [ @dbname = ] 'dbname' once the database is out of suspect status to remove all the replication structures.HTHJasper Smith |
 |
|
|
|
|
|