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 » Database mirroring » Maintaining a database mirroring system » Role switches (failovers) in database mirroring


User initiated role switches (failovers)

Initiate a database mirroring failover (role switch) from the primary server to the mirror server without stopping the server, by connecting to the primary server and executing the following statement:


When this statement is executed, any existing connections to the database are closed, including the connection that executed the statement. If the statement is contained in a procedure or event, other statements that follow it may not be executed. The privileges required to execute this statement are controlled by the -gd server option.

This statement is an alternative to specifying a preferred server, and can be used with logic that controls when ownership of the database is given to a specific database server. For example, you can initiate failover based on the availability of the partner server (determined by the value of the PartnerState database property), or the number of connections to the database (determined by the value of the ConnCount database property).

 See also