Determine which version and edition of SQL Server Database Engine is running
Članak
This article describes the procedures to determine the version and edition of SQL Server Database Engine that is running.
Original product version: SQL Server Original KB number: 321185
To determine the version of SQL Server, you can use any of the following methods.
Napomena
The version information follows the major.minor.build.revision pattern. The "revision" information is typically not used when checking the version of SQL Server.
Method 1: Connect to the server by using SQL Server Management Studio
Connect to the server by using Object Explorer in SQL Server Management Studio (SSMS). Once connected, the version information will be displayed in parentheses, along with the username used to connect to the specific instance of SQL Server. For more information on how to connect to SQL Server using Object Explorer, see Connect to a SQL Server or Azure SQL Database.
Method 2: Look at the first few lines of the Errorlog file
Look at the first few lines of the Errorlog file for that instance. By default, the error log is located at Program Files\Microsoft SQL Server\MSSQL.n\MSSQL\LOG\ERRORLOG in ERRORLOG.n files. The entries may resemble the following one:
Output
2024-09-05 16:56:22.35 Server Microsoft SQL Server 2022 (RTM-CU14) (KB5038325) - 16.0.4135.4 (X64)
Jul 10 2024 14:09:09
Copyright (C) 2022 Microsoft Corporation
Developer Edition (64-bit) on Windows 11 Enterprise 10.0 <X64> (Build 22631: ) (Hypervisor)
This entry provides information about the product, such as version, product level, 64-bit versus 32-bit, the edition of SQL Server, and the OS version on which SQL Server is running.
Method 3: Look at the output after running the query "SELECT @@VERSION"
Connect to the instance of SQL Server, and then run the following query:
SQL
SELECT @@VERSION
Here's an example of the output of this query:
Output
Microsoft SQL Server 2022 (RTM-CU14) (KB5038325) - 16.0.4135.4 (X64) Jul 10 2024 14:09:09 Copyright (C) 2022 Microsoft Corporation Developer Edition (64-bit) on Windows 11 Enterprise 10.0 <X64> (Build 22631: ) (Hypervisor)
From the output, you can determine the SQL Server product's version, service pack level, cumulative update level, or security update level (if applicable).
Method 4: Use the SERVERPROPERTY function
Connect to the instance of SQL Server, and then run the following query in SSMS:
The SERVERPROPERTY function returns individual properties related to the version information, although the @@VERSION function combines the output into one string. If your application requires individual property strings, you can use the SERVERPROPERTY function to return them instead of parsing the @@VERSION results.
Method 5: Use the "Installed SQL Server features discovery report"
You can also use the Installed SQL Server features discovery report. You can find this report on the Tools page of the SQL Server Installation Center. This tool provides information about all the instances of SQL Server that are installed on the system, including client tools such as SSMS. Note that this tool can be run locally only on the system where SQL Server is installed. It can't be used to obtain information about remote servers. For more information, see Validate a SQL Server Installation.
Administrați o infrastructură de bază de date SQL Server pentru baze de date în cloud, locale și relaționale hibride utilizând ofertele de baze de date relaționale Microsoft PaaS.
This article provides a resolution for the problem that occurs when you use Microsoft SQL Server tools such as SQL Server Management Studio (SSMS) or SQL Profiler.