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/database-engine/availability-groups/windows/configure-availability-group-for-distributed-transactions.md
+11-11Lines changed: 11 additions & 11 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: "Configure availability group for distributed transactions | Microsoft Docs"
3
3
ms.custom: ""
4
-
ms.date: "07/19/2017"
4
+
ms.date: "05/22/2018"
5
5
ms.prod: sql
6
6
ms.prod_service: high-availability
7
7
ms.reviewer: ""
@@ -29,7 +29,7 @@ manager: craigg
29
29
In order to guarantee distributed transactions, the availability group must be configured to register databases as distributed transaction resource managers.
30
30
31
31
>[!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.
33
33
>
34
34
>In [!INCLUDE[SQL2016](../../../includes/sssql15-md.md)] the configuration steps are the same as in [!INCLUDE[SQL2017](../../../includes/sssqlv14-md.md)].
35
35
@@ -51,7 +51,7 @@ Configure an availability group to support distributed transactions. Set the ava
51
51
52
52
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.
53
53
54
-
```transact-sql
54
+
```sql
55
55
CREATE AVAILABILITY GROUP MyAG
56
56
WITH (
57
57
DTC_SUPPORT = PER_DB
@@ -77,7 +77,7 @@ CREATE AVAILABILITY GROUP MyAG
77
77
78
78
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.
79
79
80
-
```transact-sql
80
+
```sql
81
81
ALTER AVAILABILITY GROUP MyaAG
82
82
SET (
83
83
DTC_SUPPORT = PER_DB
@@ -162,19 +162,19 @@ Run only one of the following scripts:
162
162
163
163
* 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:
164
164
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
+
```
168
168
169
169
* 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:
170
170
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
+
```
174
174
175
175
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:
Copy file name to clipboardExpand all lines: docs/database-engine/availability-groups/windows/transactions-always-on-availability-and-database-mirroring.md
+17-15Lines changed: 17 additions & 15 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: "Transactions - Always On availability groups and database mirroring | Microsoft Docs"
3
3
ms.custom: ""
4
-
ms.date: "11/01/2017"
4
+
ms.date: "05/22/2018"
5
5
ms.prod: sql
6
6
ms.prod_service: high-availability
7
7
ms.reviewer: ""
@@ -24,14 +24,16 @@ manager: craigg
24
24
# Transactions - availability groups and database mirroring
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.
28
28
29
29
## Support for distributed transactions
30
30
31
31
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.
32
32
33
33
>[!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.
35
37
36
38
To configure an availability group for distributed transactions, see [Configure Availability Group for Distributed Transactions](configure-availability-group-for-distributed-transactions.md).
## 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
45
47
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.
47
49
48
50
Cross-database transactions are also not supported for database mirroring.
49
51
50
-
## <aname="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
+
## <aname="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.
52
54
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.
54
56
55
57
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.
56
58
57
59
The following requirements must be met:
58
60
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).
60
62
61
63
- 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.
62
64
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.
64
66
65
67
## Non-support for distributed transactions
66
68
Specific cases where distributed transactions are not supported include:
67
69
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.
69
71
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.
71
73
72
74
- Where the availability group was not created with enable distributed transaction.
73
75
@@ -79,12 +81,12 @@ SQL Server 2016 introduces the capability to use distributed transactions where
79
81
## Example scenario with database mirroring
80
82
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.
81
83
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.
83
85
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.
85
87
86
88
> [!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.
88
90
89
91
## Next steps
90
92
[Always On availability groups: Interoperability (SQL Server)](../../../database-engine/availability-groups/windows/always-on-availability-groups-interoperability-sql-server.md)
Copy file name to clipboardExpand all lines: docs/relational-databases/performance/TOC.md
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,9 +2,10 @@
2
2
# [Performance Center for SQL Server Database Engine and Azure SQL Database](performance-center-for-sql-server-database-engine-and-azure-sql-database.md)
3
3
# [Configuring Storage Spaces with a NVDIMM-N write-back cache](configuring-storage-spaces-with-a-nvdimm-n-write-back-cache.md)
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)
Copy file name to clipboardExpand all lines: docs/relational-databases/replication/tutorial-replicating-data-between-continuously-connected-servers.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
@@ -136,7 +136,7 @@ If your SQL Server Agent was not running when you created the publication, you'l
136
136
137
137

138
138
139
-
If you see an error here, see [Troubleshooting Snapshot Agent errors](../../troubleshooters/replication/troubleshoot-tran-repl-errors.md#troubleshoot-errors-with-snapshot-agent).
139
+
If you see an error here, see [Troubleshooting Snapshot Agent errors](../../troubleshooters/replication/troubleshoot-tran-repl-errors.md#find-errors-with-snapshot-agent).
0 commit comments