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 Veritas Cluster Server agents » SADatabase agent configuration

 

Testing the SADatabase agent

You can test the SADatabase agent failover from Interactive SQL.

Prerequisites

Your systems must be set up as follows to use the SQL Anywhere Veritas Cluster Server agents:

  • You must use Veritas Cluster Server 4.1 or later.

  • SQL Anywhere must be installed identically on each system node within the cluster.

  • Database files must be stored on a shared storage device that is accessible to all systems within the cluster.

  • The utility database password must be the same for all systems within the cluster.

    The SADatabase agent uses the utility database to start and stop specific database files. All systems participating in the cluster must have the same utility database password. You can set the utility database password by specifying the -su server option when starting the database server.

  • On Unix, the VCS agent is installed in $SQLANY16/vcsagent/saserver.

You must have SELECT privilege on the table you are selecting from, or the SELECT ANY TABLE system privilege.

The required privileges to stop a database on the network server are determined by the database server -gd option. The default system privilege for stopping a database on the network server is SERVER OPERATOR.

 Task
  1. Connect to the database from Interactive SQL. For example:

    dbisql -c "UID=DBA;PWD=sql;Server=VCS;HOST=HostName"
  2. Execute the following query:

    SELECT * FROM Departments;

    The query should execute without errors.

  3. Suppose the database failed, and the database server running on the first system node cannot access the database file. This would create a failover of the database file to the database server started on the second system node. You can cause the database file on the first node to fail by issuing a command similar to the following command:

    dbisql -q -c "UID=DBA;PWD=sql;Server=VCS1;DBN=utility_db" STOP DATABASE DEMO ON VCS1 UNCONDITIONALLY;

Results

The database file on the first computer fails. There is a delay before Veritas Cluster Server recognizes that the file has failed because Veritas Cluster Server monitors the health of its resource, every 60 seconds by default (you can make this interval smaller in your resource configuration). The database file then fails over to the second computer, and that database file is started using the database server on the second computer, which may have a different name than the original database server.

For example, if the new database server is called VCS2, then clients must specify the new database server name in their connection strings:

"UID=DBA;PWD=sql;Server=VCS2;DBN=DEMO;HOST=HostName"

Next

Reconnect from Interactive SQL. You should be able to connect and execute the query successfully.

 See also