Solved

Sqlserver 2008 restore

Posted on 2011-09-26
8
211 Views
Last Modified: 2012-08-14
Hi,
  How to do a restore of sqlserver 2008 database if multi user are logged in.

Thanks a lot.
0
Comment
Question by:amitabh04
  • 4
  • 3
8 Comments
 
LVL 13

Expert Comment

by:Wizilling
ID: 36638242
do you have a enterprise edition of sql2008. if yes they you can do an online restore.

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

0
 

Author Comment

by:amitabh04
ID: 36643553
Hi,
  How do I know what are active connections after running sp_who2? What is the command to kill active connections?

Thanks.
0
 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 36664587
>>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

0
Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

 
LVL 13

Expert Comment

by:Wizilling
ID: 36665660
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.
0
 

Author Comment

by:amitabh04
ID: 36670821
Hi,
   Do I kill  process in 'sleeping' status for my DBname.

Thanks.
0
 
LVL 13

Expert Comment

by:Wizilling
ID: 36671235
yes... as they hold a connection to ur db
0
 

Author Comment

by:amitabh04
ID: 36672105
Hi,
  So no matter what the status is kill all connections to my DB. Is that right?

Thanks.
0
 
LVL 13

Accepted Solution

by:
Wizilling earned 500 total points
ID: 36673683
yes.

FYI - spid between 1 - 50 cant be kiiled
0

Featured Post

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

If you have heard of RFC822 date formats, they can be quite a challenge in SQL Server. RFC822 is an Internet standard format for email message headers, including all dates within those headers. The RFC822 protocols are available in detail at:   ht…
In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

820 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question