Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Developing RMO application on 64 bit machine, deploying to 32 bit machines


Developing RMO application on 64 bit machine, deploying to 32 bit machines

Author
Message
Charles-126316
Charles-126316
Forum Newbie
Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)

Group: General Forum Members
Points: 4 Visits: 45
I maintain our company's sales force automation package, which supports over 100 salespeople nationwide. This application uses SQL RMO to sync the client data up to our server once the rep triggers a sync process at the end of their business day. The field units use 32 bit laptops running XP, and use SQL Express 2005 for their database platform.


Recently, our development machines here at corporate were replaced with 64 bit machines running Windows 7. Since then, I have been unable to run this project in Visual Studio. The issues comes when the program hits the first reference to MergeSynchronationAgent, where I get the following:


Message: "Class not registered"

StackTrace: " at Microsoft.SqlServer.Replication.MergeSynchronizationAgent..ctor()\r at Microsoft.SqlServer.Replication.MergePullSubscription.get_SynchronizationAgent()\r at ReplicationAgent.MergeAgent.ProcessReplication() in D:\\Projects\\{ProjectName}\\ReplicationAgent\\ReplicationAgent.cs:line 77"


I have tried to install the 32 bit version of SQL Express on my (now 64 bit) development machine, but the installer will not allow this. When I install the 64 bit version I get the above error during debug.

My understanding was that the only difference between the 32 and 64 bit versions of SQL Express were the presence of additional files in the 64 bit version that would allow it to run on a 64 bit OS. That being the case, I'm not sure what I'm missing here. I've verified the assemblies exist in the SDK folder, and have installed the following as described in other posts:

Microsoft Core XML Services (MSXML) 6.0
Microsoft SQL Server 2005 Management Objects Collection
Microsoft SQL Server Native Client

This sounds like it should be a fairly common issue, but I've had the toughest time finding a definitive solution. Any help would be appreciated. I cannot push changes to the field to accomodate a fix for my development machine, but surely there must be a way to develop and run this application on a 64 bit machine, while still targeting a 32 bit user environment.

Thanks!
Jack Corbett
  Jack Corbett
SSChampion
SSChampion (11K reputation)SSChampion (11K reputation)SSChampion (11K reputation)SSChampion (11K reputation)SSChampion (11K reputation)SSChampion (11K reputation)SSChampion (11K reputation)SSChampion (11K reputation)

Group: General Forum Members
Points: 11034 Visits: 14858
Have you considered doing your development using Windows XP Mode? Not the solution that you are looking for, but it could help you move forward for now.



Jack Corbett

Applications Developer

Don't let the good be the enemy of the best. -- Paul Fleming
At best you can say that one job may be more secure than another, but total job security is an illusion. -- Rod at work

Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
How to Post Performance Problems
Crosstabs and Pivots or How to turn rows into columns Part 1
Crosstabs and Pivots or How to turn rows into columns Part 2
danagonistes 62905
danagonistes 62905
Forum Newbie
Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)

Group: General Forum Members
Points: 1 Visits: 6
Did you ever find a solution to this issue? We're running into the same scenario.
Thanks
Charles-126316
Charles-126316
Forum Newbie
Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)

Group: General Forum Members
Points: 4 Visits: 45
No the best answer I got was to use XP mode... I am wrapping up a company-wide deployment that I've been on for a few months now, so hopefully I'll be able to devote more time to this in the next few weeks.

Charles
Gift Peddie
Gift Peddie
Hall of Fame
Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)

Group: General Forum Members
Points: 3464 Visits: 14456
Charles-126316 (11/16/2010)
No the best answer I got was to use XP mode... I am wrapping up a company-wide deployment that I've been on for a few months now, so hopefully I'll be able to devote more time to this in the next few weeks.

Charles


You don't need XP mode you only need a paid version of VS2005/8/10 so you can build the RMO(replication management object) code AnyCPU instead of x64 which will not run in x86 which is 32bits. AnyCPU will run in both boxes also look for the x86 programs file folder in Windows 7.

Kind regards,
Gift Peddie
kryo
kryo
Forum Newbie
Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)

Group: General Forum Members
Points: 1 Visits: 4
I was running into the same problem. My old system was XP 32-bit, and new system is Windows7 64-bit. Both using SQL Express 05. I managed to fix it by going into Configuration Manager and creating a new x86 platform with the copy settings set to <Empty>. If you already have an x86 option, try deleting and re-creating.

We are also working on 64-bit software the throws a ""SynchronizationAgent" can only be used if the object presents an existing object in the server". I think it is also a 64/32-bit issue. None of the current solutions out there I've found seem to work for me.
EdVassie
EdVassie
Hall of Fame
Hall of Fame (3.2K reputation)Hall of Fame (3.2K reputation)Hall of Fame (3.2K reputation)Hall of Fame (3.2K reputation)Hall of Fame (3.2K reputation)Hall of Fame (3.2K reputation)Hall of Fame (3.2K reputation)Hall of Fame (3.2K reputation)

Group: General Forum Members
Points: 3152 Visits: 3819
If you are deploying to 32-bit then build and test on 32-bit.

If you build on 64-bit then test on 32-bit before you deploy.

If you build and test on 64-bit then expect the unexpected problems when you deploy to 32-bit. And expect you will not be able to troubleshoot these problems on a 64-bit OS.

There are just too many differences in the software stack between a 32-bit and 64-bit OS to expect that a build and test on 64-bit will work as expected when deployed to 32-bit. The same applies if you build and test on 32-bit and deploy on 64-bit. At least, that is what we have found where I work.

Original author: SQL Server FineBuild 1-click install and best practice configuration of SQL Server 2017 2016, 2014, 2012, 2008 R2, 2008 and 2005. 1 Dec 2016: now over 39,000 downloads.
Disclaimer: All information provided is a personal opinion that may not match reality.
Quote: "When I give food to the poor they call me a saint. When I ask why they are poor they call me a communist." - Archbishop Hélder Câmara
gadatarecovery
gadatarecovery
Forum Newbie
Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)

Group: General Forum Members
Points: 1 Visits: 1
I just wanted to update this thread with a solution that worked for me. I had a requirement to develop a replication client that would work with 2008 R2 and 2005 Full and Express editions (basically SQL 9.0 and higher).

I encountered the cryptic "Class not registered" exception for the MergeSynchronizationAgent early on and had the same problem some others have had where my dev environment is 64 bit and my deployment environments are mixed 32 and 64. The first fix to that was to choose Any Platform as the build type. That allowed me to get past the error when using 2008 R2 Full and Express editions. However, clients using SQL 2005 still got the same exception.

To fix that scenario I had to do the following:
Install the following 2008 R2 Redistributables from Microsoft:
SharedManagementObjects.msi
SqlCmdLnUtils.msi
sqlncli.msi
SQLSysClrTypes.msi

Not included, but required to use RMO was:
sql_rmo.msi

This will allow you get as far as creating a subscription successfully at the client, however, you will still encounter the "Class not registered" exception when you attempt to do anything with your MergeSynchronizationAgent.

To overcome that, I had to copy the entire contents of the COM folder from a healthy SQL 2008 Express installation to the failing 2005 client environment and register the following dlls manually using regsvr32:
cd "C:\Program Files\Microsoft SQL Server\100\COM"
regsvr32 AXSCPHST.DLL
regsvr32 mergetxt.dll
regsvr32 msgprox.dll
regsvr32 REPLAGNT.dll
regsvr32 REPLDP.dll
regsvr32 replerrx.dll
regsvr32 replisapi.dll
regsvr32 replprov.dll
regsvr32 replrec.dll
regsvr32 replsub.dll
regsvr32 sqldistx.dll
regsvr32 sqlmergx.dll
regsvr32 ssradd.dll
regsvr32 ssravg.dll
regsvr32 ssrdown.dll
regsvr32 ssrmax.dll
regsvr32 ssrmin.dll
regsvr32 ssrpub.dll
regsvr32 ssrup.dll
regsvr32 xmlsub.dll

At this point you should be able to subscribe and sync at your leisure using a 2005 host in 32 bit environments.

This cost me some time and frustration while researching, but I've learned much from it.
Hopefully this helps someone else...
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search