You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/connect/php/connection-options.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -35,9 +35,9 @@ This topic lists the options that are permitted in the associative array (when u
35
35
|DecimalPlaces<br /><br />(not supported in the PDO_SQLSRV driver)|Integer between 0 and 4 (inclusive)|Specifies the decimal places when formatting fetched money values.<br /><br />This option works only when `FormatDecimals` is true. Any negative integer or value more than 4 will be ignored.|Default precision and scale|
36
36
|Driver|String|Specifies the Microsoft ODBC driver used to communicate with SQL Server.<br /><br />Possible values are:<br />ODBC Driver 17 for SQL Server<br />ODBC Driver 13 for SQL Server<br />ODBC Driver 11 for SQL Server (Windows only).|When the Driver keyword is not specified, the Microsoft Drivers for PHP for SQL Server attempt to find supported Microsoft ODBC driver(s) in the system, starting with the latest version of ODBC and so on.|
37
37
|Encrypt|1 or **true** for encryption on.<br /><br />0 or **false** for encryption off.|Specifies whether the communication with SQL Server is encrypted (1 or **true**) or unencrypted (0 or **false**)<sup>3</sup>.|**false** (0)|
38
-
|Failover_Partner|String|Specifies the server and instance of the database's mirror (if enabled and configured) to use when the primary server is unavailable.<br /><br />There are restrictions to using `Failover_Partner` with `MultiSubnetFailover`. For more information, see [Support for High Availability, Disaster Recovery](php-driver-for-sql-server-support-for-high-availability-disaster-recovery.md).<br /><br />This option is not supported on Linux or macOS because database mirroring is not supported by the ODBC driver on Linux or macOS. Instead, use Always On availability groups and set the `MultiSubnetFailover` and `TransparentNetworkIPResolution` options.|Not set.|
39
-
|FormatDecimals<br /><br />(not supported in the PDO_SQLSRV driver)|1 or **true** to format fetched decimal strings.<br /><br />0 or **false** for default decimal formatting behavior.|Specifies whether to add leading zeroes to decimal strings when appropriate and enables the `DecimalPlaces` option for formatting money types. If left false, the default behavior of returning exact precision and omitting leading zeroes for values less than 1 is used.<br /><br />For more information, see [Formatting Decimal Strings and Money Values](formatting-decimals-sqlsrv-driver.md).|**false** (0)|
40
-
|KeyStoreAuthentication|**KeyVaultPassword**<br /><br />**KeyVaultClientSecret**|Authentication method for accessing Azure Key Vault. Controls what kind of credentials are used with `KeyStorePrincipalId` and `KeyStoreSecret`. For more information, see [Using Azure Key Vault](using-always-encrypted-php-drivers.md#using-azure-key-vault).|Not set.|
38
+
|Failover_Partner|String|Specifies the server and instance of the database's mirror (if enabled and configured) to use when the primary server is unavailable.<br /><br />There are restrictions to using `Failover_Partner` with `MultiSubnetFailover`. For more information, see [Support for High Availability, Disaster Recovery](../../connect/php/php-driver-for-sql-server-support-for-high-availability-disaster-recovery.md).<br /><br />This option is not supported on Linux or macOS because database mirroring is not supported by the ODBC driver on Linux or macOS. Instead, use Always On availability groups and set the `MultiSubnetFailover` and `TransparentNetworkIPResolution` options.|Not set.|
39
+
|FormatDecimals<br /><br />(not supported in the PDO_SQLSRV driver)|1 or **true** to format fetched decimal strings.<br /><br />0 or **false** for default decimal formatting behavior.|Specifies whether to add leading zeroes to decimal strings when appropriate and enables the `DecimalPlaces` option for formatting money types. If left false, the default behavior of returning exact precision and omitting leading zeroes for values less than 1 is used.<br /><br />For more information, see [Formatting Decimal Strings and Money Values](../../connect/php/formatting-decimals-sqlsrv-driver.md).|**false** (0)|
40
+
|KeyStoreAuthentication|**KeyVaultPassword**<br /><br />**KeyVaultClientSecret**|Authentication method for accessing Azure Key Vault. Controls what kind of credentials are used with `KeyStorePrincipalId` and `KeyStoreSecret`. For more information, see [Using Azure Key Vault](../../connect/php/using-always-encrypted-php-drivers.md#using-azure-key-vault).|Not set.|
41
41
|KeyStorePrincipalId|String|Identifier for the account seeking to access Azure Key Vault. <br /><br />If `KeyStoreAuthentication` is **KeyVaultPassword**, this must be an Azure Active Directory username. <br /><br />If `KeyStoreAuthentication` is **KeyVaultClientSecret**, this must be an application client ID.|Not set.|
42
42
|KeyStoreSecret|String|Credential secret for the account seeking to access Azure Key Vault. <br /><br />If `KeyStoreAuthentication` is **KeyVaultPassword**, this must be an Azure Active Directory password. <br /><br />If `KeyStoreAuthentication` is **KeyVaultClientSecret**, this must be an application client secret.|Not set.|
43
43
|Language|String|Specifies the language of messages returned by the server. The available languages are listed in the `sys.syslanguages` table. <br /><br />This option does not affect the language used by the drivers themselves, as they are currently available only in English, and it does not affect the language of the underlying ODBC driver, whose language is determined by the localized version installed on the client system. Therefore, changing this setting may result in messages being returned in different languages, depending on whether they come from the PHP driver, the ODBC driver, or SQL Server.|The default is the language set in SQL Server.|
@@ -48,7 +48,7 @@ This topic lists the options that are permitted in the associative array (when u
48
48
|QuotedId|1 or **true** to use SQL-92 rules.<br /><br />0 or **false** to use legacy rules.|Specifies whether to use SQL-92 rules for quoted identifiers (1 or **true**) or to use legacy Transact-SQL rules (0 or **false**).|**true** (1)|
49
49
|ReturnDatesAsStrings<br /><br />(not supported in the PDO_SQLSRV driver)|1 or **true** to return date and time types as strings.<br /><br />0 or **false** to return date and time types as PHP **DateTime** types.|Retrieves date and time types (datetime, smalldatetime, date, time, datetime2, and datetimeoffset) as strings or as PHP types. For more information, see [How to: Retrieve Date and Time Types as Strings Using the SQLSRV Driver](how-to-retrieve-date-and-time-type-as-strings-using-the-sqlsrv-driver.md). <br /><br />When using the PDO_SQLSRV driver, dates are returned as strings unless otherwise specified. For more information, see [How to: Retrieve Date and Time Types as PHP DateTime Objects Using the PDO_SQLSRV Driver](how-to-retrieve-datetime-objects-using-pdo-sqlsrv-driver.md).|**false**|
50
50
|Scrollable|String|"buffered" indicates that you want a client-side (buffered) cursor, which allows you to cache an entire result set in memory. For more information, see [Cursor Types (SQLSRV Driver)](cursor-types-sqlsrv-driver.md).|Forward-only cursor|
51
-
|Server<br /><br />(not supported in the SQLSRV driver)|String|The [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] instance to connect to.<br /><br />You can also specify a virtual network name, to connect to an AlwaysOn availability group. For more information about [!INCLUDE[ssDriverPHP](../../includes/ssdriverphp_md.md)] support for [!INCLUDE[ssHADR](../../includes/sshadr_md.md)], see [Support for High Availability, Disaster Recovery](php-driver-for-sql-server-support-for-high-availability-disaster-recovery.md).|Server is a required keyword (although it does not have to be the first keyword in the connection string). If a server name is not passed to the keyword, an attempt is made to connect to the local instance.<br /><br />The value passed to Server can be the name of a [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] instance, or the IP address of the instance. You can optionally specify a port number (for example, `sqlsrv:server=(local),1033`).<br /><br />Beginning in version 3.0 of the [!INCLUDE[ssDriverPHP](../../includes/ssdriverphp_md.md)] you can also specify a LocalDB instance with `server=(localdb)\instancename`. For more information, see [Support for LocalDB](php-driver-for-sql-server-support-for-localdb.md).|
51
+
|Server<br /><br />(not supported in the SQLSRV driver)|String|The [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] instance to connect to.<br /><br />You can also specify a virtual network name, to connect to an AlwaysOn availability group. For more information about [!INCLUDE[ssDriverPHP](../../includes/ssdriverphp_md.md)] support for [!INCLUDE[ssHADR](../../includes/sshadr_md.md)], see [Support for High Availability, Disaster Recovery](../../connect/php/php-driver-for-sql-server-support-for-high-availability-disaster-recovery.md).|Server is a required keyword (although it does not have to be the first keyword in the connection string). If a server name is not passed to the keyword, an attempt is made to connect to the local instance.<br /><br />The value passed to Server can be the name of a [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] instance, or the IP address of the instance. You can optionally specify a port number (for example, `sqlsrv:server=(local),1033`).<br /><br />Beginning in version 3.0 of the [!INCLUDE[ssDriverPHP](../../includes/ssdriverphp_md.md)] you can also specify a LocalDB instance with `server=(localdb)\instancename`. For more information, see [Support for LocalDB](../../connect/php/php-driver-for-sql-server-support-for-localdb.md).|
52
52
|TraceFile|String|Specifies the path for the file used for trace data.|Not set.|
53
53
|TraceOn|1 or **true** to enable tracing.<br /><br />0 or **false** to disable tracing.|Specifies whether ODBC tracing is enabled (1 or **true**) or disabled (0 or **false**) for the connection being established.|**false** (0)|
54
54
|TransactionIsolation|The SQLSRV driver uses the following values:<br /><br />SQLSRV_TXN_READ_UNCOMMITTED<br /><br />SQLSRV_TXN_READ_COMMITTED<br /><br />SQLSRV_TXN_REPEATABLE_READ<br /><br />SQLSRV_TXN_SNAPSHOT<br /><br />SQLSRV_TXN_SERIALIZABLE<br /><br />The PDO_SQLSRV driver uses the following values:<br /><br />PDO::SQLSRV_TXN_READ_UNCOMMITTED<br /><br />PDO::SQLSRV_TXN_READ_COMMITTED<br /><br />PDO::SQLSRV_TXN_REPEATABLE_READ<br /><br />PDO::SQLSRV_TXN_SNAPSHOT<br /><br />PDO::SQLSRV_TXN_SERIALIZABLE|Specifies the transaction isolation level.<br /><br />For more information about transaction isolation, see [SET TRANSACTION ISOLATION LEVEL](../../t-sql/statements/set-transaction-isolation-level-transact-sql.md) in the SQL Server documentation.|SQLSRV_TXN_READ_COMMITTED<br /><br />or<br /><br />PDO::SQLSRV_TXN_READ_COMMITTED|
0 commit comments