Hi all,
Before I dropped an instance from SQL Server 2005, I tried to take it
offline or detach it. The SQL Server 2005 complaint that it is being
used or the database is locked.
I tried these 2 commands:
first command:
use master
go
drop database gem_prod_1_1
It complaint:
Msg 3702, Level 16, State 4, Line 2
Cannot drop database "gem_prod_1_1" because it is currently in use.
or this command:
alter database gem_prod_1_1
set single_user with rollback immediate
It complaint:
Msg 5061, Level 16, State 1, Line 1
ALTER DATABASE failed because a lock could not be placed on database
'gem_prod_1_1'. Try again later.
Msg 5069, Level 16, State 1, Line 1
ALTER DATABASE statement failed.
How can I drop the gem_prod_1_1 instance from the SQL Server 2005? Any
idea?
Thanks.
HS Phuah
Use Activity Monitor or sys.sysprocesses to check if there are any active
connections to your database. It is also possible that some system process
is blocking your action.
Regards
Pawel Potasinski
Uzytkownik <hsphuah@.usa.com> napisal w wiadomosci
news:1184639710.453585.89490@.22g2000hsm.googlegrou ps.com...
> Hi all,
> Before I dropped an instance from SQL Server 2005, I tried to take it
> offline or detach it. The SQL Server 2005 complaint that it is being
> used or the database is locked.
> I tried these 2 commands:
> first command:
> use master
> go
> drop database gem_prod_1_1
> It complaint:
> Msg 3702, Level 16, State 4, Line 2
> Cannot drop database "gem_prod_1_1" because it is currently in use.
> or this command:
> alter database gem_prod_1_1
> set single_user with rollback immediate
> It complaint:
> Msg 5061, Level 16, State 1, Line 1
> ALTER DATABASE failed because a lock could not be placed on database
> 'gem_prod_1_1'. Try again later.
> Msg 5069, Level 16, State 1, Line 1
> ALTER DATABASE statement failed.
> How can I drop the gem_prod_1_1 instance from the SQL Server 2005? Any
> idea?
> Thanks.
> HS Phuah
>
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment