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 » Maintaining a read-only scale-out system

 

Adding a mirroring system to a read-only scale-out system

Configure the root node of the read-only scale-out system to be a partner server in a mirroring system by creating an arbiter and converting a copy node to become the second partner of the mirroring system.

Prerequisites

You must have the MANAGE ANY MIRROR SERVER system privilege.

 Task
  1. Connect to the root node of the read-only scale-out system. For example, run the following command:

    dbisql -c "UID=DBA;PWD=sql;SERVER=scaleout_root_demo"
  2. Adjust the existing partner and mirror server definitions as follows:

    • Create the mirror server definition for the new mirror server.

    • Change the mirror server definition for the existing primary (root) server to include the hosts and ports of both the root server and the mirror server.

    • Change the mirror server definition for the existing partner (root) server to include a location for a state file. The state file is automatically created

    For example, execute the following statements:



    -- Define mirror server definition for the mirror server
    CREATE MIRROR SERVER scaleout_mirror_demo AS MIRROR
     connection_string='SERVER=scaleout_mirror_demo;HOST=localhost:6871,localhost:6873';  
    
     -- Alter existing primary to include both partners 
    ALTER MIRROR SERVER scaleout_primary_demo 
    connection_string='SERVER=scaleout_primary_demo;HOST=localhost:6871,localhost:6873';  
    
     -- Alter the existing Partner to include state file 
    ALTER MIRROR SERVER scaleout_root_demo state_file='c:\\scaleoutdemo\\server1\\server1.state';
  3. Convert an existing copy node to the mirror server. For example, execute the following statement:

    ALTER MIRROR SERVER scaleout_child_demo AS PARTNER state_file='c:\\scaleoutdemo\\copynode\\server3.state'
  4. Start a server to be the arbiter server for the mirroring system. For example, run the following commands:

    mkdir c:\scaleoutdemo\arbiter
    dbsrv16 -n scaleout_arbiter_demo -su sql -x "TCPIP(PORT=6870)" -xf "c:\\scaleoutdemo\\arbiter\\arbiter.state" -xa "AUTH=abc;DBN=scaleoutdemo"
  5. From the primary (root) server, add the arbiter mirror server definitions. For example, execute the following statement:

    CREATE MIRROR SERVER scaleout_arbiter_demo
    AS ARBITER 
    connection_string ='SERVER=scaleout_arbiter_demo;HOST=localhost:6870'; 

Results

The read-only scale-out system now is also part of a mirroring system.

 See also