Distributed Availability Group error message

  • Hello,

    I am trying to execute below code and for the <primary_server_instance> and  <secondary_server_instance> values I have it as "MSSQLCLUSTER" because that's what the instance names are for my sql 2 node cluster.  The issue is it returns a error message saying the <secondary_server_instance> name can not be the same as <primay_server_instance> name?  Does this mean I have to recreate my sql cluster and install sql with a different instance name on the second node?  Appreciate the help.

    CREATE AVAILABILITY GROUP [agname]WITH (AUTOMATED_BACKUP_PREFERENCE = PRIMARY
    ,DB_FAILOVER = OFF
    ,DTC_SUPPORT = NONE)FOR DATABASE [dbname]REPLICA ON N'<primary_server_instance>' WITH (ENDPOINT_URL = N'TCP://<primary_server>.<fully_qualified_domain_name>:5022'
    , FAILOVER_MODE = MANUAL
    , AVAILABILITY_MODE = SYNCHRONOUS_COMMIT
    , BACKUP_PRIORITY = 50
    , SECONDARY_ROLE(ALLOW_CONNECTIONS = NO))
    , N'<secondary_server_instance>' WITH (ENDPOINT_URL = N'TCP://<primary_server>.<fully_qualified_domain_name>:5022'
    , FAILOVER_MODE = MANUAL
    , AVAILABILITY_MODE = SYNCHRONOUS_COMMIT
    , BACKUP_PRIORITY = 50
    , SECONDARY_ROLE(ALLOW_CONNECTIONS = NO));
  • Are you putting in the full instance name (e.g. HOSTNAME\MSSQLCLUSTER) where it says primary_server_instance and secondary_server_instance, or just MSSQLCLUSTER?



  • When I do the full instance name it doesn't work.  When I use MSSQLCLUSTER it likes the first instance name, but the second one says it's a duplicate.

  • Have you tried using fully qualified domain names? Are your clusters in different domains?

  • Yes tried fully qualified names doesn't work.  Same domain.

  • What's the error message when you use the full hostname\instancename?

  • REPLICA ON N'<primary_server_instance>'
    The portion above accepts the replica name in the format

    server\instance

    See the link below for more info

    https://docs.microsoft.com/en-us/sql/t-sql/statements/create-availability-group-transact-sql

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

    "Ya can't make an omelette without breaking just a few eggs" 😉

  • That's what I thought, but he says that doesn't work...

  • Beatrix Kiddo - Friday, August 11, 2017 2:33 AM

    That's what I thought, but he says that doesn't work...

    user error i would guess 😉

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

    "Ya can't make an omelette without breaking just a few eggs" 😉

  • I have the default "MSSQLCLUSTER" as the name for both nodes so this naming convention doesn't seem to work servername\instance.  I am rebuilding the VM and going to build the sql cluster with different instance names.  Wondering if that will work.  Fyi were also having some DNS error messages and therefore I can't rename the instance from Failover Cluster Manager.  That is why I am starting over basically.  Stay tuned and thanks for the help.  Prbly is user error. =)

Viewing 10 posts - 1 through 9 (of 9 total)

You must be logged in to reply to this topic. Login to reply