Search code examples
sql-serverdeploymentlistenerdacpac

Deploying a DACPAC to an AOAG Listener on SQL Server 2016


We're trying to deploy a DACPAC to a new server via MS Release Management Studio. We've successfully deployed to other new servers with the same DACPAC with an existing restored database prior to data-tier upgrade. Proving that the DACPAC and deployment process is working.

The only difference is this server has Always On Availability Groups (AOAG) and the target we are deploying to is the group listener. Following the advice from here:

You have to deploy it to the Listener, which will in fact redirect your connection to the primary replica of your AlwaysOn Availability Group. The changes will also be transferred to the secondary replicas. The listener enables a client to connect to an availability replica without knowing the name of the physical instance of SQL Server to which the client is connecting. So normally you can use this listener name in the Release Management Studio like another SQL Server Instance.

Having tried to manually upgrading the data-tier application using the listener it states that the target server is not accessible.

Does anyone have a process for this or has had some experience they can share as to why this is happening and what I can do to get past it?

UPDATE (resolved):

It looks as though our server was patched which caused a failover to occur. The secondary replica didn't have an account setup for our Release Management Studio user.

Also, our DBA finally chipped in with our replica's being set to read-only.

Consequently, we had made some discoveries, such as DACPAC's will upgrade a database to a data-tier application even if they are not registered.

And although you can deploy a DACPAC to your primary replica as a DAC, the secondary's won't be registered as DAC's unless you manually upgrade / register them. Useful to know.

Thanks to all those that asked questions :)


Solution

  • It looks as though our server was patched which caused a failover to occur. The secondary replica didn't have an account setup for our Release Management Studio user.

    Also, our DBA finally chipped in with our replica's being set to read-only.

    Consequently, we had made some discoveries, such as DACPAC's will upgrade a database to a data-tier application even if they are not registered.

    And although you can deploy a DACPAC to your primary replica as a DAC, the secondary's won't be registered as DAC's unless you manually upgrade / register them. Useful to know.

    Thanks to all those that asked questions :)