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
 General SQL Server Forums
 New to SQL Server Programming
 error while restoring the ReportServer db in SSMS
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

racinghart
Starting Member

USA
49 Posts

Posted - 04/23/2007 :  14:11:32  Show Profile  Reply with Quote
===================================

System.Data.SqlClient.SqlError: Exclusive access could not be obtained because the database is in use. (Microsoft.SqlServer.Smo)

===================================

any ideas?

this is actually a restore from a BAK file saved from the live server. we copied the bak file over and placed it on the test server hard drive, now we are trying to restore this using SSMS

rmiao
Flowing Fount of Yak Knowledge

USA
7266 Posts

Posted - 04/23/2007 :  15:08:59  Show Profile  Reply with Quote
Ensure there is no connection to target db, and you didn't run restore statement under it.
Go to Top of Page

Kristen
Test

United Kingdom
22415 Posts

Posted - 04/24/2007 :  04:17:06  Show Profile  Reply with Quote
e.g.

USE master
GO
ALTER DATABASE MyDatabaseName SET SINGLE_USER WITH ROLLBACK IMMEDIATE
GO
RESTORE ...

Kristen
Go to Top of Page

tkizer
Almighty SQL Goddess

USA
37157 Posts

Posted - 04/24/2007 :  12:43:19  Show Profile  Visit tkizer's Homepage  Reply with Quote
Stop the Reporting Services service as it will be hard to beat RS into the database after you kill the spids. RS quickly reconnects to the databases.

Tara Kizer
http://weblogs.sqlteam.com/tarad/
Go to Top of Page

racinghart
Starting Member

USA
49 Posts

Posted - 04/24/2007 :  15:53:04  Show Profile  Reply with Quote
thank you Tara! It worked... i had to STOP the services for a minute... load the BAK and restart the Services. =)
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.08 seconds. Powered By: Snitz Forums 2000