The following steps describe how you can test a failover situation for the SADatabase agent.
Connect to the database from Interactive SQL. For example:
dbisql -c "UID=DBA;PWD=sql;ENG=VCS;LINKS=tcpip"
Execute the following query:
SELECT * FROM Departments;
The query should execute without errors.
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:
dbisql -q -c "UID=DBA;PWD=sql;ENG=VCS1;DBN=utility_db" STOP DATABASE DEMO ON VCS1 UNCONDITIONALLY;
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 will be 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:
Reconnect to Interactive SQL. You should be able to connect and execute the query successfully.