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

SQL Anywhere 10.0.1 » SQL Anywhere Server - Database Administration » SQL Anywhere High Availability » Introduction to database mirroring » Setting up database mirroring

Setting up database mirroring Next Page

Specifying a preferred database server


In a database mirroring system, you can identify one of the two operational servers as the preferred server. If all the database servers are running, then the preferred server becomes the primary server and takes ownership of the database. If the server that is marked as preferred becomes unavailable, then the server that was acting as the mirror server becomes the primary server. When the preferred server restarts, it obtains any transaction log entries it does not already have from the current primary server. It then asks the current primary server to relinquish ownership of the database. The servers then change roles, with the preferred server becoming the primary server and the other server becoming the mirror server. Any connections to the database on the non-preferred server are lost when the database ownership changes.

You specify a preferred server by adding "preferred=YES" to the -xp database option when starting the database server. For example:

dbsrv10 -n server1 mydata.db -sn mydata 
-xp partner=(ENG=server2;LINKS=tcpip(TIMEOUT=1));
AUTH=abc;arbiter=(ENG=arbsrv;LINKS=tcpip(TIMEOUT=1));preferred=YES
See also