SQL Server Agent 启动后自动停止,ODBC驱动丢失

环境:
2台sql Server 2012 Always ON服务

现象:
Always ON服务正常,同步正常,应用正常。

Second Server Server Agent 启动数秒后就自动停止。

处理过程:
1、查看Windows 系统日志,显示如下信息:

SQL Server Agent 启动后自动停止,ODBC驱动丢失

SQL Server Agent 启动后自动停止,ODBC驱动丢失

2、在sql Studio 中查看当前Error Log

Date,Source,Severity,Message
09/25/2018 13:54:07,,information,[098] sqlServerAgent terminated (normally)
09/25/2018 13:54:07,,Error,[382] logon to server 'domain\sqlInstance' Failed (disableAgentXPs)
09/25/2018 13:54:07,,Error,[165] ODBC Error: 0<c/> Data source name not found and no default driver specified [sqlSTATE IM002]
09/25/2018 13:54:07,,Error,[165] ODBC Error: 0<c/> Data source name not found and no default driver specified [sqlSTATE IM002]
09/25/2018 13:54:07,,Error,[165] ODBC Error: 0<c/> Data source name not found and no default driver specified [sqlSTATE IM002]
09/25/2018 13:54:07,,Error,[165] ODBC Error: 0<c/> Data source name not found and no default driver specified [sqlSTATE IM002]
09/25/2018 13:54:07,,Error,[165] ODBC Error: 0<c/> Data source name not found and no default driver specified [sqlSTATE IM002]
09/25/2018 13:54:07,,Error,[000] Unable to connect to server 'domain\sqlInstance'; sqlServerAgent cannot start
09/25/2018 13:54:07,,Error,[150] sql Server does not accept the connection (error: 0). Waiting for sql Server to allow connections. Operation attempted was: Verify Connection On Start.
09/25/2018 13:53:37,,Error,[150] sql Server does not accept the connection (error: 0). Waiting for sql Server to allow connections. Operation attempted was: Verify Connection On Start.
09/25/2018 13:53:07,,Error,[150] sql Server does not accept the connection (error: 0). Waiting for sql Server to allow connections. Operation attempted was: Verify Connection On Start.
09/25/2018 13:52:37,,Error,[150] sql Server does not accept the connection (error: 0). Waiting for sql Server to allow connections. Operation attempted was: Verify Connection On Start.
09/25/2018 13:52:07,,Error,[150] sql Server does not accept the connection (error: 0). Waiting for sql Server to allow connections. Operation attempted was: Verify Connection On Start.
09/25/2018 13:52:07,,information,[495] The sql Server Agent startup service account is domain\dbadmin.
09/25/2018 13:52:07,,information,[100] Microsoft sqlServerAgent version 11.0.3000.0 (X64 unicode retail build) : Process ID 1008

3、结合以上错误,似乎都指向ODBC,打开ODBC,发现ODBC 64bit 中Driver为空

SQL Server Agent 启动后自动停止,ODBC驱动丢失

正常是应该有sql Server和 sql Native Client 11这两个驱动的。

4、在sql Server 2012 安装包中找到sqlncli.msi 重新安装sql Native Client 11(注意选择重装,而不是修复)。

5、再次在ODBC中查看,sql Native Client 11已经有了。

6、重启sql Agent ,观察几分钟后没有再出现自动停止的现象,问题解决

后面有看到一篇介绍ODBC驱动丢失的文章:http://www.cnblogs.com/chinalantian/archive/2016/06/13/5581644.html 

了解到可能是卸载某些软件的时候会把ODBC中的部分驱动也删除,咨询客户表示近期有删除一些软件。

特此记录! 

相关文章

这篇文章主要介绍“hive和mysql的区别是什么”,在日常操作中...
这篇“MySQL数据库如何改名”文章的知识点大部分人都不太理解...
这篇文章主要介绍“mysql版本查询命令是什么”的相关知识,小...
本篇内容介绍了“mysql怎么修改字段的内容”的有关知识,在实...
这篇文章主要讲解了“mysql怎么删除unique约束”,文中的讲解...
今天小编给大家分享一下mysql怎么查询不为空的字段的相关知识...