Tuesday, March 20, 2012
Creating subscription using script generated by Enterprise Manager
I am attempting to automate the creation of an anonymous pull subscription.
I have created the subscription on one machine, and then generated a script
using Enterprise Manager to create the subscription.
When I run the subscription script, the subscription is created correctly.
However, when I run the job created to do the merge, it always fails because
the process running on the subscriber could not connect to the distributor
because of a login failure.
In the generated script, I have seen that there is an option for
SubscriberEncryptedPassword. I have generated the script in Unicode mode,
and then looking at the script in WordPad shows some non-ASCII characters as
the contents of that password. I'm assuming that the problem has to do with
this password.
I am using SQL Server authentication. Does anyone know what the problem is,
or where I should look to find the answer? I haven't been successful in any
of my searches.
Thanks for any help,
Ryan
do not use this parameter. SQL will encrypt the password you specify in the
@.distributor_password and @.publisher_password (if you specify this)
parameters.
Hilary Cotter
Looking for a book on SQL Server replication?
http://www.nwsu.com/0974973602.html
"Ryan McFall" <mcfall@.hope.edu> wrote in message
news:%23bCSNfdhEHA.644@.tk2msftngp13.phx.gbl...
> I have a hopefully easy question that I cannot find the answer to
anywhere.
> I am attempting to automate the creation of an anonymous pull
subscription.
> I have created the subscription on one machine, and then generated a
script
> using Enterprise Manager to create the subscription.
> When I run the subscription script, the subscription is created correctly.
> However, when I run the job created to do the merge, it always fails
because
> the process running on the subscriber could not connect to the distributor
> because of a login failure.
> In the generated script, I have seen that there is an option for
> SubscriberEncryptedPassword. I have generated the script in Unicode mode,
> and then looking at the script in WordPad shows some non-ASCII characters
as
> the contents of that password. I'm assuming that the problem has to do
with
> this password.
> I am using SQL Server authentication. Does anyone know what the problem
is,
> or where I should look to find the answer? I haven't been successful in
any
> of my searches.
> Thanks for any help,
> Ryan
>
|||Thanks for the tip. I'm afraid it didn't work, however.
First I edited out the @.subscriberEncryptedPassword parameter completely.
The generated script had specified @.distributor_password=N'' (and the same
for the publisher). I first tried leaving those as they were and ran the
script without the @.subscriberEncryptedPassword parameter. When that didn't
work, I entered in the password for the SQL server account specified by the
@.distributor_login parameter.
In the first case, where the passwords weren't set, I got an error that the
agent was unable to connect to the subscriber. When I entered the
appropriate password for the distributor and publisher and ran the script,
the merge agent fails with "unable to connect to distributor, invalid
password for user annotations (the SQL server account used on the publisher,
distributor and subscriber).
Maybe I'm misunderstanding what you're suggesting?
Ryan
"Hilary Cotter" <hilaryk@.att.net> wrote in message
news:egjqd5ghEHA.4064@.TK2MSFTNGP12.phx.gbl...
> do not use this parameter. SQL will encrypt the password you specify in
the[vbcol=seagreen]
> @.distributor_password and @.publisher_password (if you specify this)
> parameters.
> --
> Hilary Cotter
> Looking for a book on SQL Server replication?
> http://www.nwsu.com/0974973602.html
>
> "Ryan McFall" <mcfall@.hope.edu> wrote in message
> news:%23bCSNfdhEHA.644@.tk2msftngp13.phx.gbl...
> anywhere.
> subscription.
> script
correctly.[vbcol=seagreen]
> because
distributor[vbcol=seagreen]
mode,[vbcol=seagreen]
characters
> as
> with
> is,
> any
>
Thursday, March 8, 2012
Creating Pull Subscription using T-SQL
Hello,
i am trying to create a pull subscription to my publication using T-SQL. The pull subcription is created successfully but the problem is that data is not merged correctly. I mean when i run the agent ( despite of having data in subscription / publication ) the data is not merged and i get "No Data Needed To Be Merged" message.
i run following sp in this sequence:
At Subscrber:
1 - sp_addmergepullsubscription
2 - sp_addmergepullsubscription_agent
At Publisher:
1 - sp_addmergesubscription
Again at subscriber :
Transaction for adding merge agent job.
Regards,
You must have subsetfiltering enabled, are you using hostname() or suser_sname()? It's common error where the agent is connecting with some value that doesn't match any of the rows. So check what value agent is connecting with, and check what rows have the matching filter value.|||Dear Gregg,i have not enabled anything. it is a simple replication without Filtering.|||OK, just to be clear, you've generated the snapshot and applied it to the subscriber, correct? Now you've made more changes (at publisher or subscriber), like inserts, updates or deletes, run merge agent, but merge agent says no changes need to be sync'd, correct?|||Yes, Exactly.
I applied snapshot, and then after make some changes but it says "No Data Needed to be Merged".|||what version and build of sql server are you using?|||
i am using MSDE 2000 With SP4.
Microsoft SQL Server 2000 - 8.00.2039 (Intel X86)
May 3 2005 23:18:38
Copyright (c) 1988-2003 Microsoft Corporation
Desktop Engine on Windows NT 5.1 (Build 2600: Service Pack 2)
If you're positive you have no filtering, and you're positive you're making changes to the correct tables, then it's not clear to me what the problem is without looking at your machine/subscription/publication.
Only suggestion I can offer is to try and create a new publication and/or new subscription, but using the UI Wizards as opposed to TSQL scripts. I know MSDE doesn't come with Enterprise Manager, but if you find a machine with it installed, you can connect to the necessary machines to do so.
|||Greg,
i have tried this with EM and it works fine but my requirement is that i need to create script for same operation so that it be included in my setup program and be deployed. EM works fine but it does not fulfill my requirements which is a script file to be run at time of setup.
Looking forward to your kind reply.
Regards,
|||If it works fine via EM, then after you create the subscription via the wizard, script out the subscription and compare it to what you originally had.|||i did the same. the script that i am running is based on script generated from Wizard. the question is that why is it not running with OSQL utility ?!Regards,|||I'm not sure what you're asking, but the wizard will generate TSQL statements that you can execute any way you want - via osql, isqlw, vb app, etc. Just make sure to execute the statements at the proper machine, and in the proper database.|||
Dear Greg,
I am doing same as what you are suggesting. That Script is so clear with proper guidance. i just run that on proper machine and Database but the only proper is that Merge Agent does not behave properly. The rest is fine.
Regards,
|||How are you invoking the merge agent?|||Greg,Althougt i have made a schedule for merge agent to be run after creating Test Enviroppment i run it by right clicking on Merge Agent and START SYNCHRONZIE. but in both cases it does not work properly.
Regards,