Skip to content

Commit 7404196

Browse files
committed
Bringing even with master.
2 parents 239652d + e1c5198 commit 7404196

5 files changed

Lines changed: 71 additions & 27 deletions

File tree

docs/database-engine/availability-groups/windows/configure-availability-group-for-distributed-transactions.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: "Configure availability group for distributed transactions | Microsoft Docs"
33
ms.custom: ""
4-
ms.date: "07/19/2017"
4+
ms.date: "05/22/2018"
55
ms.prod: sql
66
ms.prod_service: high-availability
77
ms.reviewer: ""
@@ -29,7 +29,7 @@ manager: craigg
2929
In order to guarantee distributed transactions, the availability group must be configured to register databases as distributed transaction resource managers.
3030

3131
>[!NOTE]
32-
>[!INCLUDE[SQL2016](../../../includes/sssql15-md.md)] also supports distributed transactions, however support in [!INCLUDE[SQL2016](../../../includes/sssql15-md.md)] is limited. In [!INCLUDE[SQL2016](../../../includes/sssql15-md.md)] a distributed transaction with a database in an availability group is not supported if it includes more than one database on the same server. [!INCLUDE[SQL2017](../../../includes/sssqlv14-md.md)] does not have this limitation.
32+
>[!INCLUDE[SQL Server 2016]](../../../includes/sssql15-md.md)] Service Pack 2 and later provides full support for distributed transactions in availability groups. In [!INCLUDE[SQL Server 2016]](../../../includes/sssql15-md.md)] versions prior to Service Pack 2, cross-database distributed transactions (i.e. transaction using databases on the same SQL Server instance) involving a database in an availability group are not supported. [!INCLUDE[SQL2017](../../../includes/sssqlv14-md.md)] does not have this limitation.
3333
>
3434
>In [!INCLUDE[SQL2016](../../../includes/sssql15-md.md)] the configuration steps are the same as in [!INCLUDE[SQL2017](../../../includes/sssqlv14-md.md)].
3535
@@ -51,7 +51,7 @@ Configure an availability group to support distributed transactions. Set the ava
5151

5252
You can create an availability group for distributed transactions on [!INCLUDE[SQL2016](../../../includes/sssql15-md.md)] or later. To create an availability group for distributed transactions, include `DTC_SUPPORT = PER_DB` in the availability group definition. The following script creates an availability group for distributed transactions.
5353

54-
```transact-sql
54+
```sql
5555
CREATE AVAILABILITY GROUP MyAG
5656
WITH (
5757
DTC_SUPPORT = PER_DB
@@ -77,7 +77,7 @@ CREATE AVAILABILITY GROUP MyAG
7777

7878
You can alter an availability group for distributed transactions on [!INCLUDE[SQL2017](../../../includes/sssqlv14-md.md)] or later. To alter an availability group for distributed transactions, include `DTC_SUPPORT = PER_DB` in the `ALTER AVAILABILITY GROUP` script. The example script changes the availability group to support distributed transactions.
7979

80-
```transact-sql
80+
```sql
8181
ALTER AVAILABILITY GROUP MyaAG
8282
SET (
8383
DTC_SUPPORT = PER_DB
@@ -162,19 +162,19 @@ Run only one of the following scripts:
162162

163163
* To commit the transaction, update and run the following script - replace the `yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy` with the in-doubt transaction UOW from the previous error message, and run:
164164

165-
```transact-sql
166-
KILL 'yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy' WITH COMMIT
167-
```
165+
```sql
166+
KILL 'yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy' WITH COMMIT
167+
```
168168

169169
* To roll back the transaction, update and run the following script - replace the `yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy` with the in-doubt transaction UOW from the previous error message, and run:
170170

171-
```transact-sql
172-
KILL 'yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy' WITH ROLLBACK
173-
```
171+
```sql
172+
KILL 'yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy' WITH ROLLBACK
173+
```
174174

175175
After you commit or roll back the transaction, you can use `ALTER DATABASE` to set the database online. Update and run the following script - set the database name for the name of the suspect database:
176176

177-
```transact-sql
177+
```sql
178178
ALTER DATABASE [DB1] SET ONLINE
179179
```
180180

docs/database-engine/availability-groups/windows/transactions-always-on-availability-and-database-mirroring.md

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: "Transactions - Always On availability groups and database mirroring | Microsoft Docs"
33
ms.custom: ""
4-
ms.date: "11/01/2017"
4+
ms.date: "05/22/2018"
55
ms.prod: sql
66
ms.prod_service: high-availability
77
ms.reviewer: ""
@@ -24,14 +24,16 @@ manager: craigg
2424
# Transactions - availability groups and database mirroring
2525
[!INCLUDE[appliesto-ss-xxxx-xxxx-xxx-md](../../../includes/appliesto-ss-xxxx-xxxx-xxx-md.md)]
2626

27-
This topic describes cross-database and distributed transactions support for Always On availability groups and database mirroring.
27+
This article describes cross-database and distributed transactions support for Always On availability groups and database mirroring.
2828

2929
## Support for distributed transactions
3030

3131
SQL Server 2017 supports distributed transactions for databases in availability groups. This support includes databases on the same instance of SQL Server or databases on different instances of SQL Server. Distributed transactions are not supported for databases configured for database mirroring.
3232

3333
>[!NOTE]
34-
>[!INCLUDE[SQL Server 2016]](../../../includes/sssql15-md.md)]SQL Server 2016 included limited support for distributed transactions in for databases in an availability group. Distributed transactions using databases in an availability group were supported as long as no other databases in the transaction were in the same instance of SQL Server. For more information, see [SQL Server 2016 DTC Support In Availability Groups](http://blogs.technet.microsoft.com/dataplatform/2016/01/25/sql-server-2016-dtc-support-in-availability-gr)
34+
>[!INCLUDE[SQL Server 2016]](../../../includes/sssql15-md.md)] Service Pack 2 and later provides full support for distributed transactions in availability groups.
35+
>
36+
>In [!INCLUDE[SQL Server 2016]](../../../includes/sssql15-md.md)] versions prior to Service Pack 2, cross-database distributed transactions (i.e. transaction using databases on the same SQL Server instance) involving a database in an availability group are not supported.
3537
3638
To configure an availability group for distributed transactions, see [Configure Availability Group for Distributed Transactions](configure-availability-group-for-distributed-transactions.md).
3739

@@ -41,33 +43,33 @@ See more information at:
4143
- [DTC Developers Guide](http://msdn.microsoft.com/library/ms679938.aspx)
4244
- [DTC Programmers Reference](http://msdn.microsoft.com/library/ms686108.aspx)
4345

44-
## SQL Server 2016 and before: Support for cross-database transactions within the same SQL Server instance
46+
## SQL Server 2016 SP1 and before: Support for cross-database transactions within the same SQL Server instance
4547

46-
In SQL Server 2016 and before, cross-database transactions within the same SQL Server instance are not supported for availability groups. This means that no two databases in a cross-database transaction may be hosted by the same SQL Server instance. This is true even if those databases are part of the same availability group.
48+
In SQL Server 2016 SP1 and before, cross-database transactions within the same SQL Server instance are not supported for availability groups. No two databases in a cross-database transaction may be hosted by the same SQL Server instance if either or both databases are in an availability group. This limitation also applies when those databases are part of the same availability group.
4749

4850
Cross-database transactions are also not supported for database mirroring.
4951

50-
## <a name="dtcsupport"></a> SQL Server 2016: Support for distributed transactions
51-
Distributed transactions are supported with availability groups. This applies to distributed transactions between databases hosted by two different SQL Server instances. It also applies to distributed transactions between SQL Server and another DTC-compliant server.
52+
## <a name="dtcsupport"></a> SQL Server 2016 SP1 and before: Support for distributed transactions
53+
Distributed transactions are supported with availability groups when databases are hosted by different SQL Server instances. It also applies to distributed transactions between SQL Server instances and other DTC-compliant server.
5254

53-
Microsoft Distributed Transaction Coordinator (MSDTC or DTC) is a Windows service that provides transaction infrastructure for distributed systems. MSDTC permits client applications to include multiple data sources in one transaction which then is committed across all servers included in the transaction. For example, you can use MSDTC to coordinate transactions that span multiple databases on different servers.
55+
Microsoft Distributed Transaction Coordinator (MSDTC or DTC) is a Windows service that provides transaction infrastructure for distributed systems. MSDTC permits client applications to include multiple data sources in one transaction, which then is committed across all servers included in the transaction. For example, you can use MSDTC to coordinate transactions that span multiple databases on different servers.
5456

5557
SQL Server 2016 introduces the capability to use distributed transactions where one or more of the databases in the transaction are in an availability group. Prior to SQL Server 2016 distributed transactions were not supported for databases in availability groups. SQL Server 2016 can register a resource manager per database. This new capability is why distributed transactions can include databases in availability groups.
5658

5759
The following requirements must be met:
5860

59-
- Availability groups must be running on Windows Server 2016 or Windows Server 2012 R2. For Windows Server 2012 R2, you must install the update in KB3090973 available at [https://support.microsoft.com/en-us/kb/3090973](https://support.microsoft.com/en-us/kb/3090973).
61+
- Availability groups must be running on Windows Server 2012 R2 or later. For Windows Server 2012 R2, you must install the update in KB3090973 available at [https://support.microsoft.com/en-us/kb/3090973](https://support.microsoft.com/en-us/kb/3090973).
6062

6163
- Availability groups must be created with the **CREATE AVAILABILITY GROUP** command and the **WITH DTC\_SUPPORT = PER_DB** clause. You cannot currently alter an existing availability group.
6264

63-
- All instances of SQL Server that will participate in the availability group must be SQL Server 2016 or later.
65+
- All instances of SQL Server that participate in the availability group must be SQL Server 2016 or later.
6466

6567
## Non-support for distributed transactions
6668
Specific cases where distributed transactions are not supported include:
6769

68-
- In SQL Server 2016 and prior, where more than one database involved in the transaction is in the same availability group.
70+
- In SQL Server 2016 SP1 and prior, where more than one database involved in the transaction is in the same availability group.
6971

70-
- In SQL Server 2016 and prior, where at least one database is in an availability group and another database is on the same instance of SQL Server.
72+
- In SQL Server 2016 SP1 and prior, where at least one database is in an availability group and another database is on the same instance of SQL Server.
7173

7274
- Where the availability group was not created with enable distributed transaction.
7375

@@ -79,12 +81,12 @@ SQL Server 2016 introduces the capability to use distributed transactions where
7981
## Example scenario with database mirroring
8082
The following database mirroring example illustrates how a logical inconsistency could occur. In this example, an application uses a cross-database transaction to insert two rows of data: one row is inserted into a table in a mirrored database, A, and the other row is inserted into a table in another database, B. Database A is being mirrored in high-safety mode with automatic failover. While the transaction is being committed, database A becomes unavailable, and the mirroring session automatically fails over to the mirror of database A.
8183

82-
After the failover, the cross-database transaction might be successfully committed on database B but not on the failed-over database. This would occur if the original principal server for database A had not sent the log for the cross-database transaction to the mirror server before the failure. After the failover, that transaction would not exist on the new principal server. Databases A and B would become inconsistent, because the data inserted in database B remains intact, but the data inserted in database A has been lost.
84+
After the failover, the cross-database transaction might be successfully committed on database B but not on the failed-over database. For example, if the original principal server for database A had not sent the log for the cross-database transaction to the mirror server before the failure. After the failover, that transaction would not exist on the new principal server. Databases A and B would become inconsistent, because the data inserted in database B remains intact, but the data inserted in database A has been lost.
8385

84-
A similar scenario can occur while using a MS DTC transaction. For example, after failover, the new principal contacts MS DTC. But MS DTC has no knowledge of the new principal server, and it terminates any transactions that are "preparing to commit," which are considered committed in other databases.
86+
A similar scenario can occur while using an MS DTC transaction. For example, after failover, the new principal contacts MS DTC. But MS DTC has no knowledge of the new principal server, and it terminates any transactions that are "preparing to commit," which are considered committed in other databases.
8587

8688
> [!NOTE]
87-
> Using Database Mirroring with DTC or using availability groups with DTC in ways not approved in this topic is not supported. This does not imply that aspects of the product unrelated to DTC are unsupported; however, any issues arising from the improper use of distributed transactions will not be supported.
89+
> Using Database Mirroring with DTC or using availability groups with DTC in ways not approved in this article is not supported. This does not imply that aspects of the product unrelated to DTC are unsupported; however, any issues arising from the improper use of distributed transactions are not supported.
8890
8991
## Next steps
9092
[Always On availability groups: Interoperability &#40;SQL Server&#41;](../../../database-engine/availability-groups/windows/always-on-availability-groups-interoperability-sql-server.md)

docs/integration-services/packages/run-integration-services-ssis-packages.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ manager: craigg
3030
---
3131
# Run Integration Services (SSIS) Packages
3232
To run an [!INCLUDE[ssISnoversion](../../includes/ssisnoversion-md.md)] package, you can use one of several tools depending on where those packages are stored. The tools are listed in the table below.
33+
34+
> [!NOTE]
35+
> With the release of SQL Server for Linux, you can run SSIS packages on Linux. For more info, see [Extract, transform, and load data on Linux with SSIS](../../linux/sql-server-linux-migrate-ssis.md).
3336
3437
To store a package on the [!INCLUDE[ssISnoversion](../../includes/ssisnoversion-md.md)] server, you use the project deployment model to deploy the project to the server. For information, see [Deploy Integration Services (SSIS) Projects and Packages](../../integration-services/packages/deploy-integration-services-ssis-projects-and-packages.md).
3538

docs/relational-databases/performance/TOC.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@
22
# [Performance Center for SQL Server Database Engine and Azure SQL Database](performance-center-for-sql-server-database-engine-and-azure-sql-database.md)
33
# [Configuring Storage Spaces with a NVDIMM-N write-back cache](configuring-storage-spaces-with-a-nvdimm-n-write-back-cache.md)
44

5-
# [Adaptive Query Processing](adaptive-query-processing.md)
65
# [Automatic Tuning](../automatic-tuning/automatic-tuning.md)
76
# [Cardinality Estimation](cardinality-estimation-sql-server.md)
7+
# [Intelligent Query Processing](intelligent-query-processing.md)
8+
## [Adaptive Query Processing](adaptive-query-processing.md)
89

910
# [Monitor and Tune for Performance](monitor-and-tune-for-performance.md)
1011
## [Monitor SQL Server Components](monitor-sql-server-components.md)
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
title: "Intelligent query processing in Microsoft SQL databases | Microsoft Docs"
3+
description: "Intelligent query processing features to improve query performance in SQL Server and Azure SQL Database."
4+
ms.custom: ""
5+
ms.date: "05/22/2018"
6+
ms.prod: sql
7+
ms.prod_service: "database-engine, sql-database"
8+
ms.reviewer: ""
9+
ms.suite: "sql"
10+
ms.technology:
11+
ms.tgt_pltfrm: ""
12+
ms.topic: conceptual
13+
helpviewer_keywords:
14+
ms.assetid:
15+
author: "joesackmsft"
16+
ms.author: "josack"
17+
manager: craigg
18+
monikerRange: "= azuresqldb-current || >= sql-server-2016 || = sqlallproducts-allversions"
19+
---
20+
# Intelligent query processing in SQL databases
21+
[!INCLUDE[appliesto-ss-asdb-xxxx-xxx-md](../../includes/appliesto-xx-asdb-xxxx-xxx-md.md)]
22+
23+
The **Intelligent query processing** feature family contains features with broad impact that improve performance of existing workloads with minimal implementation effort. This includes improvements of pre-existing constructs and also the introduction of adaptive methods and capabilities.
24+
25+
## Adaptive query processing
26+
Within the intelligent query processing feature family is the adaptive query processing feature family introduced in SQL Server 2017 and Azure SQL Database which added overall new query processing capabilities that adapt optimization strategies to your application workload’s runtime conditions:
27+
- **Batch mode adaptive joins**. This feature allows your plan to dynamically switch to a better join strategy during execution using a single cached plan.
28+
- **Batch mode memory grant feedback**. This feature recalculates the actual memory required for a query and then updates the grant value for the cached plan, reducing excessive memory grants that impact concurrency and fixing underestimated memory grants that cause expensive spills to disk.
29+
- **Interleaved execution for multi-statement table valued functions (MSTVFs)**. With interleaved execution, we use the actual row counts from the function to make better-informed downstream query plan decisions.
30+
31+
For more information about adaptive query processing, refer to the [Adaptive query processing in SQL databases](../../relational-databases/performance/adaptive-query-processing.md).
32+
33+
## See also
34+
[Performance Center for SQL Server Database Engine and Azure SQL Database](../../relational-databases/performance/performance-center-for-sql-server-database-engine-and-azure-sql-database.md)
35+
[Query Processing Architecture Guide](../../relational-databases/query-processing-architecture-guide.md)
36+
[Showplan Logical and Physical Operators Reference](../../relational-databases/showplan-logical-and-physical-operators-reference.md)
37+
[Joins](../../relational-databases/performance/joins.md)
38+
[Demonstrating Adaptive Query Processing](https://github.com/joesackmsft/Conferences/blob/master/Data_AMP_Detroit_2017/Demos/AQP_Demo_ReadMe.md)

0 commit comments

Comments
 (0)