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:
ALTER DATABASE SET PARTNER FAILOVER;
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).
Discuter à propos de cette page dans DocCommentXchange.
|Copyright © 2013, SAP AG ou société affiliée SAP - SAP Sybase SQL Anywhere 16.0|