Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Restore user database within a SQLServer 2008 failover cluster Expand / Collapse
Author
Message
Posted Monday, July 22, 2013 10:37 AM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Friday, June 6, 2014 9:55 AM
Points: 73, Visits: 182
I am new to SQLServer2008 clustering , When I try to restore a database within the cluster , I get the message Couldnt obtain exclusive access, I guess this has something to do with the database being in the cluster
Can anyone shed some light on this issue ?
Post #1476133
Posted Monday, July 22, 2013 10:50 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Today @ 2:06 AM
Points: 42, Visits: 248
Some connection is using the database. This is nothing to do with cluster. Find out the connection and disconnect it. To restore a database on the existing database, it requires an exclusive lock. Since some users are using that database, SQL server fails to acquire an exclusive lock, which causes the error.

To find the session that is using the database:
select spid, status, loginame, db_name(dbid), cmd from master.sys.sysprocesses where db_name(dbid) = 'DB_NAME'

Find out the activity that is going on the database
DBCC INPUTBUFFER(<SPID NUMBER>)

Disconnect the session:
KILL <SPID NUMBER>).
Post #1476144
Posted Monday, July 22, 2013 10:54 AM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Today @ 3:14 AM
Points: 42,460, Visits: 35,520
Make sure it's not your connection using the database. Change database context to master before you run the restore.


Gail Shaw
Microsoft Certified Master: SQL Server 2008, MVP
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass

Post #1476146
Posted Monday, July 22, 2013 12:32 PM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Friday, June 6, 2014 9:55 AM
Points: 73, Visits: 182
Thanks , it looked to be a SSMS session , works fine now
Post #1476204
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse