Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Sqlserver 2008 restore

Posted on 2011-09-26
8
Medium Priority
?
214 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.

 
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 2000 total points
ID: 36673683
yes.

FYI - spid between 1 - 50 cant be kiiled
0

Featured Post

Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

Question has a verified solution.

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

This is basically a blog post I wrote recently. I've found that SARGability is poorly understood, and since many people don't read blogs, I figured I'd post it here as an article. SARGable is an adjective in SQL that means that an item can be fou…
There have been several questions about Large Transaction Log Files in SQL Server 2008, and how to get rid of them when disk space has become critical. This article will explain how to disable full recovery and implement simple recovery that carries…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…

671 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