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.
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 |
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.
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'; |
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'; |
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'; |
![]() |
Discuss this page in DocCommentXchange.
|
Copyright © 2014, SAP AG or an SAP affiliate company. - SAP Sybase SQL Anywhere 16.0 |