SQL Server 2019 snapshot agent error

互联网 2022/8/7 19:02:20

1、日志错误提示 Microsoft OLE DB Driver for SQL Server: Unable to load msoledbsqlr.rll due to either missing file or version mismatch. The application cannot continue. 2、原因分析 This appears to be a common issue. The advice you received about instal…

1、日志错误提示

Microsoft OLE DB Driver for SQL Server: Unable to load msoledbsqlr.rll due to either missing file or version mismatch. The application cannot continue.

2、原因分析

This appears to be a common issue.

The advice you received about installing the latest OLE drivers is correct. However, even with the latest drivers installed the snapshot agent will still use the older version drivers that come with SQL Server 2019.

This has to do with the Path variable in your environment. Have a look at System Properties, Advanced System Settings, Environment Variables, System variables, Path.

Unless you have changed your defaults you will find %SystemRoot%\system32, %SystemRoot% at the top and C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn\  further down.

What you will not find is a path reference to %SystemRoot%\SysWOW64\ and %SystemRoot%\SysWOW64\1033 which is where the latest OLE drivers get installed on 64 bit systems. The driver files are msoledbsql.dll and msoledbsqlr.rll

So, when the snapshot agent starts it will use the OLE driver files installed relative to its binary somewhere under the C:\Program Files\Microsoft SQL Server\ branch as it cannot find any others in the Path.

When you insert %SystemRoot%\SysWOW64\ and %SystemRoot%\SysWOW64\1033 into your system Path variable (make sure this is above any references to C:\Program Files\Microsoft SQL Server\...) and the restart your SQL Server instance you should find that your problem goes away.

3、解决方案

1>在环境变量中添加%SystemRoot%\SysWOW64\ 和%SystemRoot%\SysWOW64\1033两个变量,并且在sql server的所有变量之前。

2>重启电脑或者sql server服务。

 

 

 

转载自:https://social.msdn.microsoft.com/Forums/en-US/e2c23cda-9e78-4514-bae6-27c6d34767a4/sql-server-2019-snapshot-agent-error?forum=sqlreplication

随时随地学软件编程-关注百度小程序和微信小程序
关于找一找教程网

本站文章仅代表作者观点,不代表本站立场,所有文章非营利性免费分享。
本站提供了软件编程、网站开发技术、服务器运维、人工智能等等IT技术文章,希望广大程序员努力学习,让我们用科技改变世界。
[SQL Server 2019 snapshot agent error]http://www.zyiz.net/tech/detail-340378.html

赞(0)
关注微信小程序
程序员编程王-随时随地学编程

扫描二维码或查找【程序员编程王】

可以随时随地学编程啦!

技术文章导航 更多>