热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

分享今天在客户那里遇到的SQLSERVER连接超时以及我的解决办法

分享今天在客户那里遇到的SQLSERVER连接超时以及我的解决办法客户的环境:SQLSERVER2005,WINDOWS2003SP232位这次发生连接超时的时间是2013-8-521:34分在2013-8-519:25分左右也发生过一次下面的SQLERRORLOG截取的是19:18分~22:08分时间段之内的关

分享今天在客户那里遇到的SQLSERVER连接超时以及我的解决办法 客户的环境:SQLSERVER2005,WINDOWS2003 SP2 32位 这次发生连接超时的时间是2013-8-5 21:34分 在 2013-8-5 19:25分左右也发生过一次 下面的SQL ERRORLOG截取的是 19:18分~22:08分时间段之内的关

分享今天在客户那里遇到的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端口)

电脑也做了一些安全设置的

----------------------------------华丽的分割线-------------------------------

再仔细分析

由于我们的应用系统其中一个是用delphi写的,而且用ODBC来连接SQLSERVER,而且这个应用

是一打开就马上open connection,直到退出这个应用为止,不像C# 执行完毕就close()

所以如果这个应用断开与数据库的连接就会影响到客户的业务运行,当时操作系统弹出“超时对话框”的时候

点击我们的系统很慢几乎没有反应,香港虚拟主机,响应很迟钝,我重启电脑,看一下windows日志

我在客户的机器里截了一些图片

再看一下SQL ERRORLOG

下面这个是重启电脑之后,SQLSERVER启动的SQLERRORLOG

:.5000.00 (Intel X86) : Microsoft Corporation 4 Enterprise Edition on Windows NT 5.2 (Build 3790: Service Pack 2) :18:09.31 Server (c) 2005 Microsoft Corporation. :18:09.31 Server All rights reserved. :18:09.31 Server Server process ID is 2744. :18:09.33 Server Authentication mode is MIXED. :. :::17:27 (UTC). This is an informational message only; no user action is required. :18:09.33 Server Registry startup parameters: :18:09.33 Server -d C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\master.mdf :18:09.33 Server -e C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\LOG\ERRORLOG :18:09.33 Server -l C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\mastlog.ldf :18:09.36 服务器 SQL Server is starting at normal priority base (=7). This is an informational message only. No user action is required. :18:09.36 服务器 Detected 2 CPUs. This is an informational message; no user action is required. :Lock Owner blocks per node. This is an informational message only. No user action is required. :18:10.05 服务器 Attempting to initialize Microsoft Distributed Transaction Coordinator (MS DTC). This is an informational message only. No user action is required. : functionality, please start this service. :18:10.46 服务器 Database mirroring has been enabled on this instance of SQL Server. :. :(1). This is an informational message only. No user action is required. :(1). This is an informational message only. No user action is required. :(1). This is an informational message only. No user action is required. :. :18:10.92 spid5s The resource database build version is 9.00.5000. This is an informational message only. No user action is required. :. This is an informational message only. No user action is required. :. :18:11.42 spid8s Clearing tempdb database. :. :18:12.34 spid11s The Service Broker protocol transport is disabled or not configured. :18:12.34 spid11s The Database Mirroring protocol transport is disabled or not configured. :18:12.38 spid11s Service Broker manager has started. :18:12.60 服务器 A self-generated certificate was successfully loaded for encryption. :. :. :. :. :18:12.64 服务器 Dedicated admin connection support was established for listening remotely on port 1434. :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. :18:12.70 服务器 SQL Server is now ready for client connections. This is an informational message; no user action is required. :. :. :(4). This is an informational message only. No user action is required. :(4). This is an informational message only. No user action is required. :(4). This is an informational message only. No user action is required. :(complete (approximately 4 seconds remain). This is an informational message only. No user action is required. :(complete (approximately 0 seconds remain). This is an informational message only. No user action is required. :(complete (approximately 0 seconds remain). This is an informational message only. No user action is required. :(complete (approximately . This is an informational message only. No user action is required. :(complete (approximately . This is an informational message only. No user action is required. :(complete (approximately . This is an informational message only. No user action is required. :(5). This is an informational message only. No user action is required. :(complete (approximately . This is an informational message only. No user action is required. :(complete (approximately . This is an informational message only. No user action is required. :(5). This is an informational message only. No user action is required. :(5). This is an informational message only. No user action is required. :18:30.73 spid5s Recovery is complete. This is an informational message only. No user action is required. :version extended stored . This is an informational message only; no user action is required.

推荐阅读
  • 如何在服务器主机上实现文件共享的方法和工具
    本文介绍了在服务器主机上实现文件共享的方法和工具,包括Linux主机和Windows主机的文件传输方式,Web运维和FTP/SFTP客户端运维两种方式,以及使用WinSCP工具将文件上传至Linux云服务器的操作方法。此外,还介绍了在迁移过程中需要安装迁移Agent并输入目的端服务器所在华为云的AK/SK,以及主机迁移服务会收集的源端服务器信息。 ... [详细]
  • CentOS 7部署KVM虚拟化环境之一架构介绍
    本文介绍了CentOS 7部署KVM虚拟化环境的架构,详细解释了虚拟化技术的概念和原理,包括全虚拟化和半虚拟化。同时介绍了虚拟机的概念和虚拟化软件的作用。 ... [详细]
  • 本文详细介绍了SQL日志收缩的方法,包括截断日志和删除不需要的旧日志记录。通过备份日志和使用DBCC SHRINKFILE命令可以实现日志的收缩。同时,还介绍了截断日志的原理和注意事项,包括不能截断事务日志的活动部分和MinLSN的确定方法。通过本文的方法,可以有效减小逻辑日志的大小,提高数据库的性能。 ... [详细]
  • 本文介绍了Python高级网络编程及TCP/IP协议簇的OSI七层模型。首先简单介绍了七层模型的各层及其封装解封装过程。然后讨论了程序开发中涉及到的网络通信内容,主要包括TCP协议、UDP协议和IPV4协议。最后还介绍了socket编程、聊天socket实现、远程执行命令、上传文件、socketserver及其源码分析等相关内容。 ... [详细]
  • 本文介绍了在开发Android新闻App时,搭建本地服务器的步骤。通过使用XAMPP软件,可以一键式搭建起开发环境,包括Apache、MySQL、PHP、PERL。在本地服务器上新建数据库和表,并设置相应的属性。最后,给出了创建new表的SQL语句。这个教程适合初学者参考。 ... [详细]
  • 搭建Windows Server 2012 R2 IIS8.5+PHP(FastCGI)+MySQL环境的详细步骤
    本文详细介绍了搭建Windows Server 2012 R2 IIS8.5+PHP(FastCGI)+MySQL环境的步骤,包括环境说明、相关软件下载的地址以及所需的插件下载地址。 ... [详细]
  • 本文分享了一个关于在C#中使用异步代码的问题,作者在控制台中运行时代码正常工作,但在Windows窗体中却无法正常工作。作者尝试搜索局域网上的主机,但在窗体中计数器没有减少。文章提供了相关的代码和解决思路。 ... [详细]
  • 本文是一位90后程序员分享的职业发展经验,从年薪3w到30w的薪资增长过程。文章回顾了自己的青春时光,包括与朋友一起玩DOTA的回忆,并附上了一段纪念DOTA青春的视频链接。作者还提到了一些与程序员相关的名词和团队,如Pis、蛛丝马迹、B神、LGD、EHOME等。通过分享自己的经验,作者希望能够给其他程序员提供一些职业发展的思路和启示。 ... [详细]
  • 本文介绍了C#中生成随机数的三种方法,并分析了其中存在的问题。首先介绍了使用Random类生成随机数的默认方法,但在高并发情况下可能会出现重复的情况。接着通过循环生成了一系列随机数,进一步突显了这个问题。文章指出,随机数生成在任何编程语言中都是必备的功能,但Random类生成的随机数并不可靠。最后,提出了需要寻找其他可靠的随机数生成方法的建议。 ... [详细]
  • Centos7.6安装Gitlab教程及注意事项
    本文介绍了在Centos7.6系统下安装Gitlab的详细教程,并提供了一些注意事项。教程包括查看系统版本、安装必要的软件包、配置防火墙等步骤。同时,还强调了使用阿里云服务器时的特殊配置需求,以及建议至少4GB的可用RAM来运行GitLab。 ... [详细]
  • 本文介绍了在Hibernate配置lazy=false时无法加载数据的问题,通过采用OpenSessionInView模式和修改数据库服务器版本解决了该问题。详细描述了问题的出现和解决过程,包括运行环境和数据库的配置信息。 ... [详细]
  • 禁止程序接收鼠标事件的工具_VNC Viewer for Mac(远程桌面工具)免费版
    VNCViewerforMac是一款运行在Mac平台上的远程桌面工具,vncviewermac版可以帮助您使用Mac的键盘和鼠标来控制远程计算机,操作简 ... [详细]
  • 本文介绍了C#中数据集DataSet对象的使用及相关方法详解,包括DataSet对象的概述、与数据关系对象的互联、Rows集合和Columns集合的组成,以及DataSet对象常用的方法之一——Merge方法的使用。通过本文的阅读,读者可以了解到DataSet对象在C#中的重要性和使用方法。 ... [详细]
  • 图解redis的持久化存储机制RDB和AOF的原理和优缺点
    本文通过图解的方式介绍了redis的持久化存储机制RDB和AOF的原理和优缺点。RDB是将redis内存中的数据保存为快照文件,恢复速度较快但不支持拉链式快照。AOF是将操作日志保存到磁盘,实时存储数据但恢复速度较慢。文章详细分析了两种机制的优缺点,帮助读者更好地理解redis的持久化存储策略。 ... [详细]
  • 本文介绍了如何使用C#制作Java+Mysql+Tomcat环境安装程序,实现一键式安装。通过将JDK、Mysql、Tomcat三者制作成一个安装包,解决了客户在安装软件时的复杂配置和繁琐问题,便于管理软件版本和系统集成。具体步骤包括配置JDK环境变量和安装Mysql服务,其中使用了MySQL Server 5.5社区版和my.ini文件。安装方法为通过命令行将目录转到mysql的bin目录下,执行mysqld --install MySQL5命令。 ... [详细]
author-avatar
SJ曹圭贤V
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有