sql server键查找

In this article, we will explore how to find the SQL Server version details with various methods.

在本文中,我们将探索如何使用各种方法查找SQL Server版本详细信息。

介绍 (Introduction)

One of the important responsibilities of a database administrator is to keep the SQL Server installation up-to-date. The installation list for the update process can be created from the following items:

数据库管理员的重要职责之一是使SQL Server安装保持最新。 可以从以下各项创建更新过程的安装列表:

  • Service packs 服务包
  • Cumulative updates 累积更新
  • General Distribution Releases (GDR) 一般发行版本(GDR)
  • Version upgrades 版本升级

On the other hand, the SQL Server edition upgrade might be taken to the agenda by the database administrators to obtain new features. Such as, for some cases, we might be faced an issue that needs to determine the service pack level of the SQL Server. For this reason, the database administrator may always need to know the version and edition details of the SQL Server with whole details or at least know how to obtain it. Now, we will go through different methods on how to find version details of the SQL Server.

另一方面,数据库管理员可能会将SQL Server版本升级列入议程以获取新功能。 例如,在某些情况下,我们可能会遇到需要确定SQL Server Service Pack级别的问题。 因此,数据库管理员可能总是需要了解SQL Server的版本和版本详细信息以及完整的详细信息,或者至少知道如何获取它。 现在,我们将通过不同的方法来查找SQL Server的版本详细信息。

使用SSMS查找SQL Server版本 (Finding the SQL Server version with SSMS)

SQL Server Management Studio (SSMS) is a very helpful and handy tool in order to manage the SQL Server installations. Also, when we connect to any instance of the SQL Server with the help of SSMS, we can see that the product version is shown in the Object Explorer tab between two parentheses. This set of numbers defines the product version of the SQL Server. Now, we will learn how to convert the version details from this meaningless set of numbers:

为了管理SQL Server安装,SQL Server Management Studio(SSMS)是非常有用且方便的工具。 另外,当我们借助SSMS连接到SQL Server的任何实例时,我们可以看到产品版本显示在两个括号之间的“对象资源管理器”选项卡中。 这组数字定义了SQL Server的产品版本。 现在,我们将学习如何从这组毫无意义的数字中转换版本详细信息:

In the above screenshot, the product version is specified as 15.0.1400.75 but this set of numbers is not much meaningful and therefore we should convert it to more meaningful and useful information. The first two-digits (15) define the numeric definition of the SQL Server product name. The following table shows SQL Server versions against the product name so that we can find out the product name rather quickly:

在上面的屏幕截图中,产品版本指定为15.0.1400.75,但是这组数字没有太大意义,因此我们应该将其转换为更有意义和有用的信息。 前两位(15)定义SQL Server产品名称的数字定义。 下表根据产品名称显示了SQL Server版本,以便我们可以快速找到产品名称:

SQL Server Product Version

SQL Server Product Name

15.0.xxxx.xx

SQL Server 2019

14.0.xxxx.xx

SQL Server 2017

13.0.xxxx.xx

SQL Server 2016

12.0.xxxx.xx

SQL Server 2014

11.0.xxxx.xx

SQL Server 2012

10.5.xxxx.xx

SQL Server 2008 R2

10.0.xxxx.xx

SQL Server 2008

9.0.xxxx.xx

SQL Server 2005

8.0.xxxx.xx

SQL Server 2000

SQL Server产品版本

SQL Server产品名称

15.0.xxxx.xx

SQL Server 2019

14.0.xxxx.xx

SQL Server 2017

13.0.xxxx.xx

SQL Server 2016

12.0.xxxx.xx

SQL Server 2014

11.0.xxxx.xx

SQL Server 2012

10.5.xxxx.xx

SQL Server 2008 R2

10.0.xxxx.xx

SQL Server 2008

9.0.xxxx.xx

SQL Server 2005

8.0.xxxx.xx

SQL Server 2000

However, we achieved the product name only with the help of the first two-digits but we need more details about the SQL Server instance. The remaining numbers (1400.75) provide assistance to uncover service pack level and cumulative update level details. In order to find out these details, we can look at the BuildNumbers website so that we can easily figure out all the detailed information about the SQL Server instance:

但是,我们仅在前两位数字的帮助下获得了产品名称,但是我们需要有关SQL Server实例的更多详细信息。 剩余的数字(1400.75)将帮助您发现Service Pack级别和累积更新级别详细信息。 为了找出这些详细信息,我们可以查看BuildNumbers网站,以便我们可以轻松找出有关SQL Server实例的所有详细信息:

For our example, the version number is 15.0.1400.75 and it comes up to SQL Server 2019 CTP 2.4. (Community Technology Preview 2.4) which was released on March 26, 2019, as shown in the table. At the same time, this table helps us to discover the latest version of the SQL Servers.

对于我们的示例,版本号是15.0.1400.75,它取决于SQL Server 2019 CTP 2.4。 如表所示,于2019年3月26日发布了(Community Technology Preview 2.4)。 同时,此表可帮助我们发现SQL Server的最新版本。

使用查询查找SQL Server版本 (Finding the SQL Server version with query)

We can use the @@VERSION function to find out all version details of the SQL Server instance. The @@VERSION function returns a one-line string output and this output also provides all the necessary information about the SQL Server.

我们可以使用@@ VERSION函数来查找SQL Server实例的所有版本详细信息。 的 @@版 函数返回单行字符串输出,该输出还提供有关SQL Server的所有必要信息。

The output of this function will be involved in the following information:

此功能的输出将包含在以下信息中:

  • SQL Server Version SQL Server版本
  • Processor Architecture 处理器架构
  • SQL Server Build Date SQL Server生成日期
  • Copyright Statement 版权声明
  • SQL Server Edition SQL Server版
  • Operating System Version 作业系统版本

Now, we will run the following query and get the details of the SQL Server:

现在,我们将运行以下查询并获取SQL Server的详细信息:

SELECT @@VERSION AS 'SQL Server Version Details'

“Microsoft SQL Server 2019 (CTP2.4) – 15.0.1400.75 (X64) Mar 16 2019 11:53:26 Copyright (C) 2019 Microsoft Corporation Enterprise Evaluation Edition (64-bit) on Windows 10 Pro 10.0 <X64> (Build 17763: )”

“ Microsoft SQL Server 2019(CTP2.4)– 15.0.1400.75(X64)2019年3月16日11:53:26版权所有(C)2019 Windows 10 Pro 10.0 <X64>上的Microsoft Corporation企业评估版(64位) 17763 :)”

As we can see, the output of the @@VERSION function returns sufficiently information about SQL Server. We will convert this information into a more meaningful form with the help of the following table:

如我们所见,@@ VERSION函数的输出返回有关SQL Server的足够信息。 我们将借助下表将这些信息转换为更有意义的形式:

SQL Server version

Microsoft SQL Server 2019 (CTP2.4)-15.0.1400.75

Processor architecture

X64

SQL Server build date

Mar 16 2019 11:53:26

Copyright statement

Copyright (C) 2019 Microsoft Corporation

SQL Server edition

Enterprise Evaluation Edition (64-bit)

Operating system version

Windows 10 Pro 10.0 <X64> (Build 17763: )

SQL Server版本

Microsoft SQL Server 2019(CTP2.4)-15.0.1400.75

处理器架构

X64

SQL Server生成日期

三月16 2019 11:53:26

版权声明

版权所有(C)2019 Microsoft Corporation

SQL Server版本

企业评估版(64位)

作业系统版本

Windows 10 Pro 10.0 <X64>(内部版本17763:)

在SQL Server错误日志中查找SQL Server版本 (Finding the SQL Server version in the SQL Server error logs)

SQL Server error log file records user-defined events and specific system events so that we can use it to troubleshoot SQL Server issues. Other than this, the SQL Server error log file helps us to determine the version details of the SQL Server. In the first few lines of the error log file, it contains detailed information about the version information about the SQL Server. By default, the error log is placed under “Program Files\Microsoft SQL Server\MSSQL.n\MSSQL\LOG\”. The other option which helps us to determine the error log file location is the SERVERPROPERTY function. The following query returns the location of the error log file:

SQL Server错误日志文件记录了用户定义的事件和特定的系统事件,以便我们可以使用它来解决SQL Server问题。 除此之外,SQL Server错误日志文件还可以帮助我们确定SQL Server的版本详细信息。 在错误日志文件的前几行中,它包含有关SQL Server版本信息的详细信息。 默认情况下,错误日志位于“ Program Files \ Microsoft SQL Server \ MSSQL.n \ MSSQL \ LOG \”下。 帮助我们确定错误日志文件位置的另一个选项是SERVERPROPERTY函数。 以下查询返回错误日志文件的位置:

SELECT SERVERPROPERTY('ErrorLogFileName') AS 'Error log file location'

Now, we will open the error log file in the specified location:

现在,我们将在指定位置打开错误日志文件:

The entry of the error log file provides all details about the SQL Server build. The other method to read the error log is sp_readerrorlog procedure and the first line of the resultset indicates the SQL Server instance details:

错误日志文件的条目提供了有关SQL Server构建的所有详细信息。 读取错误日志的另一种方法是sp_readerrorlog过程,结果集的第一行指示SQL Server实例详细信息:

结论 (Conclusion)

In this article, we mentioned how to find out the SQL Server version with the different methods and also learned how to convert it to more meaningful information. After reading this article, you should be able to distinguish which SQL Server product version number corresponds exactly to which specific definition and other detailed information.

在本文中,我们提到了如何使用不同的方法找出SQL Server版本,并且还学习了如何将其转换为更有意义的信息。 阅读本文之后,您应该能够分辨出哪个SQL Server产品版本号与哪个特定定义以及其他详细信息完全对应。

翻译自: https://www.sqlshack.com/how-to-find-sql-server-version/

sql server键查找

sql server键查找_如何查找SQL Server版本相关推荐

  1. flask sql外键使用_如何在SQL中使用外键?

    flask sql外键使用 Basically, Foreign Key represents relationship between tables. 基本上, 外键代表表之间的关系 . Synta ...

  2. sql查询禁用缓存_如何在SQL Server 2017中启用和禁用身份缓存

    sql查询禁用缓存 Every data warehouse developer is likely to appreciate the significance of having surrogat ...

  3. python sql server 数据同步_两台SQL Server数据同步解决方案

    --定时同步服务器上的数据 --例子: --测试环境,SQL Server2000,远程服务器名:xz,用户名为:sa,无密码,测试数据库:test --服务器上的表(查询分析器连接到服务器上创建) ...

  4. sql查询初学者指南_面向初学者SQL Server查询执行计划–类型和选项

    sql查询初学者指南 When a DBA is working with the SQL Server, he/she might sometimes say that the execution ...

  5. sql server伪列_伪简单SQL Server恢复模型

    sql server伪列 This article gives an overview of the Pseudo Simple SQL Server Recovery Model. It also ...

  6. sql 倒数第二个_小白初探SQL(一)

    SQL(结构化查询语言)是目前使用最广泛的数据库语言,可以同各种数据库建立联系.进行沟通,应用十分的广泛. ◆ 结构化查询语言(Structured Query Language)简称SQL,是结构 ...

  7. sql有循环吗_我把 SQL 执行效率提高了 10,000,000 倍!

    场景 用的数据库是mysql5.6,下面简单的介绍下场景 课程表 create table Course( c_id int PRIMARY KEY, name varchar(10) ) 数据100 ...

  8. sql 一次性批量插入_考虑使用SQL批量插入的安全性

    sql 一次性批量插入 In this article, we'll discuss security implications of using SQL Bulk Insert and how to ...

  9. sql 表变量 临时表_何时使用SQL临时表与表变量

    sql 表变量 临时表 It is very beneficial to store data in SQL Server temp tables rather than manipulate or ...

最新文章

  1. 【新星计划】MATLAB plot绘制图像
  2. 玩转springboot:thymeleaf模板引擎入门程序
  3. 简单的串口助手程序开发
  4. 垂直梯形校正画质损失多少_梯形校正功能是怎么实现的?其中可大有学问
  5. jquery日期插件_AngularJS 日期时间选择组件(附详细使用方法)
  6. 数据科学可视化之要途
  7. linux dr校园网端口被占用,Dr.com端口占用的解决
  8. 惊爆漏洞ShopEX4.8.5隐患漏洞,最终解决方法ShopEX4.8.5安装完成后打开显示:Access denied by install.lock...
  9. 学前端有什么好方法,怎么才能更快学会前端?
  10. 后退与hash的问题
  11. 实用:旋转矩阵与方向余弦矩阵(DCM)
  12. 基于中国新能源汽车税收政策下成都市场发展路线研究
  13. 弗洛伊德算法原理解释(数学证明)
  14. html5 sha1,js-sha1加密
  15. Andre Weil的一生
  16. RabbitMQ 下载安装 (window) 百度网盘
  17. Line 14: Char 22: runtime error: signed integer overflow: 1000000000 * 9 cannot be represented
  18. 【无标题】UOS显示仓库https://professional-packages.chinauos.com/desktop-professional 没有数字签名
  19. 秒懂色彩位数:8bit、10bit、12bit(三十)
  20. 网络营销实战课-微博实操

热门文章

  1. 为何谷歌放弃以甜品命名android,甜点不见了 谷歌变更Android命名方式
  2. 74LS139改3―8线译码器_3、5号线沿线楼盘6800起!另:为无缝衔接地铁 新增调整公交线路一览!...
  3. 辐射避难所买了东西显示服务器异常,辐射避难所常见问题汇总 专治疑难杂症...
  4. 最大连续子数组和 动态规划_每日LeetCode,乘积最大子数组
  5. MFC初步教程(一)
  6. sonarqube使用maven进行代码分析
  7. 第二阶段团队冲刺(五)
  8. org.springframework.beans.factory.BeanCreationException...
  9. PLSQL DEVELOPER编辑器的自动替换文件
  10. css3导航渐变 滑过显示动画