amitabh04
asked on
Sqlserver 2008 restore
Hi,
How to do a restore of sqlserver 2008 database if multi user are logged in.
Thanks a lot.
How to do a restore of sqlserver 2008 database if multi user are logged in.
Thanks a lot.
ASKER
Hi,
How do I know what are active connections after running sp_who2? What is the command to kill active connections?
Thanks.
How do I know what are active connections after running sp_who2? What is the command to kill active connections?
Thanks.
>>How do I know what are active connections after running sp_who2?<<
You identify all the spids that have the dbname you are attempting to restore.
>>What is the command to kill active connections?<<
That would be KILL
You identify all the spids that have the dbname you are attempting to restore.
>>What is the command to kill active connections?<<
That would be KILL
find the connections to your DBname when you run sp_who2
find the corresponding spid
to kill ... exec
KILL spid_here
or you can just ask the users to log off while you restore.
find the corresponding spid
to kill ... exec
KILL spid_here
or you can just ask the users to log off while you restore.
ASKER
Hi,
Do I kill process in 'sleeping' status for my DBname.
Thanks.
Do I kill process in 'sleeping' status for my DBname.
Thanks.
yes... as they hold a connection to ur db
ASKER
Hi,
So no matter what the status is kill all connections to my DB. Is that right?
Thanks.
So no matter what the status is kill all connections to my DB. Is that right?
Thanks.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
if you dont have a enterprise version then - first you have to kick all the users out and then do a restore.
do a sp_who2 and kill the active connections to the db