Skip to content

Latest commit

 

History

History
40 lines (29 loc) · 1.8 KB

setfailoverpartner-method-sqlserverdatasource.md

File metadata and controls

40 lines (29 loc) · 1.8 KB
title description author ms.author ms.date ms.service ms.subservice ms.topic apilocation apiname apitype
setFailoverPartner Method (SQLServerDataSource)
setFailoverPartner Method (SQLServerDataSource)
David-Engel
davidengel
01/19/2017
sql
connectivity
reference
sqljdbc.jar
SQLServerDataSource.setFailoverPartner
Assembly

setFailoverPartner Method (SQLServerDataSource)

[!INCLUDEDriver_JDBC_Download]

Sets the name of the failover server that is used in a database mirroring configuration.

Syntax

  
public void setFailoverPartner(java.lang.String serverName)  

Parameters

serverName

A String that contains the failover server name.

Remarks

The value set by this method is used in the case of an initial connection failure to the principal server; after the initial connection is made, this value is ignored. The setDatabaseName method should also be used in conjunction with this method or an exception will be thrown.

The driver does not support specifying the port number of the failover server when the failover server name is set. However, calling the setServerName method and the setInstanceName method with the setFailoverPartner method is supported.

See Also

SQLServerDataSource Members
SQLServerDataSource Class