Within the context of database mirroring, the mirror server acts as the failover partner for the principal server. In the event of a disaster, the mirror server takes over the role of the principal server, bringing the mirror copy of the database online as the new principal database. The former principal server, if available, then assumes the role of the mirror server. This process, known as role switching, can take the form of:
- Automatic failover If the principal server becomes unavailable, quickly brings the mirror copy of the database online as the new principal database.
- Manual failover Allows the database owner to reverse the roles of the failover partners, if necessary.
- Forced service If the principal server becomes unavailable, allows the database owner to restore access to the database by forcing the mirror server to take over the role of the principal server.
In any role-switching scenario, as soon as the new principal database comes online, the Administration Service can recover by automatically reconnecting to the database.
For more information about the database mirroring technology, and instructions on how to set up and administer database mirroring on SQL Server, see the “Database Mirroring” topics in the SQL Server product documentation at http://msdn.microsoft.com/en-us/library/bb934127.aspx.
NOTE: The Active Roles replication function is not supported for the databases that have mirroring set up. If you attempt to perform the “Promote to Publisher” or “Add Subscriber” operation on such a database, you receive an error.
Database Mirroring setup in Active Roles
Database Mirroring setup in Active Roles
Here we assume that mirroring for the database of Active Roles is already set up on the SQL Server side in accord with the recommendations and instructions found in Microsoft’s documentation, so that the following conditions are fulfilled:
- The Administration Service is connected to the Configuration database on the principal database server.
- Replication is not configured for the Configuration database (the database server acts as a stand-alone server as applied to Active Roles replication).
- The Administration Service is connected to the Management History database on the principal database server (by default, the Management History database is the same as the Configuration database).
- Replication is not configured for the Management History database (the database server acts as a stand-alone server as applied to Active Roles replication).
Under these conditions, the Administration Service can be instructed to automatically connect to the new principal database in the event of database server role switching. On the computer running the Administration Service, add a string value to each of these two registry keys, and then restart the Administration Service:
- Key: HKLM\SOFTWARE\One Identity\Active Roles\7.4\Service\DatabaseConnectionString\
Value Name: Failover Partner
Value Data: <Identifies the SQL Server instance that currently owns the mirror server role for the Configuration database>
- Key: HKLM\SOFTWARE\One Identity\Active Roles\7.4\Service\CHDatabaseConnectionString\
Value Name: Failover Partner
Value Data: <Identifies the SQL Server instance that currently owns the mirror server role for the Management History database>
If the default instance is used, the value data is the short name of the computer running SQL Server. Otherwise, the value data is the short name of the computer, followed by a backslash, followed by the name of the instance (such as ComputerName\InstanceName).
By default, the same database is used for the Configuration and Management History data; therefore, the value data would be the same in the DatabaseConnectionString and CHDatabaseConnectionString keys.
To restart the Administration Service, open Configuration Center and click the Restart button at the top of the Administration Service page in the Configuration Center main window. For instructions on how to run Configuration Center, see Running Configuration Center later in this document.
In the Active Roles console, you can view the mirroring status of the Configuration or Management History database that is used by a particular instance of the Administration Service:
- In the console tree, select Configuration | Server Configuration | Administration Services.
- In the details pane, double-click the name of the Administration Service whose database you want to examine.
- In the Properties dialog box, click the Configuration Database or Management History Database tab, and observe the information in the Database mirroring area:
- Role Current role of the database in the database mirroring session (Principal or Mirror).
- Partner The instance name and computer name for the other partner in the database mirroring session.
- State Current state of the mirrored database and of the database mirroring session. For more information about this field, see the “Mirroring States” topic at http://msdn.microsoft.com/en-us/library/ms189284.aspx
If no information is displayed in the Database Mirroring area, then database mirroring is not configured.
You can also view the mirroring status of a Configuration database or a Management History database on the General tab in the Properties dialog box for the object representing that database in the Configuration/Server Configuration/Configuration Databases or Configuration/Server Configuration/Management History Databases container, respectively.
This section provides instructions on how to monitor replication and perform administrative tasks to resolve replication-related problems. The following topics are covered:
Viewing replication settings
When configuring replication, Active Roles automatically sets replication parameters to the appropriate values. This ensures that replication is functioning properly. Normally, there is no need to modify the replication settings except for some error situations outlined the Troubleshooting Replication failures section later in this document.
The following table lists the values that Active Roles assigns to certain replication parameters.
Table 109: Values assigned to Replication parameters
Subscriptions expire and may be dropped if not synchronized in 60 days.
The Merge Agents are running continuously at the Publisher. The Snapshot Agent starts daily at 12:00 a.m. at the Publisher.
You can use the following instructions to examine these settings using SQL Server Management Studio.
It is advisable not to change these settings. Replication may not be functioning correctly if you manually modify replication settings with the use of SQL Server tools.
Start Management Studio and connect to the Publisher SQL Server:
- In Object Explorer, click Connect, and then click Database Engine.
- Complete the Connect to Server dialog box to connect to the instance of the SQL Server Database Engine that holds the Publisher role.
Open the Publication Properties dialog box:
- In Object Explorer, under the Publisher SQL Server, expand Replication | Local Publications.
- In Object Explorer, under Local Publications, right-click AelitaReplica, and click Properties.
In the Publication Properties dialog box, you can review the Active Roles publication settings.
Open the Subscription Properties dialog box:
- In Object Explorer, under Local Publications, expand AelitaReplica.
- In Object Explorer, under AelitaReplica, right-click a Subscription, and click Properties.
In the Subscription Properties dialog box, you can review the Active Roles subscription settings.