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
{{ message }}
Repository navigation
Commit 5f16d0f
Browse filesBrowse the repository at this point in the historyBrowse files
This article provides an overview of resource management in Azure SQL Database. It provides information on what happens when resource limits are reached, and describes resource governance mechanisms that are used to enforce these limits.
You can use [Azure Resource Graph Explorer](/azure/governance/resource-graph/overview) in the portal to identify all SQL managed instances that currently use Gen4 hardware, or you can check the hardware used by resources for a specific [SQL Managed Instance](../database/logical-servers.md) in the Azure portal.
223
+
You can use [Azure Resource Graph Explorer](/azure/governance/resource-graph/overview) in the portal to identify all SQL managed instances that currently use Gen4 hardware, or you can check the hardware used by a specific SQL Managed Instance in the Azure portal.
224
224
225
225
You must have at least `read` permissions to the Azure object or object group to see results in Azure Resource Graph Explorer.
226
226
227
-
To use **Resource Graph Explorer** to identify SQL managed instances that are still using Gen4 hardware, follow these steps:
227
+
To use **Azure Resource Graph Explorer** to identify SQL managed instances that are still using Gen4 hardware, follow these steps:
228
228
229
229
1. Go to the [Azure portal](https://portal.azure.com).
230
230
1. Search for `Resource graph` in the search box, and choose the **Resource Graph Explorer** service from the search results.
@@ -238,13 +238,17 @@ To use **Resource Graph Explorer** to identify SQL managed instances that are st
238
238
239
239
1. The **Results** pane displays all the deployed instances in Azure that are using Gen4 hardware.
240
240
241
+
:::image type="content" source="media/resource-limits/gen4-resource-graph-explorer.png" alt-text="Screenshot of the query results in Azure Resource Graph Explorer in the Azure portal.":::
242
+
241
243
To check the hardware used by resources for a specific SQL managed instance in Azure, follow these steps:
242
244
243
245
1. Go to the [Azure portal](https://portal.azure.com).
244
246
1. Search for `SQL managed instances` in the search box and choose **SQL managed instances** from the search results to open the **SQL managed instances** page and view all instances for the chosen subscription(s).
245
247
1. Select the SQL managed instance of interest to open the **Overview** page for the SQL managed instance.
246
248
1. Check the **Pricing tier** under **Essentials** to verify what hardware your managed instance is using.
247
249
250
+
:::image type="content" source="media/resource-limits/sqlmi-pricing-tier.png" alt-text="Screenshot of the overview page for SQL MI resource with pricing tier highlighted. ":::
Copy file name to clipboardExpand all lines: azure-sql/virtual-machines/windows/configure-azure-ad-authentication-for-sql-vm.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
@@ -86,7 +86,7 @@ To enable Azure AD authentication to your SQL Server VM, follow these steps:
86
86
1. Choose **Enable** under **Azure AD authentication**.
87
87
1. Choose the managed identity type from the drop-down, either **System-assigned** or **User-assigned**. If you choose user-assigned, then select the identity you want to use to authenticate to SQL Server on your Azure VM from the **User-assigned managed identity** drop-down that appears.
88
88
89
-
:::image type="content" source="media/configure-azure-ad-authentication-for-sql-vm/enable-azure-ad-in-portal.png" alt-text="Screenshot of the security configuration page for SQL VM in the Azure portal, with Azure AD authentication selected.":::
89
+
:::image type="content" source="media/configure-azure-ad-authentication-for-sql-vm/enable-azure-ad-in-portal.png" alt-text="Screenshot of the security configuration page for SQL VM in the Azure portal, with Azure AD authentication selected.":::
90
90
91
91
> [!NOTE]
92
92
> The error `The selected managed identity does not have enough permissions for Azure AD Authentication` indicates that permissions have not been properly assigned to the identity you've selected. Check the [Grant permissions](#grant-permission-to-the-identity) section to assign proper permissions.
Copy file name to clipboardExpand all lines: docs/relational-databases/indexes/guidelines-for-online-index-operations.md
+21-14Lines changed: 21 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,7 +24,7 @@ When you perform online index operations, the following guidelines apply:
24
24
25
25
- Clustered indexes must be created, rebuilt, or dropped offline when the underlying table contains the following large object (LOB) data types: **image**, **ntext**, and **text**.
26
26
- Nonunique nonclustered indexes can be created online when the table contains LOB data types but none of these columns are used in the index definition as either key or nonkey (included) columns.
27
-
- Indexes on local temp tables cannot be created, rebuilt, or dropped online. This restriction does not apply to indexes on global temp tables.
27
+
- Indexes on local temp tables cannot be created, rebuilt, or dropped online. This restriction doesn't apply to indexes on global temp tables.
28
28
- Indexes can be resumed from where it stopped after an unexpected failure, database failover, or a **PAUSE** command. See [Create Index](../../t-sql/statements/create-index-transact-sql.md) and [Alter Index](../../t-sql/statements/alter-index-transact-sql.md).
29
29
30
30
> [!NOTE]
@@ -37,21 +37,21 @@ The following table shows the index operations that can be performed online, the
37
37
|ALTER INDEX REBUILD|Disabled clustered index or disabled indexed view<br /><br /> XML index<br /><br />Columnstore index <br /><br /> Index on a local temp table|Specifying the keyword ALL may cause the operation to fail when the table contains an excluded index.<br /><br /> Additional restrictions on rebuilding disabled indexes apply. For more information, see [Disable Indexes and Constraints](../../relational-databases/indexes/disable-indexes-and-constraints.md).|
38
38
|CREATE INDEX|XML index<br /><br /> Initial unique clustered index on a view<br /><br /> Index on a local temp table||
39
39
|CREATE INDEX WITH DROP_EXISTING|Disabled clustered index or disabled indexed view<br /><br /> Index on a local temp table<br /><br /> XML index||
40
-
|DROP INDEX|Disabled index<br /><br /> XML index<br /><br /> Nonclustered index<br /><br /> Index on a local temp table|Multiple indexes cannot be specified within a single statement.|
41
-
|ALTER TABLE ADD CONSTRAINT (PRIMARY KEY or UNIQUE)|Index on a local temp table<br /><br /> Clustered index|Only one subclause is allowed at a time. For example, you cannot add and drop PRIMARY KEY or UNIQUE constraints in the same ALTER TABLE statement.|
40
+
|DROP INDEX|Disabled index<br /><br /> XML index<br /><br /> Nonclustered index<br /><br /> Index on a local temp table|Multiple indexes can't be specified within a single statement.|
41
+
|ALTER TABLE ADD CONSTRAINT (PRIMARY KEY or UNIQUE)|Index on a local temp table<br /><br /> Clustered index|Only one subclause is allowed at a time. For example, you can't add and drop PRIMARY KEY or UNIQUE constraints in the same ALTER TABLE statement.|
42
42
|ALTER TABLE DROP CONSTRAINT (PRIMARY KEY or UNIQUE)|Clustered index||
43
43
44
-
The underlying table cannot be modified, truncated, or dropped while an online index operation is in process.
44
+
The underlying table can't be modified, truncated, or dropped while an online index operation is in process.
45
45
46
46
The online option setting (ON or OFF) specified when you create or drop a clustered index is applied to any nonclustered indexes that must be rebuilt. For example, if the clustered index is built online by using CREATE INDEX WITH DROP_EXISTING, ONLINE=ON, all associated nonclustered indexes are re-created online also.
47
47
48
-
When you create or rebuild a UNIQUE index online, the index builder and a concurrent user transaction may try to insert the same key, therefore violating uniqueness. If a row entered by a user is inserted into the new index (target) before the original row from the source table is moved to the new index, the online index operation will fail.
48
+
When you create or rebuild a UNIQUE index online, the index builder and a concurrent user transaction may try to insert the same key, therefore violating uniqueness. If a row entered by a user is inserted into the new index (target) before the original row from the source table is moved to the new index, the online index operation fails.
49
49
50
-
Although not common, the online index operation can cause a deadlock when it interacts with database updates because of user or application activities. In these rare cases, the [!INCLUDE[ssDEnoversion](../../includes/ssdenoversion-md.md)]will select the user or application activity as a deadlock victim.
50
+
Although not common, the online index operation can cause a deadlock when it interacts with database updates because of user or application activities. In these rare cases, the [!INCLUDE[ssDEnoversion](../../includes/ssdenoversion-md.md)]selects the user or application activity as a deadlock victim.
51
51
52
-
You can perform concurrent online index DDL operations on the same table or view only when you are creating multiple new nonclustered indexes, or reorganizing nonclustered indexes. All other online index operations performed at the same time fail. For example, you cannot create a new index online while rebuilding an existing index online on the same table.
52
+
You can perform concurrent online index DDL operations on the same table or view only when you're creating multiple new nonclustered indexes, or reorganizing nonclustered indexes. All other online index operations performed at the same time fail. For example, you can't create a new index online while rebuilding an existing index online on the same table.
53
53
54
-
An online operation cannot be performed when an index contains a column of the large object type, and in the same transaction there are update operations before this online operation. To work around this issue, place the online operation outside the transaction or place it before any updates in the transaction.
54
+
An online operation can't be performed when an index contains a column of the large object type, and in the same transaction there are update operations before this online operation. To work around this issue, place the online operation outside the transaction or place it before any updates in the transaction.
55
55
56
56
## Disk space considerations
57
57
@@ -75,11 +75,11 @@ On multiprocessor computers that are running SQL Server 2016, index statements m
75
75
76
76
Because an S-lock or Sch-M lock is held in the final phase of the index operation, be careful when you run an online index operation inside an explicit user transaction, such as BEGIN TRANSACTION...COMMIT block. Doing this causes the lock to be held until the end of the transaction, therefore impeding user concurrency.
77
77
78
-
Online index rebuilding may increase fragmentation when it is allowed to run with `MAX DOP > 1` and `ALLOW_PAGE_LOCKS = OFF` options. For more information, see [How It Works: Online Index Rebuild - Can Cause Increased Fragmentation](/archive/blogs/psssql/how-it-works-online-index-rebuild-can-cause-increased-fragmentation).
78
+
Online index rebuilding may increase fragmentation when it's allowed to run with `MAX DOP > 1` and `ALLOW_PAGE_LOCKS = OFF` options. For more information, see [How It Works: Online Index Rebuild - Can Cause Increased Fragmentation](/archive/blogs/psssql/how-it-works-online-index-rebuild-can-cause-increased-fragmentation).
79
79
80
80
## Transaction log considerations
81
81
82
-
Large-scale index operations, performed offline or online, can generate large data loads that can cause the transaction log to quickly fill. This is because both offline and online index rebuild operations are fully logged. To make sure that the index operation can be rolled back, the transaction log cannot be truncated until the index operation has been completed; however, the log can be backed up during the index operation. Therefore, the transaction log must have sufficient space to store both the index operation transactions and any concurrent user transactions for the duration of the index operation. For more information, see [Transaction Log Disk Space for Index Operations](../../relational-databases/indexes/transaction-log-disk-space-for-index-operations.md).
82
+
Large-scale index operations, performed offline or online, can generate large data loads that can cause the transaction log to quickly fill. This is because both offline and online index rebuild operations are fully logged. To make sure that the index operation can be rolled back, the transaction log can't be truncated until the index operation has been completed; however, the log can be backed up during the index operation. Therefore, the transaction log must have sufficient space to store both the index operation transactions and any concurrent user transactions for the duration of the index operation. For more information, see [Transaction Log Disk Space for Index Operations](../../relational-databases/indexes/transaction-log-disk-space-for-index-operations.md).
83
83
84
84
## Resumable index considerations
85
85
@@ -92,19 +92,26 @@ When you perform resumable online index create or rebuild, the following guideli
92
92
- Recovering from index create or rebuild failures (such as database failovers or running out of disk space).
93
93
- When an index operation is paused, both the original index and the newly created one require disk space and need to be updated during DML operations.
94
94
- Enables truncation of transaction logs during an index create or rebuild operation.
95
-
- SORT_IN_TEMPDB=ON option is not supported
95
+
- SORT_IN_TEMPDB=ON option isn't supported
96
96
97
97
> [!IMPORTANT]
98
98
> Resumable index create or rebuild does not require you to keep open a long running transaction, allowing log truncation during this operation and a better log space management. With the new design, we managed to keep necessary data in a database together with all references required to restart the resumable operation.
99
99
100
-
Generally, there is no performance difference between resumable and non-resumable online index rebuild. For create resumable index, there is a constant overhead that causes a small performance difference between resumable and non-resumable index create. This difference is mostly noticeable only for smaller tables.
100
+
Generally, there's no performance difference between resumable and nonresumable online index rebuild. For create resumable index, there's a constant overhead that causes a small performance difference between resumable and nonresumable index create. This difference is mostly noticeable only for smaller tables.
101
101
102
102
When you update a resumable index while an index operation is paused:
103
103
104
104
- For read-mostly workloads, the performance impact is insignificant.
105
105
- For update-heavy workloads, you may experience some throughput degradation (our testing shows less than 10% degradation).
106
106
107
-
Generally, there is no difference in defragmentation quality between resumable and non-resumable online index create or rebuild.
107
+
Generally, there is no difference in defragmentation quality between resumable and nonresumable online index create or rebuild.
108
+
109
+
> [!NOTE]
110
+
> While an online index operation is paused, any operation that requires a table-level exclusive lock on the table that contains the paused index will fail. This is most often encountered with `INSERT ... WITH (TABLOCK)` operations. You may see the following error:
111
+
>
112
+
> `Msg 10637, Level 16, State 1, Line 32: Cannot perform this operation on 'object' with ID (objectid) as one or more indexes are currently in resumable index rebuild state. Please refer to sys.index_resumable_operations for more details.`
113
+
>
114
+
> To resolve error 10637, remove the `TABLOCK` hint from your transaction, or unpause the index operation and wait for it to complete before attempting your transaction again.
108
115
109
116
## Online default options
110
117
@@ -114,7 +121,7 @@ Generally, there is no difference in defragmentation quality between resumable a
114
121
You can set default options for online or resumable at a database level by setting the ELEVATE_ONLINE or ELEVATE_RESUMABLE database scoped configuration options. With these default options, you can avoid accidentally performing an operation that takes your database table offline. Both options will cause the engine to automatically elevate certain operations to online or resumable execution.
115
122
You can set either option as FAIL_UNSUPPORTED, WHEN_SUPPORTED, or OFF using the [ALTER DATABASE SCOPED CONFIGURATION](../../t-sql/statements/alter-database-scoped-configuration-transact-sql.md) command. You can set different values for online and resumable.
116
123
117
-
Both ELEVATE_ONLINE and ELEVATE_RESUMABLE only apply to DDL statements that support the online and resumable syntax respectively. For example, if you attempt to create an XML index with ELEVATE_ONLINE=FAIL_UNSUPORTED, the operation will run offline since XML indexes don't support the ONLINE= syntax. The options only effect DDL statements that are submitted without specifying an ONLINE or RESUMABLE option. For example, by submitting a statement with ONLINE=OFF or RESUMABLE=OFF, the user can override a FAIL_UNSUPPORTED setting and run a statement offline and/or non-resumably.
124
+
Both ELEVATE_ONLINE and ELEVATE_RESUMABLE only apply to DDL statements that support the online and resumable syntax respectively. For example, if you attempt to create an XML index with ELEVATE_ONLINE=FAIL_UNSUPORTED, the operation will run offline since XML indexes don't support the ONLINE= syntax. The options only effect DDL statements that are submitted without specifying an ONLINE or RESUMABLE option. For example, by submitting a statement with ONLINE=OFF or RESUMABLE=OFF, the user can override a FAIL_UNSUPPORTED setting and run a statement offline and/or nonresumably.
118
125
119
126
> [!NOTE]
120
127
> ELEVATE_ONLINE and ELEVATE_RESUMABLE does not apply to XML index operations.
0 commit comments