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/relational-databases/databases/view-or-change-the-compatibility-level-of-a-database.md
+14-11
Original file line number
Diff line number
Diff line change
@@ -1,10 +1,10 @@
1
1
---
2
-
title: "View or change the compatibility level of a database"
2
+
title: "View or Change the Compatibility Level of a Database"
3
3
description: Learn how to view or change the compatibility level of a database in SQL Server or Azure SQL by using SQL Server Management Studio or Transact-SQL.
4
4
author: WilliamDAssafMSFT
5
5
ms.author: wiassaf
6
6
ms.reviewer: randolphwest
7
-
ms.date: 07/25/2024
7
+
ms.date: 04/22/2025
8
8
ms.service: sql
9
9
ms.subservice: supportability
10
10
ms.topic: how-to
@@ -30,7 +30,9 @@ Before you change the compatibility level of a database, you should understand t
30
30
31
31
Requires `ALTER` permission on the database.
32
32
33
-
## <aid="SSMSProcedure"></a> Use SQL Server Management Studio
33
+
<aid="SSMSProcedure"></a>
34
+
35
+
## Use SQL Server Management Studio
34
36
35
37
To view or change the compatibility level of a database using [SQL Server Management Studio (SSMS)](../../ssms/sql-server-management-studio-ssms.md)
36
38
@@ -53,9 +55,11 @@ To view or change the compatibility level of a database using [SQL Server Manage
53
55
54
56
To change the compatibility level, select a different option from the list. The available options for different [!INCLUDE [ssDE-md](../../includes/ssde-md.md)] versions are listed in the [ALTER DATABASE Compatibility Level (Transact-SQL)](../../t-sql/statements/alter-database-transact-sql-compatibility-level.md#supported-dbcompats) page.
55
57
56
-
## <aid="TsqlProcedure"></a> Use Transact-SQL
58
+
<aid="TsqlProcedure"></a>
59
+
60
+
## Use Transact-SQL
57
61
58
-
You can use Transact-SQL to view or change the compatibility level of a database using SSMS or [Azure Data Studio](/azure-data-studio/what-is-azure-data-studio).
62
+
You can use Transact-SQL to view or change the compatibility level of a database using SSMS.
59
63
60
64
### View the compatibility level of a database
61
65
@@ -66,10 +70,9 @@ You can use Transact-SQL to view or change the compatibility level of a database
66
70
1. Copy and paste the following example into the query window and select **Execute**. This example returns the compatibility level of the [!INCLUDE [sssampledbobject-md](../../includes/sssampledbobject-md.md)][sample database](../../samples/adventureworks-install-configure.md).
67
71
68
72
```sql
69
-
USE AdventureWorks2022;
70
-
GO
71
73
SELECT compatibility_level
72
-
FROMsys.databasesWHERE name ='AdventureWorks2022';
74
+
FROMsys.databases
75
+
WHERE [name] ='AdventureWorks2022';
73
76
GO
74
77
```
75
78
@@ -87,9 +90,9 @@ You can use Transact-SQL to view or change the compatibility level of a database
87
90
GO
88
91
```
89
92
90
-
> [!NOTE]
91
-
> The compatibility level of a [Fabric SQL database](/fabric/database/sql/overview) cannot be changed, and always uses the latest version.
93
+
> [!NOTE]
94
+
> The compatibility level of a [SQL database in Microsoft Fabric (Preview)](/fabric/database/sql/overview) cannot be changed, and always uses the latest version.
0 commit comments