分享今天在客户那里遇到的SQLSERVER连接超时以及我的解决办法
分享今天在客户那里遇到的SQLSERVER连接超时以及我的解决办法
客户的环境:SQLSERVER2005,WINDOWS2003 SP2 32位
这次发生连接超时的时间是2013-8-5 21:34分
在2013-8-5 19:25分左右也发生过一次
下面的SQL ERRORLOG截取的是19:18分~22:08分时间段之内的关键日志!!!
这个问题昨天出现了一次,今天出现了两次,起初没有认真对待,认为重启一下机器就没事了
我认为是CPU占用高或者内存占用高或者磁盘读写高,因为客户的机器安装了360安全卫士,
当时客户反映360安全卫士报“磁盘读写高”
因为我当时看了任务管理器,windows日志,各项信息都很正常,CPU占用在30%左右,内存在800MB左右
360那里也没有看出磁盘读写特别高(注意:当时我是在客户重启了机器之后看的!!!!!!!!!!!!)
-------------------------------------华丽的分割线-----------------------------
入手
谁知道今晚又出现第三次,使得我要从酒店又跑回客户那里
我去到客户那里第一时间先看windows日志和sql errorlog
由于在SQL ERRORLOG里看到很多想尝试登陆数据库而失败的日志,
而且看到Windows eventlog里有好几次SQL服务意外关闭
的记录,但是SQLSERVER是没有shutdown 电脑的SQL语句的,所以肯定不是外人所为
而且连接超时也不是经常出现,所以排除了黑客捣蛋的可能性(客户的电脑设置了防火墙,sa用户禁用,路由器只开了1433端口)
电脑也做了一些安全设置
不过SQLSERVER有停止Microsoft SQL server的命令
下面两个SQL语句都可以用来停止SQLSERVER
SHUTDOWN
SHUTDOWN WITH NOWAIT
不过如果运行上面两个语句,在SQL ERRORLOG里会有相应的日志记录的
2013-11-30 00:09:42.89 spid12s Service Broker manager has shut down.
2013-11-30 00:09:42.94 spid54 Server shut down by request from login JOE\Administrator.
2013-11-30 00:09:42.94 spid54 SQL Trace was stopped due to server shutdown. Trace ID = ''. This is an informational message only; no user action is required.
2013-11-30 00:09:42.94 spid54 SQL Trace was stopped due to server shutdown. Trace ID = ''. This is an informational message only; no user action is required.
2013-11-30 00:09:43.87 登录 错误: 17188,严重性: 16,状态: 1。
2013-11-30 00:09:43.87 登录 SQL Server cannot accept new connections, because it is shutting down. The connection has been closed. [客户端: <local machine>]
2013-11-30 00:09:43.87 登录 错误: 17188,严重性: 16,状态: 1。
2013-11-30 00:09:43.87 登录 SQL Server cannot accept new connections, because it is shutting down. The connection has been closed. [客户端: <local machine>]
2013-11-30 00:14:19.99 spid52 Server shut down by NOWAIT request from login JOE\Administrator.
2013-11-30 00:14:19.99 spid52 SQL Trace was stopped due to server shutdown. Trace ID = ''. This is an informational message only; no user action is required.
2013-11-30 00:14:19.99 spid52 SQL Trace was stopped due to server shutdown. Trace ID = ''. This is an informational message only; no user action is required.
2013-11-30 00:09:42.94 spid54 Server shut down by request from login JOE\Administrator.
2013-11-30 00:14:19.99 spid52 Server shut down by NOWAIT request from login JOE\Administrator.
通过SQL语句来shundownSQLSERVER在错误日志里会显示上面两条记录
但是这次的shutdown记录是
SQL Server is terminating because of a system shutdown.
----------------------------------华丽的分割线-------------------------------
再仔细分析
由于我们的应用系统其中一个是用delphi写的,而且用ODBC来连接SQLSERVER,而且这个应用
是一打开就马上open connection,直到退出这个应用为止,不像C# 执行完毕就close()
所以如果这个应用断开与数据库的连接就会影响到客户的业务运行,当时操作系统弹出“超时对话框”的时候
点击我们的系统很慢几乎没有反应,响应很迟钝,我重启电脑,看一下windows日志
我在客户的机器里截了一些图片
再看一下SQL ERRORLOG
下面这个是重启电脑之后,SQLSERVER启动的SQLERRORLOG
2013-08-05 19:18:09.24 Server Microsoft SQL Server 2005 - 9.00.5000.00 (Intel X86)
Dec 10 2010 10:56:29
Copyright (c) 1988-2005 Microsoft Corporation
Enterprise Edition on Windows NT 5.2 (Build 3790: Service Pack 2) 2013-08-05 19:18:09.31 Server (c) 2005 Microsoft Corporation.
2013-08-05 19:18:09.31 Server All rights reserved.
2013-08-05 19:18:09.31 Server Server process ID is 2744.
2013-08-05 19:18:09.33 Server Authentication mode is MIXED.
2013-08-05 19:18:09.33 Server Logging SQL Server messages in file 'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\LOG\ERRORLOG'.
2013-08-05 19:18:09.33 Server This instance of SQL Server last reported using a process ID of 888 at 2013-8-5 19:17:27 (local) 2013-8-5 11:17:27 (UTC). This is an informational message only; no user action is required.
2013-08-05 19:18:09.33 Server Registry startup parameters:
2013-08-05 19:18:09.33 Server -d C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\master.mdf
2013-08-05 19:18:09.33 Server -e C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\LOG\ERRORLOG
2013-08-05 19:18:09.33 Server -l C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\mastlog.ldf
2013-08-05 19:18:09.36 服务器 SQL Server is starting at normal priority base (=7). This is an informational message only. No user action is required.
2013-08-05 19:18:09.36 服务器 Detected 2 CPUs. This is an informational message; no user action is required.
2013-08-05 19:18:09.73 服务器 Using dynamic lock allocation. Initial allocation of 2500 Lock blocks and 5000 Lock Owner blocks per node. This is an informational message only. No user action is required.
2013-08-05 19:18:10.05 服务器 Attempting to initialize Microsoft Distributed Transaction Coordinator (MS DTC). This is an informational message only. No user action is required.
2013-08-05 19:18:10.39 服务器 The Microsoft Distributed Transaction Coordinator (MS DTC) service could not be contacted. If you would like distributed transaction functionality, please start this service.
2013-08-05 19:18:10.46 服务器 Database mirroring has been enabled on this instance of SQL Server.
2013-08-05 19:18:10.56 spid5s Starting up database 'master'.
2013-08-05 19:18:10.69 spid5s 33 transactions rolled forward in database 'master' (1). This is an informational message only. No user action is required.
2013-08-05 19:18:10.74 spid5s 0 transactions rolled back in database 'master' (1). This is an informational message only. No user action is required.
2013-08-05 19:18:10.74 spid5s Recovery is writing a checkpoint in database 'master' (1). This is an informational message only. No user action is required.
2013-08-05 19:18:10.88 spid5s Starting up database 'mssqlsystemresource'.
2013-08-05 19:18:10.92 spid5s The resource database build version is 9.00.5000. This is an informational message only. No user action is required.
2013-08-05 19:18:11.18 spid5s Server name is 'HS'. This is an informational message only. No user action is required.
2013-08-05 19:18:11.20 spid8s Starting up database 'model'.
2013-08-05 19:18:11.42 spid8s Clearing tempdb database.
2013-08-05 19:18:12.12 spid8s Starting up database 'tempdb'.
2013-08-05 19:18:12.34 spid11s The Service Broker protocol transport is disabled or not configured.
2013-08-05 19:18:12.34 spid11s The Database Mirroring protocol transport is disabled or not configured.
2013-08-05 19:18:12.38 spid11s Service Broker manager has started.
2013-08-05 19:18:12.60 服务器 A self-generated certificate was successfully loaded for encryption.
2013-08-05 19:18:12.62 服务器 Server is listening on [ 'any' <ipv4> 1433].
2013-08-05 19:18:12.62 服务器 Server local connection provider is ready to accept connection on [ \\.\pipe\SQLLocal\MSSQLSERVER ].
2013-08-05 19:18:12.62 服务器 Server named pipe provider is ready to accept connection on [ \\.\pipe\sql\query ].
2013-08-05 19:18:12.64 服务器 Server is listening on [ 'any' <ipv4> 1434].
2013-08-05 19:18:12.64 服务器 Dedicated admin connection support was established for listening remotely on port 1434.
2013-08-05 19:18:12.70 服务器 The SQL Network Interface library could not register the Service Principal Name (SPN) for the SQL Server service. Error: 0x54b, state: 3. Failure to register an SPN may cause integrated authentication to fall back to NTLM instead of Kerberos. This is an informational message. Further action is only required if Kerberos authentication is required by authentication policies.
2013-08-05 19:18:12.70 服务器 SQL Server is now ready for client connections. This is an informational message; no user action is required.
2013-08-05 19:18:13.23 spid14s Starting up database 'msdb'.
2013-08-05 19:18:13.23 spid15s Starting up database 'GPOSDB'.
2013-08-05 19:18:14.31 spid14s 25 transactions rolled forward in database 'msdb' (4). This is an informational message only. No user action is required.
2013-08-05 19:18:14.78 spid5s 0 transactions rolled back in database 'msdb' (4). This is an informational message only. No user action is required.
2013-08-05 19:18:14.78 spid5s Recovery is writing a checkpoint in database 'msdb' (4). This is an informational message only. No user action is required.
2013-08-05 19:18:19.86 spid15s Analysis of database 'GPOSDB' (5) is 5% complete (approximately 4 seconds remain). This is an informational message only. No user action is required.
2013-08-05 19:18:23.85 spid15s Analysis of database 'GPOSDB' (5) is 82% complete (approximately 0 seconds remain). This is an informational message only. No user action is required.
2013-08-05 19:18:24.88 spid15s Analysis of database 'GPOSDB' (5) is 100% complete (approximately 0 seconds remain). This is an informational message only. No user action is required.
2013-08-05 19:18:24.88 spid15s Recovery of database 'GPOSDB' (5) is 0% complete (approximately 261 seconds remain). Phase 2 of 3. This is an informational message only. No user action is required.
2013-08-05 19:18:25.02 spid15s Recovery of database 'GPOSDB' (5) is 1% complete (approximately 7 seconds remain). Phase 2 of 3. This is an informational message only. No user action is required.
2013-08-05 19:18:30.50 spid15s Recovery of database 'GPOSDB' (5) is 57% complete (approximately 3 seconds remain). Phase 2 of 3. This is an informational message only. No user action is required.
2013-08-05 19:18:30.50 spid15s 214 transactions rolled forward in database 'GPOSDB' (5). This is an informational message only. No user action is required.
2013-08-05 19:18:30.61 spid15s Recovery of database 'GPOSDB' (5) is 57% complete (approximately 3 seconds remain). Phase 3 of 3. This is an informational message only. No user action is required.
2013-08-05 19:18:30.71 spid5s Recovery of database 'GPOSDB' (5) is 100% complete (approximately 0 seconds remain). Phase 3 of 3. This is an informational message only. No user action is required.
2013-08-05 19:18:30.71 spid5s 0 transactions rolled back in database 'GPOSDB' (5). This is an informational message only. No user action is required.
2013-08-05 19:18:30.71 spid5s Recovery is writing a checkpoint in database 'GPOSDB' (5). This is an informational message only. No user action is required.
2013-08-05 19:18:30.73 spid5s Recovery is complete. This is an informational message only. No user action is required.
2013-08-05 19:18:31.64 spid51 Using 'xpstar90.dll' version '2005.90.5000' to execute extended stored procedure 'xp_sqlagent_monitor'. This is an informational message only; no user action is required.
下面这个是电脑正常重启的时候的SQL ERRORLOG
2013-08-05 21:59:51.28 Server Microsoft SQL Server 2005 - 9.00.5000.00 (Intel X86)
Dec 10 2010 10:56:29
Copyright (c) 1988-2005 Microsoft Corporation
Enterprise Edition on Windows NT 5.2 (Build 3790: Service Pack 2) 2013-08-05 21:59:51.28 Server (c) 2005 Microsoft Corporation.
2013-08-05 21:59:51.28 Server All rights reserved.
2013-08-05 21:59:51.28 Server Server process ID is 1228.
2013-08-05 21:59:51.28 Server Authentication mode is MIXED.
2013-08-05 21:59:51.28 Server Logging SQL Server messages in file 'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\LOG\ERRORLOG'.
2013-08-05 21:59:51.28 Server This instance of SQL Server last reported using a process ID of 3700 at 2013-8-5 21:58:42 (local) 2013-8-5 13:58:42 (UTC). This is an informational message only; no user action is required.
2013-08-05 21:59:51.28 Server Registry startup parameters:
2013-08-05 21:59:51.28 Server -d C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\master.mdf
2013-08-05 21:59:51.28 Server -e C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\LOG\ERRORLOG
2013-08-05 21:59:51.28 Server -l C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\mastlog.ldf
2013-08-05 21:59:51.37 服务器 SQL Server is starting at normal priority base (=7). This is an informational message only. No user action is required.
2013-08-05 21:59:51.39 服务器 Detected 2 CPUs. This is an informational message; no user action is required.
2013-08-05 21:59:53.82 服务器 Using dynamic lock allocation. Initial allocation of 2500 Lock blocks and 5000 Lock Owner blocks per node. This is an informational message only. No user action is required.
2013-08-05 21:59:53.89 服务器 Attempting to initialize Microsoft Distributed Transaction Coordinator (MS DTC). This is an informational message only. No user action is required.
2013-08-05 21:59:53.90 服务器 The Microsoft Distributed Transaction Coordinator (MS DTC) service could not be contacted. If you would like distributed transaction functionality, please start this service.
2013-08-05 21:59:53.90 服务器 Database mirroring has been enabled on this instance of SQL Server.
2013-08-05 21:59:53.91 spid5s Starting up database 'master'.
2013-08-05 21:59:54.34 spid5s Recovery is writing a checkpoint in database 'master' (1). This is an informational message only. No user action is required.
2013-08-05 21:59:54.93 spid5s Starting up database 'mssqlsystemresource'.
2013-08-05 21:59:55.24 spid5s The resource database build version is 9.00.5000. This is an informational message only. No user action is required.
2013-08-05 21:59:55.68 spid5s Server name is 'HS'. This is an informational message only. No user action is required.
2013-08-05 21:59:55.68 spid8s Starting up database 'model'.
2013-08-05 21:59:56.09 服务器 A self-generated certificate was successfully loaded for encryption.
2013-08-05 21:59:56.10 服务器 Server is listening on [ 'any' <ipv4> 1433].
2013-08-05 21:59:56.10 服务器 Server local connection provider is ready to accept connection on [ \\.\pipe\SQLLocal\MSSQLSERVER ].
2013-08-05 21:59:56.10 服务器 Server named pipe provider is ready to accept connection on [ \\.\pipe\sql\query ].
2013-08-05 21:59:56.10 服务器 Server is listening on [ 'any' <ipv4> 1434].
2013-08-05 21:59:56.10 服务器 Dedicated admin connection support was established for listening remotely on port 1434.
2013-08-05 21:59:56.10 服务器 The SQL Network Interface library could not register the Service Principal Name (SPN) for the SQL Server service. Error: 0x54b, state: 3. Failure to register an SPN may cause integrated authentication to fall back to NTLM instead of Kerberos. This is an informational message. Further action is only required if Kerberos authentication is required by authentication policies.
2013-08-05 21:59:56.11 服务器 SQL Server is now ready for client connections. This is an informational message; no user action is required.
2013-08-05 21:59:56.13 spid11s Starting up database 'msdb'.
2013-08-05 21:59:56.13 spid12s Starting up database 'GPOSDB'.
2013-08-05 21:59:56.67 spid8s Clearing tempdb database.
2013-08-05 22:00:24.12 spid8s Starting up database 'tempdb'.
2013-08-05 22:00:33.17 spid5s Recovery is complete. This is an informational message only. No user action is required.
2013-08-05 22:00:33.17 spid11s The Service Broker protocol transport is disabled or not configured.
2013-08-05 22:00:33.17 spid11s The Database Mirroring protocol transport is disabled or not configured.
2013-08-05 22:00:33.30 spid11s Service Broker manager has started.
2013-08-05 22:00:42.62 spid51 Using 'xpsqlbot.dll' version '2005.90.5000' to execute extended stored procedure 'xp_qv'. This is an informational message only; no user action is required.
2013-08-05 22:00:45.54 spid51 Using 'xpstar90.dll' version '2005.90.5000' to execute extended stored procedure 'xp_instance_regread'. This is an informational message only; no user action is required.
2013-08-05 22:00:47.02 spid51 Using 'xplog70.dll' version '2005.90.5000' to execute extended stored procedure 'xp_msver'. This is an informational message only; no user action is required.
2013-08-05 22:05:43.46 登录 错误: 18456,严重性: 14,状态: 7。
2013-08-05 22:05:43.46 登录 Login failed for user 'sa'. [客户端: 211.149.156.95]
2013-08-05 22:07:25.21 登录 错误: 18456,严重性: 14,状态: 7。
2013-08-05 22:07:25.21 登录 Login failed for user 'sa'. [客户端: 59.188.137.45]
2013-08-05 22:07:25.31 登录 错误: 18456,严重性: 14,状态: 7。
2013-08-05 22:07:25.31 登录 Login failed for user 'sa'. [客户端: 59.188.137.45]
2013-08-05 22:07:25.40 登录 错误: 18456,严重性: 14,状态: 7。
2013-08-05 22:07:25.40 登录 Login failed for user 'sa'. [客户端: 59.188.137.45]
2013-08-05 22:07:29.17 登录 错误: 18456,严重性: 14,状态: 7。
2013-08-05 22:07:29.17 登录 Login failed for user 'sa'. [客户端: 59.188.137.45]
2013-08-05 22:07:29.26 登录 错误: 18456,严重性: 14,状态: 7。
2013-08-05 22:07:29.26 登录 Login failed for user 'sa'. [客户端: 59.188.137.45]
2013-08-05 22:07:32.26 登录 错误: 18456,严重性: 14,状态: 7。
2013-08-05 22:07:32.26 登录 Login failed for user 'sa'. [客户端: 59.188.137.45]
2013-08-05 22:07:32.35 登录 错误: 18456,严重性: 14,状态: 7。
2013-08-05 22:07:32.35 登录 Login failed for user 'sa'. [客户端: 59.188.137.45]
2013-08-05 22:07:32.45 登录 错误: 18456,严重性: 14,状态: 7。
2013-08-05 22:07:32.45 登录 Login failed for user 'sa'. [客户端: 59.188.137.45]
2013-08-05 22:07:32.54 登录 错误: 18456,严重性: 14,状态: 7。
2013-08-05 22:07:32.54 登录 Login failed for user 'sa'. [客户端: 59.188.137.45]
2013-08-05 22:07:32.63 登录 错误: 18456,严重性: 14,状态: 7。
2013-08-05 22:07:32.63 登录 Login failed for user 'sa'. [客户端: 59.188.137.45]
2013-08-05 22:07:32.73 登录 错误: 18456,严重性: 14,状态: 7。
2013-08-05 22:07:32.73 登录 Login failed for user 'sa'. [客户端: 59.188.137.45]
2013-08-05 22:07:32.82 登录 错误: 18456,严重性: 14,状态: 7。
2013-08-05 22:07:32.82 登录 Login failed for user 'sa'. [客户端: 59.188.137.45]
2013-08-05 22:07:32.91 登录 错误: 18456,严重性: 14,状态: 7。
2013-08-05 22:07:32.91 登录 Login failed for user 'sa'. [客户端: 59.188.137.45]
2013-08-05 22:07:33.00 登录 错误: 18456,严重性: 14,状态: 7。
2013-08-05 22:07:33.00 登录 Login failed for user 'sa'. [客户端: 59.188.137.45]
2013-08-05 22:07:33.09 登录 错误: 18456,严重性: 14,状态: 7。
2013-08-05 22:07:33.09 登录 Login failed for user 'sa'. [客户端: 59.188.137.45]
2013-08-05 22:07:33.19 登录 错误: 18456,严重性: 14,状态: 7。
2013-08-05 22:07:33.19 登录 Login failed for user 'sa'. [客户端: 59.188.137.45]
2013-08-05 22:07:33.28 登录 错误: 18456,严重性: 14,状态: 7。
2013-08-05 22:07:33.28 登录 Login failed for user 'sa'. [客户端: 59.188.137.45]
2013-08-05 22:07:33.37 登录 错误: 18456,严重性: 14,状态: 7。
2013-08-05 22:07:33.37 登录 Login failed for user 'sa'. [客户端: 59.188.137.45]
2013-08-05 22:07:36.42 登录 错误: 18456,严重性: 14,状态: 7。
2013-08-05 22:07:36.42 登录 Login failed for user 'sa'. [客户端: 59.188.137.45]
2013-08-05 22:07:36.51 登录 错误: 18456,严重性: 14,状态: 7。
2013-08-05 22:07:36.51 登录 Login failed for user 'sa'. [客户端: 59.188.137.45]
2013-08-05 22:07:36.60 登录 错误: 18456,严重性: 14,状态: 7。
2013-08-05 22:07:36.60 登录 Login failed for user 'sa'. [客户端: 59.188.137.45]
2013-08-05 22:07:36.69 登录 错误: 18456,严重性: 14,状态: 7。
2013-08-05 22:07:36.69 登录 Login failed for user 'sa'. [客户端: 59.188.137.45]
2013-08-05 22:07:42.65 登录 错误: 18456,严重性: 14,状态: 7。
2013-08-05 22:07:42.65 登录 Login failed for user 'sa'. [客户端: 59.188.137.45]
2013-08-05 22:07:42.74 登录 错误: 18456,严重性: 14,状态: 7。
2013-08-05 22:07:42.74 登录 Login failed for user 'sa'. [客户端: 59.188.137.45]
2013-08-05 22:07:42.84 登录 错误: 18456,严重性: 14,状态: 7。
2013-08-05 22:07:42.84 登录 Login failed for user 'sa'. [客户端: 59.188.137.45]
2013-08-05 22:07:42.93 登录 错误: 18456,严重性: 14,状态: 7。
2013-08-05 22:07:42.93 登录 Login failed for user 'sa'. [客户端: 59.188.137.45]
2013-08-05 22:07:43.02 登录 错误: 18456,严重性: 14,状态: 7。
2013-08-05 22:07:43.02 登录 Login failed for user 'sa'. [客户端: 59.188.137.45]
2013-08-05 22:07:43.11 登录 错误: 18456,严重性: 14,状态: 7。
2013-08-05 22:07:43.11 登录 Login failed for user 'sa'. [客户端: 59.188.137.45]
2013-08-05 22:07:43.21 登录 错误: 18456,严重性: 14,状态: 7。
2013-08-05 22:07:43.21 登录 Login failed for user 'sa'. [客户端: 59.188.137.45]
2013-08-05 22:07:43.30 登录 错误: 18456,严重性: 14,状态: 7。
2013-08-05 22:07:43.30 登录 Login failed for user 'sa'. [客户端: 59.188.137.45]
2013-08-05 22:07:43.39 登录 错误: 18456,严重性: 14,状态: 7。
2013-08-05 22:07:43.39 登录 Login failed for user 'sa'. [客户端: 59.188.137.45]
2013-08-05 22:07:43.48 登录 错误: 18456,严重性: 14,状态: 7。
2013-08-05 22:07:43.48 登录 Login failed for user 'sa'. [客户端: 59.188.137.45]
2013-08-05 22:07:43.58 登录 错误: 18456,严重性: 14,状态: 7。
2013-08-05 22:07:43.58 登录 Login failed for user 'sa'. [客户端: 59.188.137.45]
2013-08-05 22:07:43.67 登录 错误: 18456,严重性: 14,状态: 7。
2013-08-05 22:07:43.67 登录 Login failed for user 'sa'. [客户端: 59.188.137.45]
2013-08-05 22:07:46.64 登录 错误: 18456,严重性: 14,状态: 7。
2013-08-05 22:07:46.64 登录 Login failed for user 'sa'. [客户端: 59.188.137.45]
2013-08-05 22:07:49.73 登录 错误: 18456,严重性: 14,状态: 7。
2013-08-05 22:07:49.73 登录 Login failed for user 'sa'. [客户端: 59.188.137.45]
2013-08-05 22:07:49.82 登录 错误: 18456,严重性: 14,状态: 7。
2013-08-05 22:07:49.82 登录 Login failed for user 'sa'. [客户端: 59.188.137.45]
2013-08-05 22:07:49.92 登录 错误: 18456,严重性: 14,状态: 7。
2013-08-05 22:07:49.92 登录 Login failed for user 'sa'. [客户端: 59.188.137.45]
2013-08-05 22:07:50.01 登录 错误: 18456,严重性: 14,状态: 7。
2013-08-05 22:07:50.01 登录 Login failed for user 'sa'. [客户端: 59.188.137.45]
2013-08-05 22:07:50.10 登录 错误: 18456,严重性: 14,状态: 7。
2013-08-05 22:07:50.10 登录 Login failed for user 'sa'. [客户端: 59.188.137.45]
2013-08-05 22:07:50.19 登录 错误: 18456,严重性: 14,状态: 7。
2013-08-05 22:07:50.19 登录 Login failed for user 'sa'. [客户端: 59.188.137.45]
2013-08-05 22:07:50.29 登录 错误: 18456,严重性: 14,状态: 7。
2013-08-05 22:07:50.29 登录 Login failed for user 'sa'. [客户端: 59.188.137.45]
2013-08-05 22:07:50.38 登录 错误: 18456,严重性: 14,状态: 7。
2013-08-05 22:07:50.38 登录 Login failed for user 'sa'. [客户端: 59.188.137.45]
2013-08-05 22:07:50.47 登录 错误: 18456,严重性: 14,状态: 7。
2013-08-05 22:07:50.47 登录 Login failed for user 'sa'. [客户端: 59.188.137.45]
2013-08-05 22:07:50.56 登录 错误: 18456,严重性: 14,状态: 7。
2013-08-05 22:07:50.56 登录 Login failed for user 'sa'. [客户端: 59.188.137.45]
2013-08-05 22:07:50.66 登录 错误: 18456,严重性: 14,状态: 7。
2013-08-05 22:07:50.66 登录 Login failed for user 'sa'. [客户端: 59.188.137.45]
2013-08-05 22:07:50.75 登录 错误: 18456,严重性: 14,状态: 7。
2013-08-05 22:07:50.75 登录 Login failed for user 'sa'. [客户端: 59.188.137.45]
2013-08-05 22:07:50.84 登录 错误: 18456,严重性: 14,状态: 7。
2013-08-05 22:07:50.84 登录 Login failed for user 'sa'. [客户端: 59.188.137.45]
2013-08-05 22:07:50.93 登录 错误: 18456,严重性: 14,状态: 7。
2013-08-05 22:07:50.93 登录 Login failed for user 'sa'. [客户端: 59.188.137.45]
2013-08-05 22:07:51.03 登录 错误: 18456,严重性: 14,状态: 7。
2013-08-05 22:07:51.03 登录 Login failed for user 'sa'. [客户端: 59.188.137.45]
2013-08-05 22:07:51.12 登录 错误: 18456,严重性: 14,状态: 7。
2013-08-05 22:07:51.12 登录 Login failed for user 'sa'. [客户端: 59.188.137.45]
2013-08-05 22:07:51.21 登录 错误: 18456,严重性: 14,状态: 7。
2013-08-05 22:07:51.21 登录 Login failed for user 'sa'. [客户端: 59.188.137.45]
2013-08-05 22:07:53.91 登录 错误: 18456,严重性: 14,状态: 7。
2013-08-05 22:07:53.91 登录 Login failed for user 'sa'. [客户端: 59.188.137.45]
2013-08-05 22:07:54.00 登录 错误: 18456,严重性: 14,状态: 7。
2013-08-05 22:07:54.00 登录 Login failed for user 'sa'. [客户端: 59.188.137.45]
2013-08-05 22:07:54.09 登录 错误: 18456,严重性: 14,状态: 7。
2013-08-05 22:07:54.09 登录 Login failed for user 'sa'. [客户端: 59.188.137.45]
2013-08-05 22:07:54.18 登录 错误: 18456,严重性: 14,状态: 7。
2013-08-05 22:07:54.18 登录 Login failed for user 'sa'. [客户端: 59.188.137.45]
2013-08-05 22:07:54.28 登录 错误: 18456,严重性: 14,状态: 7。
2013-08-05 22:07:54.28 登录 Login failed for user 'sa'. [客户端: 59.188.137.45]
2013-08-05 22:07:54.37 登录 错误: 18456,严重性: 14,状态: 7。
2013-08-05 22:07:54.37 登录 Login failed for user 'sa'. [客户端: 59.188.137.45]
2013-08-05 22:07:54.46 登录 错误: 18456,严重性: 14,状态: 7。
2013-08-05 22:07:54.46 登录 Login failed for user 'sa'. [客户端: 59.188.137.45]
2013-08-05 22:07:54.55 登录 错误: 18456,严重性: 14,状态: 7。
2013-08-05 22:07:54.55 登录 Login failed for user 'sa'. [客户端: 59.188.137.45]
2013-08-05 22:07:54.65 登录 错误: 18456,严重性: 14,状态: 7。
2013-08-05 22:07:54.65 登录 Login failed for user 'sa'. [客户端: 59.188.137.45]
2013-08-05 22:07:54.74 登录 错误: 18456,严重性: 14,状态: 7。
2013-08-05 22:07:54.74 登录 Login failed for user 'sa'. [客户端: 59.188.137.45]
2013-08-05 22:07:54.83 登录 错误: 18456,严重性: 14,状态: 7。
2013-08-05 22:07:54.83 登录 Login failed for user 'sa'. [客户端: 59.188.137.45]
2013-08-05 22:07:54.92 登录 错误: 18456,严重性: 14,状态: 7。
2013-08-05 22:07:54.92 登录 Login failed for user 'sa'. [客户端: 59.188.137.45]
2013-08-05 22:07:57.96 登录 错误: 18456,严重性: 14,状态: 7。
2013-08-05 22:07:57.96 登录 Login failed for user 'sa'. [客户端: 59.188.137.45]
2013-08-05 22:07:58.06 登录 错误: 18456,严重性: 14,状态: 7。
2013-08-05 22:07:58.06 登录 Login failed for user 'sa'. [客户端: 59.188.137.45]
2013-08-05 22:08:01.45 登录 错误: 18456,严重性: 14,状态: 7。
2013-08-05 22:08:01.45 登录 Login failed for user 'sa'. [客户端: 59.188.137.45]
2013-08-05 22:08:01.54 登录 错误: 18456,严重性: 14,状态: 7。
2013-08-05 22:08:01.54 登录 Login failed for user 'sa'. [客户端: 59.188.137.45]
2013-08-05 22:08:01.63 登录 错误: 18456,严重性: 14,状态: 7。
2013-08-05 22:08:01.63 登录 Login failed for user 'sa'. [客户端: 59.188.137.45]
2013-08-05 22:08:01.73 登录 错误: 18456,严重性: 14,状态: 7。
2013-08-05 22:08:01.73 登录 Login failed for user 'sa'. [客户端: 59.188.137.45]
2013-08-05 22:08:01.82 登录 错误: 18456,严重性: 14,状态: 7。
2013-08-05 22:08:01.82 登录 Login failed for user 'sa'. [客户端: 59.188.137.45]
2013-08-05 22:08:01.91 登录 错误: 18456,严重性: 14,状态: 7。
2013-08-05 22:08:01.91 登录 Login failed for user 'sa'. [客户端: 59.188.137.45]
2013-08-05 22:08:05.01 登录 错误: 18456,严重性: 14,状态: 7。
2013-08-05 22:08:05.01 登录 Login failed for user 'sa'. [客户端: 59.188.137.45]
2013-08-05 22:08:05.10 登录 错误: 18456,严重性: 14,状态: 7。
2013-08-05 22:08:05.10 登录 Login failed for user 'sa'. [客户端: 59.188.137.45]
2013-08-05 22:08:05.20 登录 错误: 18456,严重性: 14,状态: 7。
2013-08-05 22:08:05.20 登录 Login failed for user 'sa'. [客户端: 59.188.137.45]
2013-08-05 22:08:05.29 登录 错误: 18456,严重性: 14,状态: 7。
2013-08-05 22:08:05.29 登录 Login failed for user 'sa'. [客户端: 59.188.137.45]
2013-08-05 22:08:05.38 登录 错误: 18456,严重性: 14,状态: 7。
2013-08-05 22:08:05.38 登录 Login failed for user 'sa'. [客户端: 59.188.137.45]
2013-08-05 22:08:05.47 登录 错误: 18456,严重性: 14,状态: 7。
2013-08-05 22:08:05.47 登录 Login failed for user 'sa'. [客户端: 59.188.137.45]
2013-08-05 22:08:05.56 登录 错误: 18456,严重性: 14,状态: 7。
2013-08-05 22:08:05.56 登录 Login failed for user 'sa'. [客户端: 59.188.137.45]
2013-08-05 22:08:05.66 登录 错误: 18456,严重性: 14,状态: 7。
2013-08-05 22:08:05.66 登录 Login failed for user 'sa'. [客户端: 59.188.137.45]
2013-08-05 22:08:05.75 登录 错误: 18456,严重性: 14,状态: 7。
2013-08-05 22:08:05.75 登录 Login failed for user 'sa'. [客户端: 59.188.137.45]
2013-08-05 22:08:05.84 登录 错误: 18456,严重性: 14,状态: 7。
2013-08-05 22:08:05.84 登录 Login failed for user 'sa'. [客户端: 59.188.137.45]
2013-08-05 22:08:05.93 登录 错误: 18456,严重性: 14,状态: 7。
2013-08-05 22:08:05.93 登录 Login failed for user 'sa'. [客户端: 59.188.137.45]
2013-08-05 22:08:06.03 登录 错误: 18456,严重性: 14,状态: 7。
2013-08-05 22:08:06.03 登录 Login failed for user 'sa'. [客户端: 59.188.137.45]
2013-08-05 22:08:06.12 登录 错误: 18456,严重性: 14,状态: 7。
2013-08-05 22:08:06.12 登录 Login failed for user 'sa'. [客户端: 59.188.137.45]
2013-08-05 22:08:06.21 登录 错误: 18456,严重性: 14,状态: 7。
2013-08-05 22:08:06.21 登录 Login failed for user 'sa'. [客户端: 59.188.137.45]
2013-08-05 22:08:06.31 登录 错误: 18456,严重性: 14,状态: 7。
2013-08-05 22:08:06.31 登录 Login failed for user 'sa'. [客户端: 59.188.137.45]
2013-08-05 22:08:06.40 登录 错误: 18456,严重性: 14,状态: 7。
2013-08-05 22:08:06.40 登录 Login failed for user 'sa'. [客户端: 59.188.137.45]
2013-08-05 22:08:06.49 登录 错误: 18456,严重性: 14,状态: 7。
2013-08-05 22:08:06.49 登录 Login failed for user 'sa'. [客户端: 59.188.137.45]
2013-08-05 22:08:06.58 登录 错误: 18456,严重性: 14,状态: 7。
2013-08-05 22:08:06.58 登录 Login failed for user 'sa'. [客户端: 59.188.137.45]
2013-08-05 22:08:06.67 登录 错误: 18456,严重性: 14,状态: 7。
2013-08-05 22:08:06.67 登录 Login failed for user 'sa'. [客户端: 59.188.137.45]
2013-08-05 22:08:06.77 登录 错误: 18456,严重性: 14,状态: 7。
2013-08-05 22:08:06.77 登录 Login failed for user 'sa'. [客户端: 59.188.137.45]
2013-08-05 22:08:06.86 登录 错误: 18456,严重性: 14,状态: 7。
2013-08-05 22:08:06.86 登录 Login failed for user 'sa'. [客户端: 59.188.137.45]
2013-08-05 22:08:06.95 登录 错误: 18456,严重性: 14,状态: 7。
2013-08-05 22:08:06.95 登录 Login failed for user 'sa'. [客户端: 59.188.137.45]
2013-08-05 22:08:07.04 登录 错误: 18456,严重性: 14,状态: 7。
2013-08-05 22:08:07.04 登录 Login failed for user 'sa'. [客户端: 59.188.137.45]
可以看到两者的区别
不正常的比正常的多出了下面这几个语句
25 transactions rolled forward in database 'msdb' (4). This is an informational message only. No user action is required.
2013-08-05 19:18:14.78 spid5s 0 transactions rolled back in database 'msdb' (4). This is an informational message only. No user action is required.
2013-08-05 19:18:14.78 spid5s Recovery is writing a checkpoint in database 'msdb' (4). This is an informational message only. No user action is required.
2013-08-05 19:18:19.86 spid15s Analysis of database 'GPOSDB' (5) is 5% complete (approximately 4 seconds remain). This is an informational message only. No user action is required.
2013-08-05 19:18:23.85 spid15s Analysis of database 'GPOSDB' (5) is 82% complete (approximately 0 seconds remain). This is an informational message only. No user action is required.
2013-08-05 19:18:24.88 spid15s Analysis of database 'GPOSDB' (5) is 100% complete (approximately 0 seconds remain). This is an informational message only. No user action is required.
2013-08-05 19:18:24.88 spid15s Recovery of database 'GPOSDB' (5) is 0% complete (approximately 261 seconds remain). Phase 2 of 3. This is an informational message only. No user action is required.
2013-08-05 19:18:25.02 spid15s Recovery of database 'GPOSDB' (5) is 1% complete (approximately 7 seconds remain). Phase 2 of 3. This is an informational message only. No user action is required.
2013-08-05 19:18:30.50 spid15s Recovery of database 'GPOSDB' (5) is 57% complete (approximately 3 seconds remain). Phase 2 of 3. This is an informational message only. No user action is required.
2013-08-05 19:18:30.50 spid15s 214 transactions rolled forward in database 'GPOSDB' (5). This is an informational message only. No user action is required.
2013-08-05 19:18:30.61 spid15s Recovery of database 'GPOSDB' (5) is 57% complete (approximately 3 seconds remain). Phase 3 of 3. This is an informational message only. No user action is required.
2013-08-05 19:18:30.71 spid5s Recovery of database 'GPOSDB' (5) is 100% complete (approximately 0 seconds remain). Phase 3 of 3. This is an informational message only. No user action is required.
2013-08-05 19:18:30.71 spid5s 0 transactions rolled back in database 'GPOSDB' (5). This is an informational message only. No user action is required.
2013-08-05 19:18:30.71 spid5s Recovery is writing a checkpoint in database 'GPOSDB' (5). This is an informational message only. No user action is required.
2013-08-05 19:18:30.73 spid5s Recovery is complete. This is an informational message only. No user action is required.
SQLSERVER不断分析和恢复我们的业务数据库GPOSDB
我还截取了一些关键日志
2013-08-05 19:19:26.42 spid12s Analysis of database 'GPOSDB' (5) is 5% complete (approximately 7 seconds remain). This is an informational message only. No user action is required.
2013-08-05 19:19:28.58 spid12s Analysis of database 'GPOSDB' (5) is 49% complete (approximately 2 seconds remain). This is an informational message only. No user action is required.
2013-08-05 19:19:31.44 spid12s Analysis of database 'GPOSDB' (5) is 100% complete (approximately 0 seconds remain). This is an informational message only. No user action is required.
2013-08-05 19:19:31.44 spid12s Recovery of database 'GPOSDB' (5) is 0% complete (approximately 261 seconds remain). Phase 2 of 3. This is an informational message only. No user action is required.
2013-08-05 19:19:31.58 spid12s Recovery of database 'GPOSDB' (5) is 1% complete (approximately 7 seconds remain). Phase 2 of 3. This is an informational message only. No user action is required.
2013-08-05 19:19:35.60 spid12s Recovery of database 'GPOSDB' (5) is 57% complete (approximately 3 seconds remain). Phase 2 of 3. This is an informational message only. No user action is required.
2013-08-05 19:19:35.60 spid12s 214 transactions rolled forward in database 'GPOSDB' (5). This is an informational message only. No user action is required.
2013-08-05 19:19:35.87 spid12s Recovery of database 'GPOSDB' (5) is 57% complete (approximately 3 seconds remain). Phase 3 of 3. This is an informational message only. No user action is required.
2013-08-05 19:19:35.94 spid5s Recovery of database 'GPOSDB' (5) is 100% complete (approximately 0 seconds remain). Phase 3 of 3. This is an informational message only. No user action is required.
2013-08-05 19:19:35.94 spid5s 0 transactions rolled back in database 'GPOSDB' (5). This is an informational message only. No user action is required.
2013-08-05 19:19:35.94 spid5s Recovery is writing a checkpoint in database 'GPOSDB' (5). This is an informational message only. No user action is required.
2013-08-05 19:19:36.00 spid5s Recovery is complete. This is an informational message only. No user action is required.
2013-08-05 19:20:07.03 spid51 Autogrow of file 'GPOSDB_log' in database 'GPOSDB' was cancelled by user or timed out after 31000 milliseconds. Use ALTER DATABASE to set a smaller FILEGROWTH value for this file or to explicitly set a new file size.
2013-08-05 19:20:22.60 服务器 SQL Server is terminating because of a system shutdown. This is an informational message only. No user action is required. ---------------------------------------------------------------------------------
2013-08-05 19:24:20.08 登录 错误: 18456,严重性: 14,状态: 16。
2013-08-05 19:24:20.08 登录 Login failed for user 'dreamlink'. [客户端: 127.0.0.1]
2013-08-05 19:24:21.64 spid12s Analysis of database 'GPOSDB' (5) is 94% complete (approximately 5 seconds remain). This is an informational message only. No user action is required.
2013-08-05 19:24:22.03 登录 错误: 18456,严重性: 14,状态: 16。
2013-08-05 19:24:22.03 登录 Login failed for user 'dreamlink'. [客户端: 127.0.0.1]
2013-08-05 19:24:30.62 spid12s Analysis of database 'GPOSDB' (5) is 99% complete (approximately 0 seconds remain). This is an informational message only. No user action is required.
2013-08-05 19:24:31.55 spid12s Analysis of database 'GPOSDB' (5) is 100% complete (approximately 0 seconds remain). This is an informational message only. No user action is required.
2013-08-05 19:24:31.56 spid12s Recovery of database 'GPOSDB' (5) is 0% complete (approximately 261 seconds remain). Phase 2 of 3. This is an informational message only. No user action is required.
2013-08-05 19:24:32.57 spid12s Recovery of database 'GPOSDB' (5) is 1% complete (approximately 83 seconds remain). Phase 2 of 3. This is an informational message only. No user action is required.
2013-08-05 19:24:38.31 spid12s Recovery of database 'GPOSDB' (5) is 7% complete (approximately 87 seconds remain). Phase 2 of 3. This is an informational message only. No user action is required.
2013-08-05 19:24:41.96 登录 错误: 18456,严重性: 14,状态: 16。
2013-08-05 19:24:41.96 登录 Login failed for user 'dreamlink'. [客户端: 127.0.0.1]
2013-08-05 19:24:41.96 登录 错误: 18456,严重性: 14,状态: 16。
2013-08-05 19:24:41.96 登录 Login failed for user 'dreamlink'. [客户端: 127.0.0.1]
2013-08-05 19:24:45.10 spid12s Recovery of database 'GPOSDB' (5) is 12% complete (approximately 94 seconds remain). Phase 2 of 3. This is an informational message only. No user action is required.
2013-08-05 19:24:47.46 spid12s Recovery of database 'GPOSDB' (5) is 17% complete (approximately 77 seconds remain). Phase 2 of 3. This is an informational message only. No user action is required.
2013-08-05 19:24:47.87 spid12s Recovery of database 'GPOSDB' (5) is 22% complete (approximately 56 seconds remain). Phase 2 of 3. This is an informational message only. No user action is required.
2013-08-05 19:24:48.10 spid12s Recovery of database 'GPOSDB' (5) is 28% complete (approximately 40 seconds remain). Phase 2 of 3. This is an informational message only. No user action is required.
2013-08-05 19:24:48.40 spid12s Recovery of database 'GPOSDB' (5) is 36% complete (approximately 28 seconds remain). Phase 2 of 3. This is an informational message only. No user action is required.
2013-08-05 19:24:49.06 spid12s Recovery of database 'GPOSDB' (5) is 46% complete (approximately 19 seconds remain). Phase 2 of 3. This is an informational message only. No user action is required.
2013-08-05 19:24:49.68 spid12s Recovery of database 'GPOSDB' (5) is 58% complete (approximately 12 seconds remain). Phase 2 of 3. This is an informational message only. No user action is required.
2013-08-05 19:24:50.42 spid12s Recovery of database 'GPOSDB' (5) is 73% complete (approximately 6 seconds remain). Phase 2 of 3. This is an informational message only. No user action is required.
2013-08-05 19:24:54.18 spid12s Recovery of database 'GPOSDB' (5) is 86% complete (approximately 3 seconds remain). Phase 2 of 3. This is an informational message only. No user action is required.
2013-08-05 19:24:54.18 spid12s 214 transactions rolled forward in database 'GPOSDB' (5). This is an informational message only. No user action is required.
2013-08-05 19:24:54.42 spid12s Recovery of database 'GPOSDB' (5) is 86% complete (approximately 3 seconds remain). Phase 3 of 3. This is an informational message only. No user action is required.
2013-08-05 19:24:54.48 spid4s Recovery of database 'GPOSDB' (5) is 100% complete (approximately 0 seconds remain). Phase 3 of 3. This is an informational message only. No user action is required. -----------------------------------------------------------------------------
013-08-05 19:20:47.85 登录 Login failed for user 'bwsa'. [客户端: 61.147.103.137]
2013-08-05 19:20:47.90 登录 错误: 18456,严重性: 14,状态: 5。
2013-08-05 19:20:47.90 登录 Login failed for user 'bwsa'. [客户端: 61.147.103.137]
2013-08-05 19:20:47.95 登录 错误: 18456,严重性: 14,状态: 5。
2013-08-05 19:20:47.95 登录 Login failed for user 'bwsa'. [客户端: 61.147.103.137]
2013-08-05 19:20:47.78 spid51 错误: 17054,严重性: 16,状态: 1。
2013-08-05 19:20:47.78 spid51 The current event was not reported to the Windows Events log. Operating system error = 1717(接口未知。). You may need to clear the Windows Events log if it is full.
2013-08-05 19:20:47.95 登录 错误: 18456,严重性: 14,状态: 7。
关键的日志:
2013-08-05 19:20:22.60 服务器 SQL Server is terminating because of a system shutdown. This is an informational message only. No user action is required.
2013-08-05 19:20:47.78 spid51 The current event was not reported to the Windows Events log. Operating system error = 1717(接口未知。). You may need to clear the Windows Events log if it is full.
还有下面这个非常重要的日志
013-08-05 21:27:51.24 登录 错误: 18456,严重性: 14,状态: 5。
2013-08-05 21:27:51.24 登录 Login failed for user 'xxx'. [客户端: 210.56.63.37]
2013-08-05 21:33:05.25 spid53 Autogrow of file 'GPOSDB_log' in database 'GPOSDB' was cancelled by user or timed out after 30391 milliseconds. Use ALTER DATABASE to set a smaller FILEGROWTH value for this file or to explicitly set a new file size.
2013-08-05 21:41:53.20 登录 错误: 18456,严重性: 14,状态: 7。
2013-08-05 21:41:53.20 登录 Login failed for user 'sa'. [客户端: 124.31.204.74]
2013-08-05 21:41:53.34 登录 错误: 18456,严重性: 14,状态: 7。
2013-08-05 21:33:05.25 spid53 Autogrow of file 'GPOSDB_log' in database 'GPOSDB' was cancelled by user or timed out after 30391 milliseconds. Use ALTER DATABASE to set a smaller FILEGROWTH value for this file or to explicitly set a new file size.
2013-08-05 19:20:07.03 spid51 Autogrow of file 'GPOSDB_log' in database 'GPOSDB' was cancelled by user or timed out after 31000 milliseconds. Use ALTER DATABASE to set a smaller FILEGROWTH value for this file or to explicitly set a new file size.
--------------------------------华丽的分割线--------------------------------------------
方向
我认为连接超时就是跟GPOSDB_log的自动增长有关,先解决这个增长问题
看一下LDF文件的大小
由于GPOSDB这个数据库本来是运行在SQLSERVER2000上的,后来要升级到SQLSERVER2005
就用附加分离方法附加到SQL2005上,但是考虑到以后有可能将GPOSDB又运行在SQL2000上
所以没有把GPOSDB的数据库兼容级别设置为90(SQL2005),而且这个数据库已经用了3年多
所以22.5GB的事务日志文件大小不奇怪,但是数据量不多,mdf文件大小才大概26MB
因为这个数据库一直使用默认的设置,即默认的文件增长设置(按数据文件和事务日志文件大小的10%来增长)
而在《SQLSERVER企业级平台管理实践》里提到
设置数据库自动增长注意要点
要设置成按固定大小增长,而不能按比例 对于小的数据库,设置一次增长50MB到100MB,大的数据库,一次增长100MB到200MB
因为这个数据库才大概26MB的大小(mdf文件26MB),属于小型数据库,我就设置事务日志文件一次增长50MB
而数据文件大小的增长设置可以不用动
然后我就使用下面的SQL语句,截断事务日志,收缩事务日志文件,由于我不知道事务日志文件压缩多少
我就设置了收缩到10MB
--脚本
USE GPOSDB
GO
--截断日志
BACKUP LOG GPOSDB TO DISK='d:\gposdblogbackup2013-8-5.trn' with TRUNCATE_ONLY
GO --查看一下数据库信息
EXEC sp_helpdb @dbname='gposdb'
GO --收缩事务日志文件到10MB
DBCC SHRINKFILE(GPOSDB_log,10)
GO --再查看一下数据库信息
EXEC sp_helpdb @dbname='gposdb'
GO
执行完SQL语句之后,再看一下事务日志文件的大小和数据库情况
----------------------------华丽的分割线-----------------------------------
关于另外的那两个错误
我的笔记本电脑里的SQLSERVER 也出现了下面两个SQL日志信息,所以本人觉得下面两个错误问题不大
2013-08-05 00:37:12.04 spid11s The current event was not reported to the Windows Events log. Operating system error = 31(连到系统上的设备没有发挥作用。). You may need to clear the Windows Events log if it is full.
2013-08-05 19:20:47.78 spid51 The current event was not reported to the Windows Events log. Operating system error = 1717(接口未知。). You may need to clear the Windows Events log if it is full.
而下面这个SQL日志信息我估计是当时掉电造成SQLSERVER terminating
2013-08-05 19:20:22.60 服务器 SQL Server is terminating because of a system shutdown. This is an informational message only. No user action is required.
-------------------------------华丽的分割线------------------------------
这个解决办法有没有效明天就知道了
因为客户的办公室那里电压不稳定,刚好UPS又坏了,经常停电,一停电电脑又关机了
我担心这样每天这样毫无防御地关机会影响到硬盘,电脑经常突然掉电硬盘又可能损坏了而造成上面的情况
明天用HDTUNE检查一下硬盘看一下有没有坏道
由于随笔是在酒店写的,所以格式就将就一下吧O(∩_∩)O
-------------------------------------华丽的分割线-------------------------
因为下面两个错误没有错误号,由于本人资历尚浅,希望知道下面两个错误的错误原因的可以告诉我一声
2013-08-05 00:37:12.04 spid11s The current event was not reported to the Windows Events log. Operating system error = 31(连到系统上的设备没有发挥作用。). You may need to clear the Windows Events log if it is full.
2013-08-05 19:20:47.78 spid51 The current event was not reported to the Windows Events log. Operating system error = 1717(接口未知。). You may need to clear the Windows Events log if it is full.
如有不对的地方,敬请拍砖O(∩_∩)O
---------------------------------------------------------
2013-8-6补充
今天早上我到客户那里做了2个事情
1:把数据文件自动增长设置为一次自动增长50MB(虽然只有25MB大小而且数据量不像事物日志文件那样猛增,
为保险起见还是设置一下比较好)
2:使用HDTUNE检查硬盘,完整扫描了一次硬盘之后发现没有坏道
看了一下事物日志文件,大小为75MB,而且观察了到现在为止还没有发生连接超时的情况
原因:我怀疑是SQLSERVER需要格式化的硬盘空间太大,因为每次增长10%,那么事物日志文件每次需要增长22.5GB*10%=2.25GB
而且客户的电脑配置比较低,估计因为SQLSERVER格式化的时候出现问题,30秒都没有格式化好这部分空间
Autogrow of file 'GPOSDB_log' in database 'GPOSDB' was cancelled by user or timed out after 31000 milliseconds
---------------------------------------------------------
2013-8-7补充
今天再看2013-8-6和2013-8-7这两天的Windows日志和SQL ERROR LOG,没有发现弹出“连接超时”对话框和'GPOSDB_log'事务日志文件
增长失败的日志信息
还有事务日志文件现在有250MB大小
证明事务日志文件增长了,而且增长还算顺利,从中也证明了我这个方法是有效的o(∩_∩)o
2013-11-21补充:
2013-08-05 22:05:43.46 登录 错误: 18456,严重性: 14,状态: 7。
http://blogs.msdn.com/b/apgcdsd/archive/2011/09/27/kerberos-ntlm-sql-server.aspx
当你看到Login failed for user <username>时,这其实是一个授权(authorization)错误。
此时,SQL Server已经识别出了要求登录用户,但是由于SQL Server内部的安全相关的设置,登录操作没有成功。
我们常见的18456错误就属于这类错误: Error: 18456, Severity: 14, State: XX.
我们可以通过State:XX来判断到底是什么原因导致的授权失败。
但是,由于担心恶意的客户端可能通过state来猜测失败原因并采取相应手段来攻击服务器,State是不能返回客户端的。
它会被写入SQL的ERROELOG文件。
失败state对应的原因:
1 通用错误
2 远程登录的登录在服务器中不存在
3,4 解密内存中加密的密码失败
5 SQL登录不存在
6 连接的SQL登录不符合登录类型列表
7 登录功能关闭
8 密码不符合
9密码不可用(登录时正在修改密码)
10 账户策略验证失败
如果以下密码策略检查评估返回假:
(1)登录成功
(2)密码已过期
(3)用户需要更改密码
然后我们设置登录状态,并返回一个失败state10
11 windows验证没有被授权可以连接
12 SQL验证没有被授权可以连接
13 服务器暂停,禁止所有登陆
14 登录不能用于此连接的接口类型
15 连接字符串中指定的数据库无效
16个默认数据库是无效的
17默认语言为无效
18这种登录类型密码不能改变
19无法解密加密的内存中的新密码
分享今天在客户那里遇到的SQLSERVER连接超时以及我的解决办法的更多相关文章
- Data Base sqlServer sa用户登陆失败的解决办法
sqlserver sa用户登陆失败的解决办法 如下图以此模仿: 1.右键-属性 2.找到安全: 3.勾选如图: 4.sa用户密码重置: 5.服务重启:
- win10的MySQL客户端连接centos7虚拟机的mysql服务端连接不上解决办法
分别在win10和Centos虚拟机上装有MYSQL,但用电脑的mysql客户端连接centos7的服务端报错如下: 解决办法: 如果可以从虚拟机连接到电脑的MYSQL服务端, 那就是CentOS7的 ...
- sqlServer sa用户登陆失败的解决办法
sqlserver sa用户登陆失败的解决办法 如下图以此模仿: 1.右键-属性 2.找到安全: 3.勾选如图: 4.sa用户密码重置: 5.服务重启:
- SQLSERVER 创建ODBC 报错的解决办法 SQLState:'01000'的解决方案
错误详情如下: SQLState:'01000' SQL Server 错误:14 [Microsoft][ODBC SQL Server Driver][DBNETLIB] ConnectionOp ...
- sqlserver数据库标注为可疑的解决办法(转)
前几天客户那边的服务器死机了,然后客户强制关机,重新启动服务器后,系统就没法正常使用,连接不上服务器,我远程操作后,看到数据库标注为可疑,由于客户之前没备份数据库,看来只能是修复了: 1:停止数据库服 ...
- sqlserver数据库标注为可疑的解决办法
前几天客户那边的服务器死机了,然后客户强制关机,重新启动服务器后,系统就没法正常使用,连接不上服务器,我远程操作后,看到数据库标注为可疑,由于客户之前没备份数据库,看来只能是修复了: 1:停止数据库服 ...
- sqlserver 2005连接超时采用bat命令解决
将以下内容保存为 openSql.bat 双击运行即可 @echo ========= SQL Server Ports =================== @echo Enabling SQLS ...
- 在使用SQLServer时忘记sa账号密码解决办法
先以windows 身份验证方式登录SQLServer数据库,如下图所示: 打开查询分析器,运行如下代码: sp_password Null,'新密码','sa' 即可把原来的密码修改成新密码 例如: ...
- SQLServer中用户 'sa' 登录失败解决办法
今天下午,很奇怪的网站突然就打不开了,报错如下: “/”应用程序中的服务器错误. 用户 'sa' 登录失败. 说明: 执行当前 Web 请求期间,出现未处理的异常.请检查堆栈跟踪信息,以了解有关该错误 ...
随机推荐
- 一对一Socket简单聊天的实现
今天终于调试通了Socket一对一的聊天,每次发送连接请求后,将用户名发送到Socket中去,然后将用户名和新建的socket存到map中,然后根据用户名来确定接收方是谁,以实现一对一的聊天功能. 上 ...
- 02 - JavaSE之基础及面向对象(补充)
引用数据类型 java中的数据类型可以分为 基本数据类型 和 引用数据类型 两大类 int float char boolean等都是基本数据类型 类类型都是引用数据类型 引用数据类型类似C语言中的指 ...
- DNF NPK包名对照一览表
文章转载自:http://bbs.exrpg.com/thread-107917-1-1.html ┌ sprite.NPK ...
- 如何去破解所有的window和offices(超级全面)
破解所有的Windows和Offices by方阳 版权声明:本文为博主原创文章,转载请指明转载地址 http://www.cnblogs.com/fydeblog/p/7107666.html 摘 ...
- 微信emoji的code
const MAP = [ "\xc2\xa9" => 'COPYRIGHT SIGN', "\xc2\xae" => ...
- Net Core 中间件实现修改Action的接收参数及返回值
新一个WebApi项目(Net Core 2.1) 新建InputOutputAlterMiddleware类,修改命名空间为Microsoft.AspNetCore.Builder(不修改也没关系, ...
- MFC函数—CWinApp::LoadStdProfileSettings
从 InitInstance 成员函数内调用该函数,启用和加载最近使用的(MRU)文件和最后浏览状态的列表.void LoadStdProfileSettings( UINT nMaxMRU = ...
- c# 调试运行后,debug目录为空
运行模式切换到debug,debug目录才有.点运行 按钮 边上不是有 release ,点一下,换成debug
- Java基础——Servlet(二)
好久没有写博客了,最近有在学习.可能是遇到瓶颈了,学到Servlet这里觉得有些吃力.前几天已经学完一遍了,但是学完之后觉得还是很迷茫.去知乎和百度上搜索,遇到的都是一些概念之类的讲解.核心的介绍说, ...
- Java基础——iO(三)
一.管道流 演示:PipedInputStream , PipedOutputStream 注意:管道流本身就不建议在一个线程中使用,这是因为向输出流中写的数据,都会存到输入流内部的一个1024字节 ...