SQL Mirroring not failing over as expected for Personalization Server or Management Center

Version 2

    Introduction

    If SQL Mirroring has been configured as per our Best Practices and you find SQL Mirroring is not failing over to the Failover Partner as expected. this could be due to the Failover Partner being incorrectly listed (or missing) in the Environment Manager and Management Center configuration files.

    The SQL Mirroring best practices can be found in the Installation and Upgrade guides for Environment Manager and Management Center, or in the online help page: Database

     

    Detail

    Since Environment Manager 8.5 and Management Center 8.5 the Connection String used to define the SQL Failover Partner found in the configuration files is encrypted. Because of this it is not possible to modify these files in plain text.  Once the best practices have been implemented, the API can be used to set the Failover Partner for Environment Manager Personalization or Management Center using Powershell. Please run the following commands on each server to configure the Failover Partner.

    Powershell must be run as an Administrator on the local Personalization or Management Server

    Management Server
    Run the following cmdlets replacing the Server\Instance with the details for your failover server:

    Import-ApsInstanceModule -ProductName "Management Server"

    $ConnectionString = "Failover Partner=Server\Instance"

    Set-ApsServerDatabase -ConnectionString $ConnectionString

     

    Personalization Server
    Run the following cmdlets replacing the Server\Instance with the details for your failover server:

    Import-ApsInstanceModule -ProductName "Personalization Server"

    $ConnectionString = "Failover Partner=Server\Instance"

    Set-ApsServerDatabase -ConnectionString $ConnectionString

    On Personalization Server version 10.0 and above you also need to add a connection string to allow Personalization Operations to failover:

    1. Open the following file: "C:\Program Files\AppSense\Environment Manager\Personalization Server\PWCAPI\Web.Config"
    2. Find the SqlConnectionString setting which is blank, add Failover Partner, e.g.: <add key="SqlConnectionString" value="Failover Partner=server\instance" />
    3. Save the file
    4. You need to add this on each server