MS SQL is one of the most popular SQL databases. It is created in 1988 for the OS/2. During time SQL Server has a lot of versions which has different versions. In this tutorial, we will learn how to get the MS SQL Server Database version in different ways like GUI, SQL Prompt, Error Logs, Command-Line, etc. We will also provide the MS SQL Server versions from the start.
MS SQL是最流行SQL数据库之一。 它于1988年为OS / 2创建。 在一段时间内,SQL Server有许多版本,而这些版本具有不同的版本。 在本教程中,我们将学习如何以不同的方式(例如GUI,SQL提示,错误日志,命令行等)获取MS SQL Server数据库版本。我们还将从一开始就提供MS SQL Server版本。
如何从GUI查找MS SQL Server版本 (How To Find MS SQL Server Version From GUI)
MS SQL server is generally managed with the Microsoft SQL Server Management Studio
simply MSSMS tool which provides GUI features. We can use this MSSMS GUI tool in order to get the connected MS SQL Server database version. After connecting data from the Object Explorer
right-click to the Database Server which will open a menu. From this menu click to the Properties
which will open a Server Properties
window.
通常,使用Microsoft SQL Server Management Studio
MSSMS工具(提供GUI功能)来管理MS SQL Microsoft SQL Server Management Studio
。 我们可以使用此MSSMS GUI工具来获取连接的MS SQL Server数据库版本。 从Object Explorer
连接数据后,右键单击到数据库服务器,这将打开一个菜单。 在此菜单中,单击Properties
,这将打开Server Properties
窗口。
The server properties window will provide information like Product, Operating System, Platform, Version Language, etc like below.
服务器属性窗口将提供类似产品,操作系统,平台,版本语言等的信息,如下所示。
We can see from the screenshot that the given MS SQL Server Database version is 15.0.1800.32
.
从屏幕截图中可以看到,给定的MS SQL Server数据库版本为15.0.1800.32
。
如何从SQL提示中查找MS SQL Ser版本 (How To Find MS SQL Ser Version From SQL Prompt)
MS SQL Server provides some special queries in order to provide metadata information about the database server. This language is called T-SQL where we can run MS SQL Database Server related special SQL queries. We can use @@VERSION
keyword with the Select
Query. As we can see @@version
, @@VERsion
are all of them are the same which means they are case insensitive.
MS SQL Server提供了一些特殊查询,以便提供有关数据库服务器的元数据信息。 这种语言称为T-SQL,在这里我们可以运行与MS SQL数据库服务器相关的特殊SQL查询。 我们可以在Select
查询中使用@@VERSION
关键字。 如我们所见, @@version
, @@VERsion
都是相同的,这意味着它们不区分大小写。
SELECT @@VERSION
SELECT @@version
Select @@Version
We can see the following information is available from the query result.
我们可以从查询结果中看到以下信息。
- `SQL Server Version` is Microsoft SQL Server 2019(CTP3.2)-15.0.1800.32(X64). SQL Server版本是Microsoft SQL Server 2019(CTP3.2)-15.0.1800.32(X64)。
- `Processor Architecture` is 64 bit where software is also compiled as 64 bit executable. “处理器架构”是64位的,其中软件也被编译为64位可执行文件。
- SQL Server build date is `17 July 2019 21:29:33`. SQL Server的生成日期为2019年7月17日21:29:33
- SQL Server edition is `Enterprise Evaluation Edition`. SQL Server版本是“企业评估版”。
- `Operation System Version` is Windows 10 Professional 64 bit with build number 17134. 操作系统版本是Windows 10 Professional 64位,内部版本号17134。
如何从sqlservr.exe查找MS SQL Ser版本 (How To Find MS SQL Ser Version From sqlservr.exe)
The SQL Server Daemon executable file is named as sqlservr.exe
and stored in the C:\Program Files\Microsoft SQL Server\MSSQL15.MSSQLSERVER\MSSQL\Binn
path. This executable can also provide information about the MS SQL DAtabase Server version. This path can be different according to the operating system architecture like 32 and 64 bit.
SQL Server守护程序可执行文件名为sqlservr.exe
并存储在C:\Program Files\Microsoft SQL Server\MSSQL15.MSSQLSERVER\MSSQL\Binn
路径中。 该可执行文件还可以提供有关MS SQL DAtabase服务器版本的信息。 根据操作系统体系结构(例如32位和64位),此路径可能会有所不同。