Description
Specifies the name of a mirror server, allowing you to maintain database availability if a failover event occurs.
Applies to
SNC SQL Native Client for Microsoft SQL Server
MSOLEDBSQL Microsoft OLE DB Driver for SQL Server
Syntax
FailoverPartner =value
Default value
None
Usage
When failover occurs, the existing PowerBuilder connection to SQL Server is lost. The SNC driver releases the existing connection and tries to reopen it. If reconnection succeeds, PowerBuilder triggers the DBNotification event.
The following conditions must be satisfied for PowerBuilder to trigger the failover event:
-
The FailoverPartner DBParm is supplied at connect time
-
The SQL Server database is configured for mirroring
-
PowerBuilder is able to reconnect successfully when the existing connection is lost
When failover occurs:
-
PowerBuilder returns an error code (998) and triggers the DBNotification event with notification type DBFailover!
-
Existing cursors cannot be used and should be closed
-
Any failed database operation can be tried again
-
Any uncommitted transaction is lost. New transactions must be started
Examples
The following example sets the name of a mirror server for failover events:
-
Database profile
Type the mirror server name in the Failover Partner text box on the System page of the Database Profile Setup dialog box.
-
Application
Type the following in code:
my_trans.dbparm="FailoverPartner='myMirrorServer'"