-- the tables are found in the distributers "distribution" database. and the
"Hilary Cotter" wrote:
> answers line.
>
> --
> RelevantNoise.com - dedicated to mining blogs for business intelligence.
>
> 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 > "Anders" <Anders@discussions.microsoft.com> wrote in message
> news:7C0550FC-C60E-46F2-B263-21492E085555@microsoft.com...
> >I do have a problem in executing parts of the script generated by the
> >"script
> > generator" on a replication job.
> > I have a merge replication "pull subscription", and a job that replicate.
> > This works perfectly
> > However, I do want to make the script that creates the job, and the script
> > can be generated by the agent (so my endusers that DEFINITELY have NO
> > knowledge of MSSQL serves al all, just need to click on a button, and my
> > application should then do all the job for him).
> > In this script, the subscriber, distributor and publisher is - hard coded.
> > I do want to exchange these serves with parameters in a stored procedure
> > (so
> > the servernames can be imported as parameters). In the command
> > "msdb.dbo.sp_addJobstep", the command cannot be set as
> > "-Publisher='+@MyPublishername+' .... (@MyPublishername is nvarchar(3201)
> > Despite the syntact for concatenation of strings is String1+String2....
> > Why?
>
> SQL Server autogenerates the job names, what you put in is overridden.
>
>
> > By stepwise concatenation of all the substrings, containing the
> > parameters,
> > it is accepted, but the job fails, since the "SubscriberEncryptedPassword"
> > now is replaced with '?????????????????????". I cannot execute the job
> > (only
> > if I replace the generated SubscriberEncryptedPassword with the native
> > one -
> > and hardcoded, it works. (apparently, this encrypted password is in
> > non-printable characters)
> > How can I get hold of this "SubscriberEncryptedPassword" parameter
> >
> have you tried to grab it from the agent tables?
>
> declare @password nvarchar(1048)
>
> select @password=subscriber_password from MSdistribution_agents where
> @name=DistributionAgentname
>
> select @password=subscriber_password from MSmerge_agents where
> @name=MergeAgentname
>
>
> > Anders
> >
>
>