Exception when starting Snapshot Agent when setting up database replication I am trying to set up replication between databases. I followed these tutorials:


Tutorial: Prepare SQL Server for replication (publisher, distributor, subscriber)


and after:


Tutorial: Configure replication between two fully connected servers (transactional)


I went through first without any problems. Almost completed the second, but I got stuck on step View the status of snapshot generation

When I try to start the Snapshot Agent, I get an error:


  Exception Message: An unspecified error had occurred in the native SQL Server connection component.


I tried to search on the internet MSSQL_REPL55012 (that's error code I get), but didn't succeed.

I tried to look in SQL Profiler, Jobs history, Replication Monitor, even ran failing job step from PowerShell, but couldn't get any more info on that.

What might be the issue? Anybody else stumbled upon that?

I am using:


SSMS version 15.0.18206.0
SQL Server engine 15.0.2000.5


Also, I run two instances of SQL Server and have two Management Studios installed, if that's relevant.
I finally got it resolved. The issue was missing OLE DB driver.
I just downloaded latest driver. Then I got msoledbsqlr.rll driver in directory C:\Windows\SysWOW64\1033. Then I copied to C:\Program Files\Microsoft SQL Server\150\COM directory, so it can be found by snapshot.exe, which is executable run by Snapshot Agent.
Alternatvely, one can define environmental variable to point to C:\Windows\SysWOW64\1033 direcotry, so it will be found there.
Another issue might be that 64-bit SQL tries to use 32-bit drivers (msoledbsql.dll, msoledbsqlr.rll), but it wasn't issue in my case.