none
Unable to manual failover the Availibility group from a node to another

    Question

  • Hello Guys,

    I have an SQL Server 2012 DAG running on top of a Windows Server 2012 Failover Cluster.

    Today (suddenly), i was faced to an irregular issue when i want to manual failover the DAG from a node to another.

    My nodes Names are SQL11 and SQL12, and I’m using the failover wizard from the SQL Server MS.

    - When i failover the DAG from SQL11 to SQL12, all is good.

    -When i want to get back the DAG to SQL11 (From SQL12 to SQL11), i receive the following error message:

    --------------------------------

    Manual Failover failed.

    Error Message: Availability-group DDL operations are permitted
    only when you are using the master database.  Run the USE MASTER
    command, and retry your availability-group DDL command.

    -------------------------------------------

    It's really obvious because i can't find any explanation to this issue.

    I really appreciate your help.

    Thanks

    Regards, Samir Farhat Infrastructure Consultant

    Tuesday, April 08, 2014 12:38 PM

Answers

All replies

  • Hello,

    Silly question to ask, but does your login or login group have a default database set which is causing this on the other server?

    What happens if you run this manually through T-SQL?


    Sean Gallardy | Blog | Twitter

    Wednesday, April 09, 2014 1:46 PM
  • Hi,

    I will check this as soon as possible. Thanks


    Regards, Samir Farhat Infrastructure Consultant

    Monday, April 14, 2014 10:24 AM
  • I can confirm that this is due to the fact that default database for login is set to something else than master. The Wizard makes connection and runs the T-SQL which fails because it can't run in any other database than master. Marking Sean's response as answer.

    Balmukund Lakhani
    Please mark solved if I've answered your question, vote for it as helpful to help other users find a solution quicker
    --------------------------------------------------------------------------------
    This posting is provided "AS IS" with no warranties, and confers no rights.
    --------------------------------------------------------------------------------
    My Blog | Team Blog | @Twitter | Facebook
    Author: SQL Server 2012 AlwaysOn - Paperback, Kindle

    Wednesday, May 28, 2014 7:48 AM