No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>

Reminder

To have a better experience, please upgrade your IE browser.

upgrade

FAQ-How to Delete the Bad User Database

Publication Date:  2012-07-25 Views:  24 Downloads:  0
Issue Description
Q:
Sometimes, we can not use drop database command to delete the database,So there is another method to delete the bad user database.
Alarm Information
Null
Handling Process
A:
1.use isql to log in SQL server
    #isql -SN2000DBServer -Usa -Pxxx  (xxx is password of Sa)
2.allow to modify system table
    1>sp_configure"allow updates",1
    2>go
  3.set the database which need to be deleted to suspect status
    1>use master
    2>go
    1>begin tran
    2>go
    1>update sysdatabases set status=256
    2>where name="database_name"
    3>go
if get (1 row affected),then
    1>commit
    2>go
 else
    1>rollback
    2>go
 4.restart server ,then log in SQL server by sa 
 5.delete the database
     1>dbcc dbrepair(database_name,dropdb)
     2>go
 6.restore allow to modify the system table
     1>sp_configure"allow updates",0
     2>go 
Root Cause
Null
Suggestions
 

END