Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problems promoting secondary server during role reversal

Status
Not open for further replies.

sarahnice

Technical User
Nov 18, 2002
101
IE
Hi,

I have a server log shipping to a second server. Whenever i try to perform a role reversal, the promote secondary jobs fails 90% of the time. It gives the error that exclusive access to the database cannot be obtained. When i get this error, I check the current activity and there is no connections to the database i'm trying to bring up.

This is the script i'm using:
use master
go
exec msdb.dbo.sp_change_secondary_role
@db_name = <DBNAME>,
@do_load = 1,
@force_load = 1,
@final_state = 1,
@access_level = 1,
@terminate = 1,
@keep_replication = 0,
@stopat = null
go

If i continue to try running it, the script may execute successfully but there doesn't seem to be an answer as to why it would work once and not all the other times.

Any help would save me a lot of headaches.

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top