PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Forums Hébergement > Forum Hébergement serveur > comp.db.ms-sqlserver > Delete or detach a Suspect database
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
Delete or detach a Suspect database

Réponse
 
LinkBack Outils de la discussion
Vieux 20/09/2007, 19h02   #1
rdraider
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Delete or detach a Suspect database

Everything I read about sp_resetstatus says you must restart SQL after. Is
there a way around that (don't want to shut down production). The suspect
db is just an empty db that is not needed. I need to create another db with
the same name.
Thanks.


  Réponse avec citation
Vieux 20/09/2007, 23h25   #2
Erland Sommarskog
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Delete or detach a Suspect database

rdraider (rdraider@sbcglobal.net) writes:
> Everything I read about sp_resetstatus says you must restart SQL after.
> Is there a way around that (don't want to shut down production). The
> suspect db is just an empty db that is not needed. I need to create
> another db with the same name.


I may be missing something, but what about DROP DATABASE? I made a quick
test on SQL 2000 where I created a database, stopped SQL Server, deleted
the log file to make the database suspect, and restarted SQL Server.
DROP DATABASE worked just fine.


--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx
  Réponse avec citation
Vieux 21/09/2007, 03h22   #3
rdraider
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Delete or detach a Suspect database

No queries would work since this database did not exist in
Master.sysdatabases. Not sure why. Attempting to detach from Enterprise
Manager produced an error. Then I simply closed and reopened EM and it was
gone! Odd.



"Erland Sommarskog" <esquel@sommarskog.se> wrote in message
news:Xns99B1EF3C598D6Yazorman@127.0.0.1...
> rdraider (rdraider@sbcglobal.net) writes:
>> Everything I read about sp_resetstatus says you must restart SQL after.
>> Is there a way around that (don't want to shut down production). The
>> suspect db is just an empty db that is not needed. I need to create
>> another db with the same name.

>
> I may be missing something, but what about DROP DATABASE? I made a quick
> test on SQL 2000 where I created a database, stopped SQL Server, deleted
> the log file to make the database suspect, and restarted SQL Server.
> DROP DATABASE worked just fine.
>
>
> --
> Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se
>
> Books Online for SQL Server 2005 at
> http://www.microsoft.com/technet/pro...ads/books.mspx
> Books Online for SQL Server 2000 at
> http://www.microsoft.com/sql/prodinf...ons/books.mspx



  Réponse avec citation
Vieux 21/09/2007, 09h14   #4
Erland Sommarskog
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Delete or detach a Suspect database

rdraider (rdraider@sbcglobal.net) writes:
> No queries would work since this database did not exist in
> Master.sysdatabases. Not sure why. Attempting to detach from Enterprise
> Manager produced an error. Then I simply closed and reopened EM and it was
> gone! Odd.


The last thing you should believe is a graphical tool. But they usually
offer a Refresh option to handle such situations.


--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx
  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 01h50.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,10074 seconds with 12 queries