Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


"Set Partner Failover" "User must be in the master database"?


"Set Partner Failover" "User must be in the master database"?

Author
Message
alanspeckman
alanspeckman
SSC-Enthusiastic
SSC-Enthusiastic (106 reputation)SSC-Enthusiastic (106 reputation)SSC-Enthusiastic (106 reputation)SSC-Enthusiastic (106 reputation)SSC-Enthusiastic (106 reputation)SSC-Enthusiastic (106 reputation)SSC-Enthusiastic (106 reputation)SSC-Enthusiastic (106 reputation)

Group: General Forum Members
Points: 106 Visits: 766
I'm trying to switch roles in a mirroring session from mirror to principal using the following statement on the principal.

alter database [dbname] Set Partner Failover;

I get the following error message

Msg 5001, Level16, State 1, Line 1
User must be in the master database.

The command executes fine on the original principal and failover to the mirror happens flawlessly.
The command fails when executing on the 'mirror' server when that database has the Principal role.

I am able to failback to the original principal using the GUI though.

Any ideas why I get that message doing the role switch via T-SQL??
RTaylor2208
RTaylor2208
SSC-Addicted
SSC-Addicted (488 reputation)SSC-Addicted (488 reputation)SSC-Addicted (488 reputation)SSC-Addicted (488 reputation)SSC-Addicted (488 reputation)SSC-Addicted (488 reputation)SSC-Addicted (488 reputation)SSC-Addicted (488 reputation)

Group: General Forum Members
Points: 488 Visits: 1120
Are all your SQL logins that exist on the principal server available on the instance hsoting the mirror which are used by your mirrored database?

MCITP SQL 2005, MCSA SQL 2012
alanspeckman
alanspeckman
SSC-Enthusiastic
SSC-Enthusiastic (106 reputation)SSC-Enthusiastic (106 reputation)SSC-Enthusiastic (106 reputation)SSC-Enthusiastic (106 reputation)SSC-Enthusiastic (106 reputation)SSC-Enthusiastic (106 reputation)SSC-Enthusiastic (106 reputation)SSC-Enthusiastic (106 reputation)

Group: General Forum Members
Points: 106 Visits: 766
The logins match on both servers.
RTaylor2208
RTaylor2208
SSC-Addicted
SSC-Addicted (488 reputation)SSC-Addicted (488 reputation)SSC-Addicted (488 reputation)SSC-Addicted (488 reputation)SSC-Addicted (488 reputation)SSC-Addicted (488 reputation)SSC-Addicted (488 reputation)SSC-Addicted (488 reputation)

Group: General Forum Members
Points: 488 Visits: 1120
For the SQL Logins (opposed to the windows logins) do they have the same SID?

MCITP SQL 2005, MCSA SQL 2012
george sibbald
george sibbald
SSCertifiable
SSCertifiable (6.4K reputation)SSCertifiable (6.4K reputation)SSCertifiable (6.4K reputation)SSCertifiable (6.4K reputation)SSCertifiable (6.4K reputation)SSCertifiable (6.4K reputation)SSCertifiable (6.4K reputation)SSCertifiable (6.4K reputation)

Group: General Forum Members
Points: 6360 Visits: 13687
are you connected to the master database when you issue the command?

---------------------------------------------------------------------
george sibbald
george sibbald
SSCertifiable
SSCertifiable (6.4K reputation)SSCertifiable (6.4K reputation)SSCertifiable (6.4K reputation)SSCertifiable (6.4K reputation)SSCertifiable (6.4K reputation)SSCertifiable (6.4K reputation)SSCertifiable (6.4K reputation)SSCertifiable (6.4K reputation)

Group: General Forum Members
Points: 6360 Visits: 13687
george sibbald (11/20/2013)
are you connected to the master database when you issue the command?


as this has not received a response what I meant by this was you must be in the context of the master database when issuing the command

alter database [dbname] Set Partner Failover

that is what the error message

Msg 5001, Level16, State 1, Line 1
User must be in the master database.

is referring to

---------------------------------------------------------------------
andreas.kreuzberg
andreas.kreuzberg
Valued Member
Valued Member (61 reputation)Valued Member (61 reputation)Valued Member (61 reputation)Valued Member (61 reputation)Valued Member (61 reputation)Valued Member (61 reputation)Valued Member (61 reputation)Valued Member (61 reputation)

Group: General Forum Members
Points: 61 Visits: 597
could this script fix this problem?

use master
alter database [dbname] Set Partner Failover

i am not sure if it works for a mirror failover
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search