Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
46ed866
updated system req with 4.3
Jul 12, 2017
d0fac95
fixed Acrolinx issues
Jul 12, 2017
95fbdc9
fixed spacing issue
Jul 12, 2017
100c08a
Update connection-options.md
ulvii Jul 12, 2017
e18c3d6
Merge pull request #4 from MicrosoftDocs/master
WilliamAntonRohm Jul 12, 2017
d46d5dc
added image files
WilliamAntonRohm Jul 12, 2017
649d8ba
added entry for new Auto Seeding Secondary Replicas article
WilliamAntonRohm Jul 12, 2017
361738a
created new article: Automatic Seeding of Secondary Replicas
WilliamAntonRohm Jul 12, 2017
2d367e6
fixed link
WilliamAntonRohm Jul 12, 2017
7ce1cb1
Update connection-options.md
ulvii Jul 13, 2017
38d91e4
Update connection-options.md
ulvii Jul 13, 2017
0f81963
removed identifying information
WilliamAntonRohm Jul 13, 2017
cea060a
minor edits per PR feedback
WilliamAntonRohm Jul 13, 2017
2be0752
obfuscated identifying information
WilliamAntonRohm Jul 13, 2017
07feb7a
updated metadata with services & description
WilliamAntonRohm Jul 13, 2017
fddd329
fixed indentations
Jul 13, 2017
08ac91d
fixed Acrolinx issues
Jul 13, 2017
a41728b
fixed peer review comments
Jul 13, 2017
19f5cb6
fix syntax bug
barbkess Jul 13, 2017
5402d3d
put trim reason in right column order
barbkess Jul 13, 2017
6de7d0c
fix applies to
barbkess Jul 13, 2017
9e9f1df
added SQL Server 2017
Jul 14, 2017
c126f83
Merge pull request #2466 from barbkess/wp2
Jul 14, 2017
01dbcf5
Update connection-options.md
ulvii Jul 14, 2017
2917e97
Merge pull request #2430 from Hadis-Fard/systemRequirement
GitHubber17 Jul 14, 2017
e0e55ce
Merge pull request #2437 from ulvii/patch-1
GitHubber17 Jul 14, 2017
f5266a3
Merge pull request #2467 from stevestein/StevesBranch
GitHubber17 Jul 14, 2017
6a9900f
Merge pull request #2440 from WilliamAntonRohm/w-auto-seeding-seconda…
GitHubber17 Jul 14, 2017
4f54ada
Update docfx.json
sudeepku Jul 14, 2017
b26a8f5
Update docfx.json
sudeepku Jul 14, 2017
6e9472c
Update docfx.json
sudeepku Jul 14, 2017
4499ac3
Merge pull request #2474 from MicrosoftDocs/sudeepku-patch-1
sudeepku Jul 14, 2017
de25852
Merge pull request #2475 from MicrosoftDocs/master
sudeepku Jul 14, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 13 additions & 11 deletions docs/connect/php/connection-options.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,31 +26,33 @@ This topic lists the options that are permitted in the associative array (when u
|ApplicationIntent|String|Declares the application workload type when connecting to a server. Possible values are ReadOnly and ReadWrite.<br /><br />For more information about [!INCLUDE[ssDriverPHP](../../includes/ssdriverphp_md.md)] support for [!INCLUDE[ssHADR](../../includes/sshadr_md.md)], see [PHP Driver for SQL Server Support for High Availability, Disaster Recovery](../../connect/php/php-driver-for-sql-server-support-for-high-availability-disaster-recovery.md).|ReadWrite|
|AttachDBFileName|String|Specifies which database file the server should attach.|No value set.|
|CharacterSet<br /><br />(not supported in the PDO_SQLSRV driver)|String|Specifies the character set used to send data to the server.<br /><br />Possible values are SQLSRV_ENC_CHAR and UTF-8. For more information, see [How to: Send and Retrieve UTF-8 Data Using Built-In UTF-8 Support](../../connect/php/how-to-send-and-retrieve-utf-8-data-using-built-in-utf-8-support.md).|SQLSRV_ENC_CHAR|
|ConnectionPooling|1 or **true** for connection pooling on.<br /><br />0 or **false** for connection pooling off.|Specifies whether the connection is assigned from a connection pool (1 or **true**) or not (0 or **false**).|**true** (1)|
|Database|String|Specifies the name of the database in use for the connection being established<sup>1</sup>.|The default database for the login being used.|
|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>2</sup>.|**false** (0)|
|ConnectionPooling|1 or **true** for connection pooling on.<br /><br />0 or **false** for connection pooling off.|Specifies whether the connection is assigned from a connection pool (1 or **true**) or not (0 or **false**).<sup>1</sup>|**true** (1)|
|Database|String|Specifies the name of the database in use for the connection being established<sup>2</sup>.|The default database for the login being used.|
|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)|
|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 [PHP Driver for SQL Server Support for High Availability, Disaster Recovery](../../connect/php/php-driver-for-sql-server-support-for-high-availability-disaster-recovery.md).|No value set.|
|LoginTimeout|Integer (SQLSRV driver<br /><br />String (PDO_SQLSRV driver|Specifies the number of seconds to wait before failing the connection attempt.|No timeout.|
|MultipleActiveResultSets|1 or **true** to use multiple active result sets.<br /><br />0 or **false** to disable multiple active result sets.|Disables or explicitly enables support for multiple active Result sets (MARS).<br /><br />For more information, see [How to: Disable Multiple Active Resultsets &#40;MARS&#41;](../../connect/php/how-to-disable-multiple-active-resultsets-mars.md).|true (1)|
|MultiSubnetFailover|String|Always specify **multiSubnetFailover=yes** when connecting to the availability group listener of a [!INCLUDE[ssSQL11](../../includes/sssql11_md.md)] availability group or a [!INCLUDE[ssSQL11](../../includes/sssql11_md.md)] Failover Cluster Instance. **multiSubnetFailover=yes** configures [!INCLUDE[ssDriverPHP](../../includes/ssdriverphp_md.md)] to provide faster detection of and connection to the (currently) active server. Possible values are Yes and No.<br /><br />For more information about [!INCLUDE[ssDriverPHP](../../includes/ssdriverphp_md.md)] support for [!INCLUDE[ssHADR](../../includes/sshadr_md.md)], see [PHP Driver for SQL Server Support for High Availability, Disaster Recovery](../../connect/php/php-driver-for-sql-server-support-for-high-availability-disaster-recovery.md).|No|
|PWD<br /><br />(not supported in the PDO_SQLSRV driver)|String|Specifies the password associated with the User ID to be used when connecting with SQL Server Authentication<sup>3</sup>.|No value set.|
|PWD<br /><br />(not supported in the PDO_SQLSRV driver)|String|Specifies the password associated with the User ID to be used when connecting with SQL Server Authentication<sup>4</sup>.|No value set.|
|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)|
|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, date, time, datetime2, and datetimeoffset) as strings or as PHP types. When using the PDO_SQLSRV driver, dates are returned as strings. The PDO_SQLSRV driver has no **datetime** type.<br /><br />For more information, see [How to: Retrieve Date and Time Type as Strings Using the SQLSRV Driver](../../connect/php/how-to-retrieve-date-and-time-type-as-strings-using-the-sqlsrv-driver.md).|**false**|
|Scrollable|String|"buffered" indicates that you want a client-side (buffered) cursor, which allows you to cache an entire result set in memory. See [Cursor Types &#40;SQLSRV Driver&#41;](../../connect/php/cursor-types-sqlsrv-driver.md) for more information.|Forward-only cursor|
|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 [PHP Driver for SQL Server 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 will be 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 [PHP Driver for SQL Server Support for LocalDB](../../connect/php/php-driver-for-sql-server-support-for-localdb.md).|
|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 &#40;SQLSRV Driver&#41;](../../connect/php/cursor-types-sqlsrv-driver.md).|Forward-only cursor|
|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 [PHP Driver for SQL Server 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 [PHP Driver for SQL Server Support for LocalDB](../../connect/php/php-driver-for-sql-server-support-for-localdb.md).|
|TraceFile|String|Specifies the path for the file used for trace data.|No value set.|
|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)|
|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](http://go.microsoft.com/fwlink/?LinkID=191497) in the SQL Server documentation.|SQLSRV_TXN_READ_COMMITTED<br /><br />or<br /><br />PDO::SQLSRV_TXN_READ_COMMITTED|
|TransparentNetworkIPResolution|**Enabled** or **Disabled**|Affects the connection sequence when the first resolved IP of the hostname does not respond and there are multiple IPs associated with the hostname.<br /><br />It interacts with MultiSubnetFailover to provide different connection sequences. For more information, see [Using Transparent Network IP Resolution](https://docs.microsoft.com/en-us/sql/connect/odbc/using-transparent-network-ip-resolution).|Enabled|
|TrustServerCertificate|1 or **true** to trust certificate.<br /><br />0 or **false** to not trust certificate.|Specifies whether the client should trust (1 or **true**) or reject (0 or **false**) a self-signed server certificate.|**false** (0)|
|UID<br /><br />(not supported in the PDO_SQLSRV driver)|String|Specifies the User ID to be used when connecting with SQL Server Authentication<sup>3</sup>.|No value set.|
|UID<br /><br />(not supported in the PDO_SQLSRV driver)|String|Specifies the User ID to be used when connecting with SQL Server Authentication<sup>4</sup>.|No value set.|
|WSID|String|Specifies the name of the computer for tracing.|No value set.|

1. The `ConnectionPooling` attribute cannot be used to enable/disable connection pooling in Linux and Mac. See [Connection Pooling (Microsoft Drivers for PHP for SQL Server)](../../connect/php/connection-pooling-microsoft-drivers-for-php-for-sql-server.md).

2. All queries executed on the established connection are made to the database that is specified by the *Database* attribute. However, if the user has the appropriate permissions, data in other databases can be accessed by using a fully qualified name. For example, if the *master* database is set with the *Database* connection attribute, it is still possible to execute a Transact-SQL query that accesses the *AdventureWorks.HumanResources.Employee* table by using the fully qualified name.

1. All queries executed on the established connection will be made to the database that is specified by the *Database* attribute. However, data in other databases can be accessed by using a fully-qualified name if the user has the appropriate permissions. For example, if the *master* database is set with the *Database* connection attribute, it is still possible to execute a Transact-SQL query that accesses the *AdventureWorks.HumanResources.Employee* table by using the fully-qualified name.

2. Enabling *Encryption* can impact the performance of some applications due to the computational overhead required to encrypt data.
3. Enabling *Encryption* can impact the performance of some applications due to the computational overhead required to encrypt data.

3. The *UID* and *PWD* attributes must both be set when connecting with [!INCLUDE[ssNoVersion](../../includes/ssnoversion_md.md)] Authentication.
4. The *UID* and *PWD* attributes must both be set when connecting with [!INCLUDE[ssNoVersion](../../includes/ssnoversion_md.md)] Authentication.

Many of the supported keys are ODBC connection string attributes. For information about ODBC connection strings, see [Using Connection String Keywords with SQL Native Client](http://go.microsoft.com/fwlink/?LinkId=105504).

Expand Down
Loading