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 » Connecting to a database in a read-only scale-out system

 

Connect to copy nodes

Connect to a copy node by connecting to the primary server and specifying the NodeType connection parameter as part of the connection string. The NodeType connection parameter accepts the following values:

  • DIRECT   This is the default setting when connecting to database server.

    When the NodeType connection parameter is set to DIRECT, the database server accepts the connection without performing load balancing or redirection.

  • PRIMARY   If the NodeType connection parameter is set to PRIMARY and you have connected to the primary server, the connection is accepted. If you have connected to a non-primary server (such as, the mirror server, or a copy node), the database server redirects the connection to the primary server.

  • COPY   When the NodeType connection parameter is set to COPY, the database server performs load balancing and chooses a copy node. In a read-only scale-out system, the database server examines the copy nodes in its own branch (including itself if it is not the root node) and chooses the copy node with the lightest load. If the database server does not choose itself, it redirects the client to the chosen database server.

  • MIRROR   If the NodeType connection parameter is set to MIRROR and you have connected to the mirror server, the connection is accepted. If you have connected to a non-mirror server, the database server redirects the connection to the mirror server.

  • READONLY   When the NodeType connection parameter is set to READONLY, you are connected to any read-only server, either a copy node or the mirror. If there are no copy nodes, this is equivalent to the MIRROR setting. If there are copy nodes, this is equivalent to the COPY setting.

Once the root database server determines which copy node the connection should be made to, the connection is automatically redirected (if necessary) to that node.

 See also