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 » SQL Anywhere read-only scale-out » Read-only scale-out set-up

 

Setting up the root node

You create the root node of a read-only scale-out system using the database that you want to have copies of.

Prerequisites

You must have the MANAGE ANY MIRROR SERVER system privilege.

Context and remarks

When you configure the root node, define the root database server as a partner server. You can also define a primary server.

 Task
  1. Start a database server running the database that you want to have read-only copies of. You must specify the -xp on database option when starting the database server.

    For example, the following command starts a database server named scaleout_root_demo that starts on port 6871. It is recommended that you use the -x option to specify a port number, as this port number is used later on in the CREATE MIRROR SERVER statements.

    dbsrv16 -n scaleout_root_demo -x TCPIP(port=6871) "c:\scaleoutdemo\scaleoutdemo.db" -xp on
  2. Define the scale-out objects in the root database using the CREATE MIRROR SERVER statement.

    It is recommended that you create two definitions for the root database server: CREATE MIRROR SERVER...AS PARTNER and CREATE MIRROR SERVER...AS PRIMARY. You must specify the connection_string parameter in both definitions.

    1. The name that you give the database server in the statement that uses the AS PARTNER clause is the name that is used in the command to start the database server and in client connection strings. For example:

      CREATE MIRROR SERVER "scaleout_root_demo"
      AS PARTNER
      connection_string = 'SERVER=scaleout_root_demo;HOST=localhost:6871';
    2. The name that you give the database server in the statement that uses the AS PRIMARY clause is the name of the database server that is the default parent for copy nodes that are added to the scale-out system. If you do not define a primary server, then you must specify the name of the parent server when you create copy nodes, so defining a primary server is recommended.

      CREATE MIRROR SERVER "scaleout_primary_demo"
      AS PRIMARY
      connection_string = 'SERVER=scaleout_primary_demo;HOST=localhost:6871';
  3. Set scale-out options for the database using the SET MIRROR OPTION statement. It is required that you specify a value for the authentication_string parameter and that you set the child_creation parameter to automatic (the default). For example:

    SET MIRROR OPTION child_creation='automatic';
    SET MIRROR OPTION authentication_string='abc';

Results

The root node is now ready to be used.

Next

Make backup copies of the root database that are used to add child nodes to the read-only scale-out system.

 See also