• 欢迎访问搞代码网站,推荐使用最新版火狐浏览器和Chrome浏览器访问本网站!
  • 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏搞代码吧

SQLSERVER errorlog讲解

mysql 搞代码 4年前 (2022-01-09) 21次浏览 已收录 0个评论

SQLSERVER errorlog讲解 很多时候诊断SQLSERVER问题都需要看SQLSERVER的错误日志 日志里面很多内容没有书本专门讲解,今天我就讲一下,可能里面的日志信息是从我个人的机器 里抓出来的,跟大家的机器环境会有所不同,但是SQLSERVER启动部分的日志大家都是一

SQLSERVER errorlog讲解

很多时候诊断SQLSERVER问题都需要看SQLSERVER的错误日志

日志里面很多内容没有书本专门讲解,今天我就讲一下,可能里面的日志信息是从我个人的机器

里抓出来的,跟大家的机器环境会有所不同,但是SQLSERVER启动部分的日志大家都是一样的

特别的说一下:2013-02-12 17:53:29.29 spid29s

这些spid指的是SQLSERVER内部的进程,因为SQLSERVER内部有SQL OS,所以称呼他自己内部的线程为“进程”

所以在Windows的任务管理器里是看不到这些“进程ID的”的,这些进程ID也会跟会话关联的,例如你在

SSMS里新建一个查询,SQLSERVER就会新建一个会话ID(SPID),这些“进程”可以kill

<span>1</span> <span>KILL</span> spid <span>--</span><span>相应的spid</span>

相当于在cmd下运行:TASKKILL notepad.exe(进程ID)

不过这些kill命令是发给SQLSERVER去执行


在启动的时候,SQLSERVER会创建很多线程来进行初始化数据库或者其他工作,所以会看到下面的,但是spid会不同

2013-02-12 17:53:29.29 spid29s

开头:

<span>1</span> <span>2013</span><span>-</span><span>02</span><span>-</span><span>12</span> <span>17</span>:<span>53</span>:<span>22.26</span> Server      Microsoft SQL Server <span>2005</span> <span>-</span> <span>9.00</span>.<span>5069.00</span><span> (Intel X86) </span><span>2</span>     Aug <span>22</span> <span>2012</span> <span>16</span>:<span>01</span>:<span>52</span> <span>3</span>     Co<div>本文来源gaodai^.ma#com搞#代!码网</div>pyright (c) <span>1988</span><span>-</span><span>2005</span><span> Microsoft Corporation</span><span>4</span>     Developer Edition <span>on</span> Windows NT <span>6.1</span> (Build <span>7601</span>: Service Pack <span>1</span><span>)</span><span>5</span> <span>6</span> <span>--</span><span>启动信息,记录了你当前机器的SQL版本 和操作系统版本 SP补丁版本</span>

<span>1</span> <span>2013</span><span>-</span><span>02</span><span>-</span><span>12</span> <span>17</span>:<span>53</span>:<span>22.26</span> Server      (c) <span>2005</span><span> Microsoft Corporation.</span><span>2</span> <span>2013</span><span>-</span><span>02</span><span>-</span><span>12</span> <span>17</span>:<span>53</span>:<span>22.26</span> Server      <span>All</span><span> rights reserved.</span><span>3</span> <span>2013</span><span>-</span><span>02</span><span>-</span><span>12</span> <span>17</span>:<span>53</span>:<span>22.26</span> Server      Server process ID <span>is</span> <span>5164</span><span>.</span><span>4</span> <span>2013</span><span>-</span><span>02</span><span>-</span><span>12</span> <span>17</span>:<span>53</span>:<span>22.26</span> Server      Authentication mode <span>is</span><span> MIXED.</span><span>5</span> <span>2013</span><span>-</span><span>02</span><span>-</span><span>12</span> <span>17</span>:<span>53</span>:<span>22.26</span> Server      Logging SQL Server messages <span>in</span> <span>file</span> <span>'</span><span>C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\LOG\ERRORLOG</span><span>'</span><span>.</span><span>6</span> <span>2013</span><span>-</span><span>02</span><span>-</span><span>12</span> <span>17</span>:<span>53</span>:<span>22.26</span> Server      This instance <span>of</span> SQL Server last reported using a process ID <span>of</span> <span>3756</span> at <span>2013</span><span>/</span><span>2</span><span>/</span><span>12</span> <span>15</span>:<span>38</span>:<span>30</span> (local) <span>2013</span><span>/</span><span>2</span><span>/</span><span>12</span> <span>7</span>:<span>38</span>:<span>30</span> (UTC). This <span>is</span> an informational message <span>only</span>; no <span>user</span> action <span>is</span><span> required.</span><span>7</span> <span>--</span><span>SQL进程ID是5164  登录SQLSERVER的验证模式是:混合模式</span><span>8</span> <span>--</span><span>errorlog存放的目录是:你懂的</span><span>9</span> <span>--</span><span>上次启动SQLSERVER使用的进程ID是3756</span>


搞代码网(gaodaima.com)提供的所有资源部分来自互联网,如果有侵犯您的版权或其他权益,请说明详细缘由并提供版权或权益证明然后发送到邮箱[email protected],我们会在看到邮件的第一时间内为您处理,或直接联系QQ:872152909。本网站采用BY-NC-SA协议进行授权
转载请注明原文链接:SQLSERVER errorlog讲解

喜欢 (0)
[搞代码]
分享 (0)
发表我的评论
取消评论

表情 贴图 加粗 删除线 居中 斜体 签到

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址