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

Tuesday, March 27, 2012

AUTO DROP OF SUBSCRIPTION

Hi,
I have merge replicated, remote server & local server.
The database has only one table. It was working fine.
More than 15 days, it was isolated without any transaction.
After some days (around 15 days) I found that the subscription is dropped.
What is the reason for this?
Is there any way to avoid this?
Thanks,
Soura.
Soura,
the Expired Subscription Cleanup agent has deleted the subscription.
Disabling this agent won't help, because you need to forcably prevent the
subscription from expiring. If it is transactional, make sure that the
subscription expiration period is sufficiently long eg 3 weeks, and history
retention period also the same length of time. If it was transactional, the
same would apply to the transaction retention period.
Rgds,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)
|||I was under the impression that transactional replication needs to be
re-established after 72 hours and that this is the limit as it can not be
changed past this value. Are you primarily discussing the removal of the
subscription or the expiration of the subscription ?
It has been a long held understanding with the DBA's at my organisation that
72 Hours was the maximum time before expiration of a subscription to
transactional replication required a rebuild of the subscritpion .
"Paul Ibison" wrote:

> Soura,
> the Expired Subscription Cleanup agent has deleted the subscription.
> Disabling this agent won't help, because you need to forcably prevent the
> subscription from expiring. If it is transactional, make sure that the
> subscription expiration period is sufficiently long eg 3 weeks, and history
> retention period also the same length of time. If it was transactional, the
> same would apply to the transaction retention period.
> Rgds,
> Paul Ibison SQL Server MVP, www.replicationanswers.com
> (recommended sql server 2000 replication book:
> http://www.nwsu.com/0974973602p.html)
>
>
|||Perhaps the quantity of information in your company makes this a practivcal
limit for the size of the distribution database, but there is no such
hardcoded limit in SQL Server - it is entirely configurable.
Rgds,
Paul Ibison

Sunday, March 25, 2012

Authentication with MSSQL 2005 Mobile Merge Replication

Hi,
I'm using MSSQL 2005 Mobile subscriber to partitioned publication (with
merge replication). In my case the partition is security-related, so it's
important to ensure that different subscribers will get only their own data.
Since I can't use SUSER_NAME(), and since HOST_NAME() can be overriden, what
are the options to authenticate the user properly?
Thanks,
Vladimir K.
You can use suser_name, it maps to publisherlogin, I also don't quite
understand what you mean by host_name can be overridden - it can be
overridden by the hostname parameter in your merge replication class
(SQLCeReplication) to define whatever you want, which could be the account
name you wish to filter by.
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
"Vladimir Kofman" <vladimir.kofman@.gmail.com> wrote in message
news:u9lqmIRSHHA.4832@.TK2MSFTNGP04.phx.gbl...
> Hi,
> I'm using MSSQL 2005 Mobile subscriber to partitioned publication (with
> merge replication). In my case the partition is security-related, so it's
> important to ensure that different subscribers will get only their own
> data. Since I can't use SUSER_NAME(), and since HOST_NAME() can be
> overriden, what are the options to authenticate the user properly?
> Thanks,
> Vladimir K.
>
|||In SQL Mobile suser_name doesn't work for me... And the problem with
host_name is exactly as you stated: anyone can define anything, so it seems
I don't have an option to define partitions based on some security setting:
let's say I have two partitions A and B, and have two users a and b
appropriately. How do I prevent from user a to synchronize with partition B?
(and from user b with A?)
"Hilary Cotter" <hilary.cotter@.gmail.com> wrote in message
news:uMU67pSSHHA.2212@.TK2MSFTNGP02.phx.gbl...
> You can use suser_name, it maps to publisherlogin, I also don't quite
> understand what you mean by host_name can be overridden - it can be
> overridden by the hostname parameter in your merge replication class
> (SQLCeReplication) to define whatever you want, which could be the account
> name you wish to filter by.
> --
> 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
>
> "Vladimir Kofman" <vladimir.kofman@.gmail.com> wrote in message
> news:u9lqmIRSHHA.4832@.TK2MSFTNGP04.phx.gbl...
>
|||how about using certificates mapped to nt accounts. This way they will have
to know the password of the account you are going to pull with. The
communication will be encrypted and you can filter on suser_name which maps
to the publisherlogin.
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
"Vladimir Kofman" <vladimir.kofman@.gmail.com> wrote in message
news:endEvgVSHHA.1228@.TK2MSFTNGP06.phx.gbl...
> In SQL Mobile suser_name doesn't work for me... And the problem with
> host_name is exactly as you stated: anyone can define anything, so it
> seems I don't have an option to define partitions based on some security
> setting: let's say I have two partitions A and B, and have two users a and
> b appropriately. How do I prevent from user a to synchronize with
> partition B? (and from user b with A?)
> "Hilary Cotter" <hilary.cotter@.gmail.com> wrote in message
> news:uMU67pSSHHA.2212@.TK2MSFTNGP02.phx.gbl...
>
|||Thanks for your replies
But can you elaborate a bit more on the option you've suggested?
Thanks again.
"Hilary Cotter" <hilary.cotter@.gmail.com> wrote in message
news:eLdVCrVSHHA.2212@.TK2MSFTNGP02.phx.gbl...
> how about using certificates mapped to nt accounts. This way they will
> have to know the password of the account you are going to pull with. The
> communication will be encrypted and you can filter on suser_name which
> maps to the publisherlogin.
> --
> 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
>
> "Vladimir Kofman" <vladimir.kofman@.gmail.com> wrote in message
> news:endEvgVSHHA.1228@.TK2MSFTNGP06.phx.gbl...
>
|||You have to configure the web serve to accept client certificates. This was
supported in SQL CE 2.0, it appears to be supported in Web Synchronization
as well, but it is not clear from the documentation that it is.
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
"Vladimir Kofman" <vladimir.kofman@.gmail.com> wrote in message
news:OL9wDOWSHHA.3948@.TK2MSFTNGP05.phx.gbl...
> Thanks for your replies
> But can you elaborate a bit more on the option you've suggested?
> Thanks again.
> "Hilary Cotter" <hilary.cotter@.gmail.com> wrote in message
> news:eLdVCrVSHHA.2212@.TK2MSFTNGP02.phx.gbl...
>
sql

Tuesday, March 20, 2012

authentication error after adding an article

Hi

-- edited 26/02 to clarify the security model --

Using HTTPS merge replication


The subscriber was able to get the snapshot ok, then synchronise fine

However after adding an article to the publication and recreating the snapshot I get this error now at the subscriber

Microsoft.SqlServer.Replication.ComErrorException (0x80004005): A failure occurred when accessing 'usp_misc_dailyTasks_3.sch' due to an operating system error [2='The system cannot find the file specified.'] during Web synchronization. Ensure that the -InternetLogin user when using basic authentication and the user running the merge when using Windows integrated authentication has been granted access to the snapshot share.

at Microsoft.SqlServer.Replication.MergeSynchronizationAgent.Run()

The key properties when synchronising are as follows:
agent.PublisherSecurityMode = SecurityMode.Standard
agent.DistributorSecurityMode = SecurityMode.Standard
agent.InternetSecurityMode = SecurityMode.Standard


In order to create the subscription:

subscription.UseWebSynchronization = True
subscription.InternetUrl = webSyncUrl
subscription.InternetSecurityMode = AuthenticationMethod.BasicAuthentication
subscription.SubscriberType = MergeSubscriberType.Anonymous
subscription.SyncType = SubscriptionSyncType.Automatic

Thanks
Bruce

is it possible that the merge agent was running the same time as the snapshot agent, and that the merge agent was trying to apply a file that was just deleted, but not-yet-created by the snapshot agent?sql