January 20, 2006 at 9:39 am
When I am trying to drop a database wit the following command
DROP DATABASE new_db
I am getting the following error.
Cannot drop the database new_db' because it is being used for replication.
Actually I am trying to restore an existing Database as a new database(new_db).
so now the new database is created and it has got some problem with restoration. So when I try to delete the new Database its giving the above error. So how can I drop this new_Db database.
January 20, 2006 at 9:45 am
If replication cannot be removed try taking the database offline and then try dropping it.
January 20, 2006 at 10:07 am
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.
January 20, 2006 at 10:11 am
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.
January 20, 2006 at 10:12 am
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.
January 20, 2006 at 10:52 am
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 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply