November 20, 2013 at 9:08 am
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??
November 20, 2013 at 9:15 am
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
November 20, 2013 at 9:54 am
The logins match on both servers.
November 20, 2013 at 10:08 am
For the SQL Logins (opposed to the windows logins) do they have the same SID?
MCITP SQL 2005, MCSA SQL 2012
November 20, 2013 at 10:47 am
are you connected to the master database when you issue the command?
---------------------------------------------------------------------
November 21, 2013 at 9:49 am
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
---------------------------------------------------------------------
November 22, 2013 at 6:30 am
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
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply