September 10, 2009 at 1:43 pm
I have to take db offline with immediate effect.
it should not wait till the connection gets closed.
how to do it.
September 10, 2009 at 1:47 pm
I want to take offline with connection exist.
September 10, 2009 at 1:50 pm
use Alter database command
set the mode to offline.
if app still pointing there ask the app team to stop application.
:crazy: :alien:
Umar Iqbal
September 10, 2009 at 1:52 pm
if db offline noone can connect.
you mean you wan tto take it offline when user are connected.
use immediate rollback in your alter database command
:crazy: :alien:
Umar Iqbal
September 10, 2009 at 2:00 pm
i'm getting this error when trying to put the single user mode with immidiate.
" ALTER DATABASE failed because a lock could not be placed on database 'ABC'. Try again later."
September 10, 2009 at 2:01 pm
what command you used .
did u put imeediate rollback
:crazy: :alien:
Umar Iqbal
September 10, 2009 at 2:02 pm
ALTER DATABASE SET SINGLE_USER WITH Rollback Immediate
September 10, 2009 at 2:03 pm
where is database name. you habve to connec tot master and then use it like this
alter database ---database name ----
:crazy: :alien:
Umar Iqbal
September 10, 2009 at 2:05 pm
ALTER DATABASE test01 SET MULTI_USER WITH Rollback Immediate
:crazy: :alien:
Umar Iqbal
September 10, 2009 at 2:05 pm
ALTER DATABASE test01 SET SINGLE_USER WITH Rollback Immediate
:crazy: :alien:
Umar Iqbal
September 10, 2009 at 2:06 pm
i used "ALTER DATABASE ABC SET SINGLE_USER WITH Rollback Immediate"
i am getting error as
Msg 5061, Level 16, State 1, Line 1
ALTER DATABASE failed because a lock could not be placed on database 'ABC'. Try again later.
Msg 5069, Level 16, State 1, Line 1
ALTER DATABASE statement failed.
September 10, 2009 at 2:08 pm
i used command below
ALTER DATABASE ABC SET SINGLE_USER WITH Rollback Immediate
i am getting error below
Msg 5061, Level 16, State 1, Line 1
ALTER DATABASE failed because a lock could not be placed on database 'ABC'. Try again later.
Msg 5069, Level 16, State 1, Line 1
ALTER DATABASE statement failed.
September 10, 2009 at 2:13 pm
hi umar.........pls help...........its urgent...........
September 10, 2009 at 2:22 pm
humm weired. can u run sp_who2 and se who is connected to this. make sure you are not connected to it. if any application is connected to it ask them to stop apps. immediate should kill and take it offline but that weired.
just make sure you dont have any Query open against that database.
Kill all spids connected to it.
:crazy: :alien:
Umar Iqbal
September 10, 2009 at 3:17 pm
What database are you in when you run the ALTER DATABASE?
Viewing 15 posts - 1 through 15 (of 17 total)
You must be logged in to reply to this topic. Login to reply