SQL Clone
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 Veteran
SSC Veteran (260 reputation)SSC Veteran (260 reputation)SSC Veteran (260 reputation)SSC Veteran (260 reputation)SSC Veteran (260 reputation)SSC Veteran (260 reputation)SSC Veteran (260 reputation)SSC Veteran (260 reputation)

Group: General Forum Members
Points: 260 Visits: 768
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 Eights!
SSC Eights! (988 reputation)SSC Eights! (988 reputation)SSC Eights! (988 reputation)SSC Eights! (988 reputation)SSC Eights! (988 reputation)SSC Eights! (988 reputation)SSC Eights! (988 reputation)SSC Eights! (988 reputation)

Group: General Forum Members
Points: 988 Visits: 1191
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 Veteran
SSC Veteran (260 reputation)SSC Veteran (260 reputation)SSC Veteran (260 reputation)SSC Veteran (260 reputation)SSC Veteran (260 reputation)SSC Veteran (260 reputation)SSC Veteran (260 reputation)SSC Veteran (260 reputation)

Group: General Forum Members
Points: 260 Visits: 768
The logins match on both servers.
RTaylor2208
RTaylor2208
SSC Eights!
SSC Eights! (988 reputation)SSC Eights! (988 reputation)SSC Eights! (988 reputation)SSC Eights! (988 reputation)SSC Eights! (988 reputation)SSC Eights! (988 reputation)SSC Eights! (988 reputation)SSC Eights! (988 reputation)

Group: General Forum Members
Points: 988 Visits: 1191
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
SSChampion
SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)

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

---------------------------------------------------------------------
george sibbald
george sibbald
SSChampion
SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)

Group: General Forum Members
Points: 10546 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
Old Hand
Old Hand (364 reputation)Old Hand (364 reputation)Old Hand (364 reputation)Old Hand (364 reputation)Old Hand (364 reputation)Old Hand (364 reputation)Old Hand (364 reputation)Old Hand (364 reputation)

Group: General Forum Members
Points: 364 Visits: 889
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