Solved

Sqlserver 2008 restore

Posted on 2011-09-26
8
208 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
 
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
Control application downtime with dependency maps

Visualize the interdependencies between application components better with Applications Manager's automated application discovery and dependency mapping feature. Resolve performance issues faster by quickly isolating problematic components.

 

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

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Join & Write a Comment

Naughty Me. While I was changing the database name from DB1 to DB_PROD1 (yep it's not real database name ^v^), I changed the database name and notified my application fellows that I did it. They turn on the application, and everything is working. A …
How to leverage one TLS certificate to encrypt Microsoft SQL traffic and Remote Desktop Services, versus creating multiple tickets for the same server.
This video discusses moving either the default database or any database to a new volume.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

706 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now