Hi guys - I have been able to successfully create pull merge
subscriptions in SQLDMO. Now I am trying to do anonymous subscriptions and I
am having a little difficulty.
I made sure to allow anonymous subscriptions at the publication. I
created an object of type MergePullSubscription2 and called it "sub" and set
the properties as follows:
sub.SubscriptionType = .SQLDMOSubscription_Anonymous;
sub.SubscriberType = .SQLDMOMergeSubscriber_Anonymous;
(and set all the other properties appropriately) and then added it to
the MergePullSubscriptions collection.
All of that works fine. But then I try to enable it at the publisher by
using the method EnableMergeSubscription (I make sure to use the constant
SQLDMOMergeSubscriber_Anonymous for the SubscriberType argument) and that
gives me the following error:
"[Microsoft][ODBC SQL Server Driver][SQL Server]The remote server is not
defined as a subscription server."
(this is strange because I can create other subscriptions that are not
anonymous)
Is this step (EnableMergeSubscription ) necessary? It seems to be
because if I try to sync, it fails.
It seems like anonymous subs should be pretty straightforward, but I
must be missing something fundamental.
Any help will be much appreciated.
Maer
Hello,
I suggest that you refer to the information on the following web site:
MergePullSubscription Object
http://msdn.microsoft.com/library/de...us/sqldmo/dmor
ef_ob_m_0egk.asp
To create a merge anonymous subscription at the Subscriber:
1.Create a new MergePullSubscription object.
2.Set the Publisher property to the name of an existing Publisher.
3.Set the PublicationDB property to the name of the database (at the
Publisher) where the publication is located.
4.Set the Publication property to the name of the publication to which to
subscribe.
5.Set the SubscriberType property to SQLDMOMergeSubscriber_Anonymous.
6.Set the SecurityMode property of the DistributorSecurity object property
as appropriate.
7.If the SecurityMode property of the DistributorSecurity object property
is set to SQLDMOReplSecurity_Normal, set the StandardLogin and
StandardPassword properties of the DistributorSecurity object property.
8.Set the SecurityMode property of the PublisherSecurity object property
as appropriate.
9.If the SecurityMode property of the PublisherSecurity object property is
set to SQLDMOReplSecurity_Normal, set the StandardLogin and
StandardPassword properties of the PublisherSecurity object property.
10.Note that the Name property defaults to
publisher:publication_database:publication.
11.Add the MergePullSubscription object to the MergePullSubscriptions
collection of a connected ReplicationDatabase object at the Subscriber.
I hope the information is helpful.
Sophie Guo
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
================================================== ===
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
================================================== ===
This posting is provided "AS IS" with no warranties, and confers no rights.
Wednesday, March 7, 2012
Anonymous Subscriptions using SQLDMO
Labels:
create,
database,
guys,
iam,
mergesubscriptions,
microsoft,
mysql,
oracle,
pull,
server,
sql,
sqldmo,
subscriptions,
successfully
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment