Showing posts with label activex. Show all posts
Showing posts with label activex. Show all posts

Wednesday, March 28, 2012

Merge Control Synchronization Problem

Hi Guys - I have been using the Merge Control ActiveX successfully for
some time. However, one client has found a problem synchronizing. Here is
the relavent piece of code:
agent.Publisher = "MyServer\InstanceName";
agent.Distributor = agent.Publisher;
agent.DistributorNetwork = TCPIP_SOCKETS;
agent.PublisherNetwork = TCPIP_SOCKETS;
agent.PublisherAddress = "192.168.1.100\InstanceName,2763";
agent.DistributorAddress =
"192.168.1.100\InstanceName,2763";
This is a Merge replication with pull anonymous subscriptions. The
Publisher and Distributor are on the same server.
I am using the PublisherAddress because I need to specify the port.
The error the client gets is the following:
[vbcol=seagreen]
If we try anything else for the publisher name such as
"192.168.1.100\InstanceName" or even the fully qualified name of the server,
it says:
[vbcol=seagreen]
valid Publisher'
Now, we checked and double-checked the settings. We can log in fine to
the publisher and subscribers. As a matter of fact, we were able to
subscribe just fine.
I tested the same scenario with my computers and it works fine for me.
What could cause it to say that The process could not connect to
Distributer?
Is the Publisher name always "ServerName\InstanceName"?
Any help will be apreciated,
Thanks,
Maer
I think you are having name resolution problems from this client. Can this
client ping the publisher/distributor by IP?
Hilary Cotter
Director of Text Mining and Database Strategy
RelevantNOISE.Com - Dedicated to mining blogs for business intelligence.
This posting is my own and doesn't necessarily represent RelevantNoise's
positions, strategies or opinions.
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"Maer" <maer@.auditleverage.com> wrote in message
news:%23EO95jlPGHA.2080@.TK2MSFTNGP09.phx.gbl...
> Hi Guys - I have been using the Merge Control ActiveX successfully for
> some time. However, one client has found a problem synchronizing. Here is
> the relavent piece of code:
> agent.Publisher = "MyServer\InstanceName";
> agent.Distributor = agent.Publisher;
> agent.DistributorNetwork = TCPIP_SOCKETS;
> agent.PublisherNetwork = TCPIP_SOCKETS;
> agent.PublisherAddress = "192.168.1.100\InstanceName,2763";
> agent.DistributorAddress =
> "192.168.1.100\InstanceName,2763";
> This is a Merge replication with pull anonymous subscriptions. The
> Publisher and Distributor are on the same server.
> I am using the PublisherAddress because I need to specify the port.
> The error the client gets is the following:
>
> If we try anything else for the publisher name such as
> "192.168.1.100\InstanceName" or even the fully qualified name of the
> server, it says:
> valid Publisher'
> Now, we checked and double-checked the settings. We can log in fine to
> the publisher and subscribers. As a matter of fact, we were able to
> subscribe just fine.
> I tested the same scenario with my computers and it works fine for me.
> What could cause it to say that The process could not connect to
> Distributer?
> Is the Publisher name always "ServerName\InstanceName"?
> Any help will be apreciated,
> Thanks,
> Maer
>
>
>
|||Yes, he has pinged the IP and it responds ok. Also, we can connect fine
to SQL Server (through our application) on the publisher/distributor using
"MyServer\InstanceName" or "IP\InstanceName".
BTW, the publisher/distributor is running on a Windows 2003 Server.
Maer
"Hilary Cotter" <hilary.cotter@.gmail.com> wrote in message
news:%23gnkoQmPGHA.2912@.tk2msftngp13.phx.gbl...
>I think you are having name resolution problems from this client. Can this
>client ping the publisher/distributor by IP?
> --
> Hilary Cotter
> Director of Text Mining and Database Strategy
> RelevantNOISE.Com - Dedicated to mining blogs for business intelligence.
> This posting is my own and doesn't necessarily represent RelevantNoise's
> positions, strategies or opinions.
> Looking for a SQL Server replication book?
> http://www.nwsu.com/0974973602.html
> Looking for a FAQ on Indexing Services/SQL FTS
> http://www.indexserverfaq.com
>
> "Maer" <maer@.auditleverage.com> wrote in message
> news:%23EO95jlPGHA.2080@.TK2MSFTNGP09.phx.gbl...
>

Friday, March 23, 2012

Merge Agent and ActiveX Parameters for Replication

Hi All,
I currently use the SQL Merge ActiveX control to perform synchronization
from my application. In SQL Enterprise Manager, you can configure the Merge
Agent Parameters (-KeepMessageAliveInterval, -QueryTimeout, etc.), but you
can also do this from the ActiveX control. My question is, which one takes
precedent? If I configure values in the Merge Agent's Parameters, then
configure different values in the ActiveX control, which are used? Does the
server take precedence? I would think the ActiveX control's parameters
would be used, but I just want to make sure.
Regards,
Brad
you can specify which profile you want to use. If you try to right click on
your agent, when it is created by an activeX control you will find that you
are unable to set these properties.
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"Brad M." <anonymous@.discussions.microsoft.com> wrote in message
news:OEZ57eopFHA.2504@.tk2msftngp13.phx.gbl...
> Hi All,
> I currently use the SQL Merge ActiveX control to perform synchronization
> from my application. In SQL Enterprise Manager, you can configure the
Merge
> Agent Parameters (-KeepMessageAliveInterval, -QueryTimeout, etc.), but you
> can also do this from the ActiveX control. My question is, which one
takes
> precedent? If I configure values in the Merge Agent's Parameters, then
> configure different values in the ActiveX control, which are used? Does
the
> server take precedence? I would think the ActiveX control's parameters
> would be used, but I just want to make sure.
> Regards,
> Brad
>

Merge ActiveX component removes subscriber records

Hi,
I am trying to synchronize data between a publisher running in SQL Server 2000 enterprise edition and a subscriber running in MSDE 2000 using DMO with Merge ActiveX component. My program is in VB.NET.
Now, everytime I try to synchronize data, the changes at subscriber don't get reflected at publisher. Here is the code segment:
objMerge.ReinitializeSubscription(true)
objMerge.Initialize()
objMerge.Run()
objMerge.Terminate()
We are using dynamic filters with SUSER_SNAME(). However, the data for specific users filtered by SUSER_SNAME works fine while getting data from publisher to the subscriber.
Thanks.
You shouldn't be reinitializing. This is one way you can guarantee you will loose your Subscriber records.
Looking for a SQL Server replication book?
If you want to upload the Subscriber changes to the Publisher before the initialization runs use the bUploadBeforeReinit property of the ReInitializeSubscription method to true.
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
|||Hi,
I didn't get your answer. It says not to use ReinitializeSubscription and again it says use ReinitializeSubscription with bUploadBeforeReinit parameter set to true.
Please explain.
Thanks.
|||Hmm.. Sorry I seem to have missed that you were using objMerge.ReinitializeSubscription(true) in your first post. I somehow was under the impression you were doing this objMerge.ReinitializeSubscription() or objMerge.ReinitializeSubscription(false)
Basically what I was trying to ask you is why are you doing a reinitialization? You normally only do this if there has been a schema/publication change.
If there is no need to do a reinitialization I would not use this statement.
If you are doing a objMerge.ReinitializeSubscription(true) then transactions that occur on the Subscriber should not be deleted unless there are some conflicts. Does conflict viewer reveal anything?
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
|||Thanks Hilary for the suggestion. You are right. There were actually conflicts as we didn't find the Identity Range tab for articles enabled and hence could not set the proper identity range. We generated the publication script, manually set the identity
range to sp_addmergearticle and then created publication by running this script - now everything worked just fine even without using ReinitializeSubscription(True).
Now the question is why the identity range tab for the artcles were not active in the first place?
sql