Skip to content

Commit 8ce3b4c

Browse files
committed
Merge branch 'main' into release-arc-data
2 parents 295d99d + c1247c3 commit 8ce3b4c

6 files changed

Lines changed: 688 additions & 658 deletions

File tree

docs/database-engine/install-windows/install-sql-server-from-the-command-prompt.md

Lines changed: 613 additions & 597 deletions
Large diffs are not rendered by default.

docs/relational-databases/databases/shrink-a-database.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
---
22
title: "Shrink a database"
3-
description: Learn how to shrink a database by using Object in SQL Server by using SQL Server Management Studio or Transact-SQL.
3+
description: Learn how to shrink a database in SQL Server by using SQL Server Management Studio or Transact-SQL.
44
author: WilliamDAssafMSFT
55
ms.author: wiassaf
66
ms.reviewer: randolphwest
7-
ms.date: 04/04/2023
7+
ms.date: 11/01/2023
88
ms.service: sql
99
ms.subservice: supportability
1010
ms.topic: conceptual
@@ -54,8 +54,12 @@ Requires membership in the **sysadmin** fixed server role or the **db_owner** fi
5454

5555
Shrink operations in progress can block other queries on the database, and can be blocked by queries already in progress. Introduced in [!INCLUDE[sssql22-md](../../includes/sssql22-md.md)], shrink database operations have a WAIT_AT_LOW_PRIORITY option. This feature is a new additional option for `DBCC SHRINKDATABASE` and `DBCC SHRINKFILE`. If a new shrink operation in WAIT_AT_LOW_PRIORITY mode can't obtain the necessary locks due to a long-running query already in progress, the shrink operation will eventually time out after one minute and silently exit, preventing other queries from being blocked. For more information, see [DBCC SHRINKDATABASE](../../t-sql/database-console-commands/dbcc-shrinkdatabase-transact-sql.md).
5656

57+
For information on file management and shrink operations specific to Azure SQL Database, see [Manage file space for databases in Azure SQL Database](/azure/azure-sql/database/file-space-manage?view=azuresql-db&preserve-view=true).
58+
5759
## <a id="SSMSProcedure"></a> Use SQL Server Management Studio
5860

61+
**Applies to:** SQL Server, Azure SQL Managed Instance
62+
5963
#### Shrink a database
6064

6165
1. In **Object Explorer**, connect to an instance of the [!INCLUDE[ssDEnoversion](../../includes/ssdenoversion-md.md)], and then expand that instance.
@@ -98,21 +102,19 @@ Shrink operations in progress can block other queries on the database, and can b
98102

99103
[!code-sql[DBCC#DBCC_SHRINKDB1](codesnippet/tsql/shrink-a-database_1.sql)]
100104

101-
## <a id="FollowUp"></a> Follow Up: After you shrink a database
105+
## <a id="FollowUp"></a> After you shrink a database
102106

103107
Data that is moved to shrink a file can be scattered to any available location in the file. This causes index fragmentation and can slow the performance of queries that search a range of the index. To eliminate the fragmentation, consider rebuilding the indexes on the file after shrinking. For more information, see [Rebuild an index](../../relational-databases/indexes/reorganize-and-rebuild-indexes.md#rebuild-an-index).
104108

105-
## See also
109+
## Related content
106110

107111
- [Shrink the tempdb database](shrink-tempdb-database.md)
108112
- [Considerations for the autogrow and autoshrink settings in SQL Server](/troubleshoot/sql/admin/considerations-autogrow-autoshrink)
109113
- [Database Files and Filegroups](database-files-and-filegroups.md)
110114
- [sys.databases (Transact-SQL)](../../relational-databases/system-catalog-views/sys-databases-transact-sql.md)
111115
- [sys.database_files (Transact-SQL)](../../relational-databases/system-catalog-views/sys-database-files-transact-sql.md)
112-
113-
## Next steps
114-
115116
- [DBCC SHRINKDATABASE (Transact-SQL)](../../t-sql/database-console-commands/dbcc-shrinkdatabase-transact-sql.md)
116117
- [DBCC SHRINKFILE (Transact-SQL)](../../t-sql/database-console-commands/dbcc-shrinkfile-transact-sql.md)
117118
- [Delete Data or Log Files from a Database](delete-data-or-log-files-from-a-database.md)
118119
- [Shrink a file](shrink-a-file.md)
120+
- [Manage file space for databases in Azure SQL Database](/azure/azure-sql/database/file-space-manage?view=azuresql-db&preserve-view=true)

docs/relational-databases/linked-servers/create-linked-servers-sql-server-database-engine.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -281,9 +281,9 @@ When `NULL` is returned for the linked server login, it indicates that the login
281281
282282
If you're using Azure SQL Managed Instance, see the following examples from [sp_addlinkedserver (Transact-SQL)](../system-stored-procedures/sp-addlinkedserver-transact-sql.md):
283283

284-
- [Create SQL Managed Instance linked server with managed identity Microsoft Entra authentication](../system-stored-procedures/sp-addlinkedserver-transact-sql.md#h-create-sql-managed-instance-linked-server-with-managed-identity-azure-ad-authentication)
284+
- [Create SQL Managed Instance linked server with managed identity Microsoft Entra authentication](../system-stored-procedures/sp-addlinkedserver-transact-sql.md#managed-identity-authentication)
285285

286-
- [Create SQL Managed Instance linked server with pass-through Microsoft Entra authentication](../system-stored-procedures/sp-addlinkedserver-transact-sql.md#i-create-sql-managed-instance-linked-server-with-pass-through-azure-ad-authentication)
286+
- [Create SQL Managed Instance linked server with pass-through Microsoft Entra authentication](../system-stored-procedures/sp-addlinkedserver-transact-sql.md#pass-through-authentication)
287287

288288
## Next steps
289289

0 commit comments

Comments
 (0)