Dropping a database

  • If replication cannot be removed try taking the database offline and then try dropping it.

  • Server: Msg 947, Level 16, State 1, Line 1

    Error while closing database 'new_db' cleanly.

    Server: Msg 5069, Level 16, State 1, Line 1

    ALTER DATABASE statement failed.

    sp_dboption command failed.

     

    This is the message I got when I tried to make the database offline.

     

    The database status is showing as loading. And I am unable to open the database and I can't detach the database.

    I was trying to restore this database from a database which has replication on it and the restoration was failed and I didn;t save the error when it was failed.

    so how can I drop this database.

    Thanks.

  • Database 'new_db' cannot be opened. It is in the middle of a restore.

     

    This is the error I am getting when I try to open or query the DB.

     

    Thanks.

  • My gut feeling is to re-start SQL but that seems a bit drastic.

    Anyone with a less intrusive suggestion?

    - Just saw your post above - let the restore complete if you can.

  • I don't know how you did the restore, but I'm guessing you included the WITH NORECOVERY option or put it in standby. Try this...

    RESTORE DATABASE dbname

    WITH RECOVERY

    -SQLBill

Viewing 5 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic. Login to reply