Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SAP Sybase SQL Anywhere 16.0 » SQL Anywhere Server - Database Administration » High availability and read-only scale-out systems » Database mirroring » Setting up a database mirroring system

 

How the primary server is chosen by database mirroring system

If a database with no mirroring definitions is started on a database server (for example, S1) started with -xp on, and the mirroring definitions are then made, S1 would be the initial primary server for the database.

Alternatively, when you first set up a database mirroring system and there are no state information files, and the copies of the database and transaction log are identical, both servers are eligible to act as the primary. In this situation, the server names are compared, and the server with the lower name acts as primary. For example, the name server1 is lower than server2, so server1 becomes the primary server.

For the initial startup, both servers must be running and connected for them to agree on their roles; the presence of an arbiter is not enough since the prior state information recorded in the state information files does not exist.

During a normal startup, the following inputs affect which server becomes the primary server:

  • the contents of the state information files

  • the transaction log position on each database server

  • the designation of a preferred primary server

 See also

Preferred database server in a database mirroring system