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-pooling-microsoft-drivers-for-php-for-sql-server.md
+72-8Lines changed: 72 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
2
title: "Connection Pooling (Microsoft Drivers for PHP for SQL Server) | Microsoft Docs"
3
3
ms.custom: ""
4
-
ms.date: "07/10/2017"
4
+
ms.date: "08/01/2018"
5
5
ms.prod: sql
6
6
ms.prod_service: connectivity
7
7
ms.reviewer: ""
@@ -24,7 +24,7 @@ The following are important points to note about connection pooling in the [!INC
24
24
25
25
- The [!INCLUDE[ssDriverPHP](../../includes/ssdriverphp_md.md)] uses ODBC connection pooling.
26
26
27
-
- By default, connection pooling is enabled in Windows. In Linux and Mac OS X, connections are pooled only if connection pooling is enabled for ODBC. When connection pooling is enabled and you connect to a server, the driver attempts to use a pooled connection before it creates a new one. If an equivalent connection is not found in the pool, a new connection is created and added to the pool. The driver determines whether connections are equivalent based on a comparison of connection strings.
27
+
- By default, connection pooling is enabled in Windows. In Linux and macOS, connections are pooled only if connection pooling is enabled for ODBC (see [Enabling/Disabling connection pooling](#enablingdisabling-connection-pooling)). When connection pooling is enabled and you connect to a server, the driver attempts to use a pooled connection before it creates a new one. If an equivalent connection is not found in the pool, a new connection is created and added to the pool. The driver determines whether connections are equivalent based on a comparison of connection strings.
28
28
29
29
- When a connection from the pool is used, the connection state is reset.
30
30
@@ -39,25 +39,89 @@ You can force the driver to create a new connection (instead of looking for an e
39
39
If the *ConnectionPooling* attribute is omitted from the connection string or if it is set to **true** (or 1), the driver only creates a new connection if an equivalent connection does not exist in the connection pool.
40
40
41
41
For information about other connection attributes, see [Connection Options](../../connect/php/connection-options.md).
42
-
### Linux and Mac OS X
43
-
*ConnectionPooling* attribute cannot be used to enable/disable connection pooling.
42
+
### Linux and macOS
43
+
The *ConnectionPooling* attribute cannot be used to enable/disable connection pooling.
44
44
45
-
Connection pooling can be enabled/disabled by editing odbcinst.ini configuration file. The driver should be reloaded for the changes to take effect.
45
+
Connection pooling can be enabled/disabled by editing the odbcinst.ini configuration file. The driver should be reloaded for the changes to take effect.
46
46
47
-
Setting `Pooling` to `Yes` and a positive `CPTimeout`value in odbcinst.ini enables connection pooling.
47
+
Setting `Pooling` to `Yes` and a positive `CPTimeout`value in the odbcinst.ini file enables connection pooling.
48
48
```
49
49
[ODBC]
50
50
Pooling=Yes
51
51
52
52
[ODBC Driver 13 for SQL Server]
53
53
CPTimeout=<int value>
54
54
```
55
-
Setting `Pooling` to `No` in odbcinst.ini forces the driver to create a new connection.
55
+
56
+
Minimally, the odbcinst.ini file should look something like this example:
57
+
58
+
```
59
+
[ODBC]
60
+
Pooling=Yes
61
+
62
+
[ODBC Driver 13 for SQL Server]
63
+
Description=Microsoft ODBC Driver 13 for SQL Server
Setting `Pooling` to `No` in the odbcinst.ini file forces the driver to create a new connection.
56
70
```
57
71
[ODBC]
58
72
Pooling=No
59
73
```
60
-
74
+
75
+
## Remarks
76
+
- In Linux or macOS, all connections will be pooled if pooling is enabled in the odbcinst.ini file. This means the ConnectionPooling connection option has no effect. To disable pooling, set Pooling=No in the odbcinst.ini file and reload the drivers.
77
+
- unixODBC <= 2.3.4 (Linux and macOS) might not return proper diagnostic information, such as error messages, warnings and informative messages
78
+
- for this reason, SQLSRV and PDO_SQLSRV drivers might not be able to properly fetch long data (such as xml, binary) as strings. Long data can be fetched as streams as a workaround. See the example below for SQLSRV.
Copy file name to clipboardExpand all lines: docs/connect/php/pdo-query.md
+51-3Lines changed: 51 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
2
title: "PDO::query | Microsoft Docs"
3
3
ms.custom: ""
4
-
ms.date: "01/19/2017"
4
+
ms.date: "08/01/2018"
5
5
ms.prod: sql
6
6
ms.prod_service: connectivity
7
7
ms.reviewer: ""
@@ -113,8 +113,56 @@ while ( $stmt->fetch() ){
113
113
114
114
$stmt = null;
115
115
?>
116
-
```
117
-
116
+
```
117
+
118
+
## Example
119
+
This code sample shows how to create a table of [sql_variant](https://docs.microsoft.com/sql/t-sql/data-types/sql-variant-transact-sql) types and fetch the inserted data.
120
+
121
+
```
122
+
<?php
123
+
$server = 'serverName';
124
+
$dbName = 'databaseName';
125
+
$uid = 'yourUserName';
126
+
$pwd = 'yourPassword';
127
+
128
+
$conn = new PDO("sqlsrv:server=$server; database = $dbName", $uid, $pwd);
Copy file name to clipboardExpand all lines: docs/connect/php/sqlsrv-query.md
+58-1Lines changed: 58 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
2
title: "sqlsrv_query | Microsoft Docs"
3
3
ms.custom: ""
4
-
ms.date: "05/22/2018"
4
+
ms.date: "08/01/2018"
5
5
ms.prod: sql
6
6
ms.prod_service: connectivity
7
7
ms.reviewer: ""
@@ -186,6 +186,63 @@ sqlsrv_close($conn);
186
186
?>
187
187
```
188
188
189
+
## Example
190
+
This code sample shows how to create a table of [sql_variant](https://docs.microsoft.com/sql/t-sql/data-types/sql-variant-transact-sql) types and fetch the inserted data.
For more information on Pacemaker cluster properties, see [Configuring Cluster Resources](https://www.suse.com/documentation/sle_ha/book_sleha/data/sec_ha_config_crm_resources.html).
212
212
213
-
# Configure fencing (STONITH)
213
+
## Configure fencing (STONITH)
214
214
Pacemaker cluster vendors require STONITH to be enabled and a fencing device configured for a supported cluster setup. When the cluster resource manager cannot determine the state of a node or of a resource on a node, fencing is used to bring the cluster to a known state again.
215
215
216
216
Resource level fencing ensures mainly that there is no data corruption during an outage by configuring a resource. You can use resource level fencing, for instance, with DRBD (Distributed Replicated Block Device) to mark the disk on a node as outdated when the communication link goes down.
Refer to [SLES Administration Guid](https://www.suse.com/documentation/sle-ha-12/singlehtml/book_sleha/book_sleha.html#cha.ha.manual_config)
235
235
236
+
## Enable Pacemaker
237
+
238
+
Enable Pacemaker so that it automatically starts.
239
+
240
+
Run the following command on every node in the cluster.
241
+
242
+
```bash
243
+
systemctl enable pacemaker
244
+
```
245
+
236
246
### Create availability group resource
237
247
238
248
The following command creates and configures the availability group resource for three replicas of availability group [ag1]. The monitor operations and timeouts have to be specified explicitly in SLES based on the fact that timeouts are highly workload-dependent and need to be carefully adjusted for each deployment.
This topic is relevant only for databases in the Enterprise edition of [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] that contain multiple files or filegroups; and, under the simple model, only for read-only filegroups.
25
+
This topic is relevant for databases in the Enterprise edition of [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] (online restore) or Standard edition (offline restore) that contain multiple files or filegroups; and, under the simple model, only for read-only filegroups.
26
26
27
27
For information about piecemeal restore and memory-optimized tables, see [Piecemeal Restore of Databases With Memory-Optimized Tables](../../relational-databases/in-memory-oltp/piecemeal-restore-of-databases-with-memory-optimized-tables.md).
Copy file name to clipboardExpand all lines: docs/relational-databases/indexes/columnstore-indexes-overview.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -141,7 +141,7 @@ When you create a table with the `CREATE TABLE` statement, you can create the ta
141
141
|Create a table as a columnstore.|[CREATE TABLE (Transact-SQL)](../../t-sql/statements/create-table-transact-sql.md)|Beginning with [!INCLUDE[ssSQL15](../../includes/sssql15-md.md)], you can create the table as a clustered columnstore index. You don't have to first create a rowstore table and then convert it to columnstore.|
142
142
|Create a memory table with a columnstore index.|[CREATE TABLE (Transact-SQL)](../../t-sql/statements/create-table-transact-sql.md)|Beginning with [!INCLUDE[ssSQL15](../../includes/sssql15-md.md)], you can create a memory-optimized table with a columnstore index. The columnstore index can also be added after the table is created by using the `ALTER TABLE ADD INDEX` syntax.|
143
143
|Convert a rowstore table to a columnstore.|[CREATE COLUMNSTORE INDEX (Transact-SQL)](../../t-sql/statements/create-columnstore-index-transact-sql.md)|Convert an existing heap or binary tree to a columnstore. Examples show how to handle existing indexes and also the name of the index when performing this conversion.|
144
-
|Convert a columnstore table to a rowstore.|[CREATE COLUMNSTORE INDEX (Transact-SQL)](../../t-sql/statements/create-columnstore-index-transact-sql.md)|Usually this conversion isn't necessary, but there can be times when you need to convert. Examples show how to convert a columnstore to a heap or clustered index.|
144
+
|Convert a columnstore table to a rowstore.|[CREATE CLUSTERED INDEX (Transact-SQL)OR DROP INDEX](../../relational-databases/indexes/create-clustered-indexes.md)|Usually this conversion isn't necessary, but there can be times when you need to convert. Examples show how to convert a columnstore to a heap or clustered index.|
145
145
|Create a columnstore index on a rowstore table.|[CREATE COLUMNSTORE INDEX (Transact-SQL)](../../t-sql/statements/create-columnstore-index-transact-sql.md)|A rowstore table can have one columnstore index. Beginning with [!INCLUDE[ssSQL15](../../includes/sssql15-md.md)], the columnstore index can have a filtered condition. Examples show the basic syntax.|
146
146
|Create performant indexes for operational analytics.|[Get started with columnstore for real-time operational analytics](../../relational-databases/indexes/get-started-with-columnstore-for-real-time-operational-analytics.md)|Describes how to create complementary columnstore and btree indexes, so that OLTP queries use btree indexes and analytics queries use columnstore indexes.|
147
147
|Create performant columnstore indexes for data warehousing.|[Columnstore indexes for data warehousing](~/relational-databases/indexes/columnstore-indexes-data-warehouse.md)|Describes how to use btree indexes on columnstore tables to create performant data warehousing queries.|
0 commit comments