SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2005 Forums
 Other SQL Server Topics (2005)
 database is in use
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

taniarto
Starting Member

Indonesia
27 Posts

Posted - 03/04/2013 :  02:00:16  Show Profile  Reply with Quote
Hi all,

I just create a backup syntax, and it's running well. But when I try to restore it again there's a message that the backup cannot be run because database is in use. Does any one can tell me how to disconnect or solving the problem..

thanks

khtan
In (Som, Ni, Yak)

Singapore
17681 Posts

Posted - 03/04/2013 :  03:07:26  Show Profile  Reply with Quote
execute the restore command from other database like master instead of the one you are trying to restore. You can restore the database if you access it.

basically,

use master
restore database . . . .



KH
Time is always against us


Edited by - khtan on 03/04/2013 03:08:24
Go to Top of Page

taniarto
Starting Member

Indonesia
27 Posts

Posted - 03/04/2013 :  21:25:12  Show Profile  Reply with Quote
Thanks..a lot
Go to Top of Page

jackv
Flowing Fount of Yak Knowledge

United Kingdom
2079 Posts

Posted - 03/05/2013 :  01:50:15  Show Profile  Visit jackv's Homepage  Reply with Quote
If there are other processes - you can use the KILL command - although check with the users first

Jack Vamvas
--------------------
http://www.sqlserver-dba.com
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.05 seconds. Powered By: Snitz Forums 2000