温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

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

发布时间:2020-08-01 22:37:15 来源:网络 阅读:1724 作者:emcome 栏目:关系型数据库

环境:
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中的部分驱动也删除,咨询客户表示近期有删除一些软件。

特此记录! 


向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI