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

 

Using a copy node as an arbiter

If you do not want to create a new database server to run the arbiter of a mirroring system that includes a read-only scale-out system, you can configure one server to act as both a copy node and an arbiter for the system.

Prérequis

You must have the MANAGE ANY MIRROR SERVER system privilege.

This task involves backing up a copy of the database. Depending upon the backup method you choose, see the appropriate privileges for that method.

 Task
  1. Stop the copy node that you want to also be an arbiter server.

  2. Choose one of the following options:

    Option Action
    Add the arbiter to an existing copy node
    1. Start the copy node with the -xf and -xa database server options. For example:

      dbsrv16 -n scaleout_child_demo -su sql -x "tcpip(PORT=6873)" -xf "c:\scaleoutdemo\copynode\arbiter.state" -xa "AUTH=abc;DBN=scaleoutdemo" "c:\scaleoutdemo\copynode\scaleoutdemo.db" -xp on
    2. Create the arbiter server definition so that its name does not match the server name of any of the database servers in the mirroring system. Execute a CREATE MIRROR SERVER statement. For example:

      CREATE MIRROR SERVER myarbiter 
      AS ARBITER
      connection_string = 'SERVER=scaleout_child_demo;HOST=localhost:6873';
    Add a copy node to the existing arbiter
    1. Stop the existing arbiter server.

    2. Connect to the primary server and delete the existing arbiter mirror server definition.

    3. From the primary server, create a new arbiter mirror server definition with a different name (but with the actual server name in the connection_string). For example:

      CREATE MIRROR SERVER newarbiter 
      AS ARBITER
      connection_string = 'SERVER=actual_server_name;HOST=arbiter_host:6870';
    4. Make a backup of the mirrored database and copy it to computer where the copy node is to run.

    5. Restart the arbiter server but include mirrored.db -xp ON in the server command, where mirrored.db is the name of the mirrored database.

Résultat

The arbiter server also runs a scale-out copy node.

Exemple

For example, there is no database server named TheArbiter in the mirroring and read-only scale-out system that uses the following server definition.

CREATE MIRROR SERVER "scaleout_child" 
AS COPY 
connection_string = 'SERVER=scaleout_child;HOST=winxp-2:6878';
CREATE MIRROR SERVER "TheArbiter"
AS ARBITER 
connection_string = 'SERVER=scaleout_child;HOST=winxp-2:6878';

 See also