ComErrorException class not registered
I have set up a merge replication as follows.

Publisher and subscribers are mssql 2008 servers. It is possible to replicate via RMO from a Client Application. This works fine if there is an sqlserver 2008 installed on the client. If not we get the following exception:

Exception-Type: Microsoft.SqlServer.Replication.ComErrorException

class not registered

at Microsoft.SqlServer.Replication.MergeSynchronizationAgent..ctor()
at Microsoft.SqlServer.Replication.MergePullSubscription.get_SynchronizationAgent()

On the client we installed the sqlserver Native client tools. In detail we installed:
SQLSysClrTypes.msi
SharedManagementObjects.msi
sqlcln.msi
sql_rmo.msi
sqlncli.msi

The Sqlserver-Dlls
Microsoft.SqlServer.Replication.dll
Microsoft.SqlServer.Rmo.dll
Microsoft.SqlServer.ConnectionInfo.dll
which are explicitly references in our source code are in the same directory as the .EXE-File

Any help greatly appreciated
Thanks Rolf


November 30th, 2009 7:15pm

Hello,

Please, could you have a look on this thread ?
http://social.msdn.microsoft.com/Forums/en-US/sqlsmoanddmo/thread/75ca5e75-313a-42d7-b0cf-4fa5e49e6886/

It is possible that you will be able to use the same solution than in this thread.

If it is not working or the problem different, don't hesitate to post again ( i have sometimes difficulties with my poor english )

Have a nice day
Free Windows Admin Tool Kit Click here and download it now
November 30th, 2009 9:18pm

Hello,

I came across this article before. Unfortunately it does not help. When registering one of the DLLs I get the error message. DLL not found. Obviously it is not the DLL itself but one of its dependencies.
In the article above the author is talking about some missing DLLs in the COM-Directory C:\program data\Microsoft SQL Server\100\COM. On my Clients the whole COM-Directory is missing. So I probably have to install another msi-package before. But I do not know which one?


December 1st, 2009 12:14pm

Hi !

I have the same error

class not registered

   at Microsoft.SqlServer.Replication.MergeSynchronizationAgent..ctor()
   at Microsoft.SqlServer.Replication.MergePullSubscription.get_SynchronizationAgent()

But setup is a bit different .. I have written a program to replicate using SMO v100 via,  VS 2008 SQL Database Edition. and I have SQL 2008.

It works fine in dev.

Our on site client machines have SQL 2005 sp3 installed ... initially nothing worked but after much reading of this forum I discovered that I had to install (on site)

SQLSysClrTypes.msi
SharedManagementObjects.msi
sqlcln.msi
sql_rmo.msi
sqlncli.msi

as well as the dlls that Detected Dependencies for the installer installs. 

The app now ran and Users happily Published a DB & Created a Subscription BUT when they try to use

MergePullSubscription.SynchronizationAgent  via the code

var agent = sub.SynchronizationAgent;

We get the "class not registered" crash ... which is not at all helpful as an error message ...

I've tried the registering of

  • SqlMergeX.dll
  • SqlDistX.dll

That existed in the SQL 2005 COM folder (v 2005.90.4035.0) ... still crashes ...

Anyone else had this ?  Does any one have an answer ?

Free Windows Admin Tool Kit Click here and download it now
January 20th, 2010 8:35pm

I realize this is an old post.

this msconnect may help others with the same issue.

Microsoft.SqlServer.Replication.ComErrorException (0x80040154): Class not registered
   at Microsoft.SqlServer.Replication.MergeSynchronizationAgent..ctor()
   at Microsoft.SqlServer.Replication.MergePullSubscription.get_SynchronizationAgent()

Inconvenient workarounds for RMO application on 64bit Windows 7 with 32bit SQL 2008 Express

https://connect.microsoft.com/SQLServer/feedback/details/687343/inconvenient-workarounds-for-rmo-application-on-64bit-windows-7-with-32bit-sql-2008-express

February 6th, 2015 5:02pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics