Showing posts with label merge. Show all posts
Showing posts with label merge. Show all posts

Tuesday, March 20, 2012

Can't access merge agent properties

Hi,
I'm having a problem trying to access merge agent's properties. I have
a SqlServer publication that synchronizes with diferent PDA devices.
These devices register themselfes as subscribers to synchronize with
the database and create a merge agent for each of them.
The problem is that I can't access the agent's properties. If I go to
Replication Monitor -> Agents -> Merge Agents in sql server's
administrative console, right click one of the agent (e.g subscription
name 21F:-460) and then select "Agent Properties..." i get a login
screen "Connect to Sql Server: 21F" and asks for user & password.
What is this account ? I can't understand how this works, could
somebody explain it please ? Is it possible to access merge agent
properties ?
Any help would be appreciated,
thx in advance.
ori
That's the problem with the ActiveX controls used by replication, you can't view the properties in EM.
I normally don't get this error message however when I right click on the agents.
To administer these activeX agents you need to make changes in your code, not through EM.
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
"ORi" wrote:

> Hi,
> I'm having a problem trying to access merge agent's properties. I have
> a SqlServer publication that synchronizes with diferent PDA devices.
> These devices register themselfes as subscribers to synchronize with
> the database and create a merge agent for each of them.
> The problem is that I can't access the agent's properties. If I go to
> Replication Monitor -> Agents -> Merge Agents in sql server's
> administrative console, right click one of the agent (e.g subscription
> name 21F:-460) and then select "Agent Properties..." i get a login
> screen "Connect to Sql Server: 21F" and asks for user & password.
> What is this account ? I can't understand how this works, could
> somebody explain it please ? Is it possible to access merge agent
> properties ?
> Any help would be appreciated,
> thx in advance.
> ori
>

Can't access merge agent properties

I'm trying to set the logging level on a merge agent. I've read
KB312292. When I right click on the agent and select properties some
text flashes in the status bar but no dialog is displayed. I'm using
SQL 2K SP4.
TIA
Is this for pulls configure through ActiveX scripts/programming? or WSM
pulls?
You can't do it for these.
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
"Darren" <darren@.nospam.com> wrote in message
news:eiaIuotFGHA.3120@.TK2MSFTNGP10.phx.gbl...
> I'm trying to set the logging level on a merge agent. I've read KB312292.
> When I right click on the agent and select properties some text flashes in
> the status bar but no dialog is displayed. I'm using SQL 2K SP4.
> TIA
|||Hilary Cotter wrote:
> Is this for pulls configure through ActiveX scripts/programming? or WSM
> pulls?
> You can't do it for these.
>
It was created from a C# app using the merge object. So how can I
change the logging level for that agent without using what is described
in the KB article?
|||use the status event to get messages. You will probably have to configure
the agent to use the verbose profile to see these messages. I would restart
on failure to use the new profile; running with the verbose profile does not
perform well.
Let me know if you need code for this.
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
"Darren" <Darren@.nospam.nospam> wrote in message
news:elcSkBvFGHA.3200@.tk2msftngp13.phx.gbl...
> Hilary Cotter wrote:
> It was created from a C# app using the merge object. So how can I change
> the logging level for that agent without using what is described in the KB
> article?
|||Thanks.
I don't this the status event callback provides enough detail.
I'm trying to get the equivalent of the following options
-output c:\log.txt -outverboselevel 3
I don't see either in the merge profile options.
Hilary Cotter wrote:
> use the status event to get messages. You will probably have to configure
> the agent to use the verbose profile to see these messages. I would restart
> on failure to use the new profile; running with the verbose profile does not
> perform well.
> Let me know if you need code for this.
>

Wednesday, March 7, 2012

Cannot sync when Auto Identity Ranges Enabled?

I have been pulling my hair out with this for some time now:
I have a small db which I need to merge replicate with a number of PocketPC
devices. NT Authentication is used.
If I do not enable the automatic identity range option, the PocketPC clients
can connect without error. However, if I enable this (which I need to), the
PocketPC user gets a host of errors:
1. (Code 80004005) A call to SQL Server Reconciler failed.
2. (Code 80045007) The merge process could not retrieve article information
for publication 'Survey'
3. (Code 0) {call sp_MShelpmergearticles(?,8000000,?)}
4. (Code 4833) Could not connect to server 'SERVER1' because 'SQLAdmin' is
not defined as a remote login at the server.
SQLAdmin is our Service startup account. It is a member of the Administrator
group.
The user account being used to connect is a standard domain user account.
If I add the user to the Administrators group the process succeeds
everytime. I have checked permissions on the SQLCE folder, and snapshot
folders and AFAIK they are correct (i.e. the user has write permission).
It looks like a permission problem, but I dont know where. It seems the only
solution to this is to add the user to the Administrators group (totally
unacceptable!).
Any suggestions because I am at a complete loss?
Cheers,
James Goodman
Did you re-run your merge agent? I've had no problem using a domain user
account, particularly if set up for anonymous subscribers. Also, you should
be getting a 280xx error number back from the errors collection in the .Net
code. The MSDN site has a list that precisely defines what each of those
errors mean.
"James Goodman" <jamesATnorton-associates.co.ukREMOVE> wrote in message
news:ufn1ZWObFHA.1404@.TK2MSFTNGP09.phx.gbl...
>I have been pulling my hair out with this for some time now:
> I have a small db which I need to merge replicate with a number of
> PocketPC devices. NT Authentication is used.
> If I do not enable the automatic identity range option, the PocketPC
> clients can connect without error. However, if I enable this (which I need
> to), the PocketPC user gets a host of errors:
> 1. (Code 80004005) A call to SQL Server Reconciler failed.
> 2. (Code 80045007) The merge process could not retrieve article
> information for publication 'Survey'
> 3. (Code 0) {call sp_MShelpmergearticles(?,8000000,?)}
> 4. (Code 4833) Could not connect to server 'SERVER1' because 'SQLAdmin' is
> not defined as a remote login at the server.
> SQLAdmin is our Service startup account. It is a member of the
> Administrator group.
> The user account being used to connect is a standard domain user account.
>
> If I add the user to the Administrators group the process succeeds
> everytime. I have checked permissions on the SQLCE folder, and snapshot
> folders and AFAIK they are correct (i.e. the user has write permission).
> It looks like a permission problem, but I dont know where. It seems the
> only solution to this is to add the user to the Administrators group
> (totally unacceptable!).
>
> Any suggestions because I am at a complete loss?
> --
> Cheers,
> James Goodman
>

Sunday, February 19, 2012

Cannot set the ProfileName on a merge agent

Hi,

I am trying to create a new merge subscription using RMO on Sql 2005, but I want the new agent to use a non-default profile.

I can set the ProfileName on the agent but it seems to have no affect. I was wondering, do I have the wrong Profile name?

This is the code I'm using

subscription = new MergeSubscription();

subscription.ConnectionContext = conn;

subscription.SubscriberName = server;

subscription.SubscriberSecurity.SqlStandardLogin = sqlUserName;

subscription.SubscriberSecurity.SqlStandardPassword = sqlPassword;

subscription.SubscriberSecurity.WindowsAuthentication = useWindowsAuth;

subscription.PublicationName = publication.Name;

subscription.DatabaseName = publication.DatabaseName;

subscription.SubscriptionDBName = database;

subscription.SyncType = SubscriptionSyncType.Automatic;

subscription.SubscriberType = MergeSubscriberType.Global;

subscription.Priority = 75;

subscription.UseInteractiveResolver = false;

if(hostNameOverride != null && hostNameOverride.Length > 0)

subscription.HostName = hostNameOverride;

subscription.SynchronizationAgentProcessSecurity.Login = agentUserName;

subscription.SynchronizationAgentProcessSecurity.Password = agentPassword;

// Create the push subscription.

subscription.Create();

if (subscription.SynchronizationAgent != null)

subscription.SynchronizationAgent.ProfileName = "High Volume Server-to-Server Profile";

Can anyone tell me what I've done wrong?

Regards

Graham

Agent has a corresponding profile, which has existed and you can not change its name. As for your case, you may try to create a new non-default profile and give it with the name you set. Also set the new profile as your merge agent profile.

Hope it will help.

THanks

Yunjing

|||

Thanks Yungjing,

are you saying that is it not possible to create a subscription and the subscription use one of the pre-defined agent profiles?

I can change the profile of an existing agent using the UI of the replication monitor, so I would have thought it should be possible using RMO!!

Regards

Graham

|||

No, this is not what I mean.

But I understand your issue this time. Originally, I thought you tried to change profile name through calling subscription.SynchronizationAgent.ProfileName = "High Volume Server-to-Server Profile".

To change agent with another pre-defined agent profile, you should use

RMO class: AgentProfile

Method: public void AssignToAgent(string distributionDBName, int agentID)

It will call SP sp_update_agent_profile as UI does.

Hope it will help this time. :-)

-Yunjing

|||

Thats just the answer I was looking for, thanks Yunjing.

However, I have one small problem. Where do I find the agentID as an integer from?

My code has just created a new subscription. The only reference to an agent Job ID I can find is one the MergeSubscription class, but this is a string, and it won't convert to an integer.

Thank you once again.

Graham

|||

Here are some sample code, you may refer to get help for your conversion case.

............

DataTable dt = ds.Tables[0];
if (dt != null)
{
foreach (DataRow dr in dt.Rows)
{
// Column 0 is always the Dist DB
string distDB = (string)dr[0];
int agentID = (int)dr[nColAgentID];
agentProfile.AssignToAgent(distDB, agentID);
}

............................

Thanks

Yunjing