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

Wednesday, March 28, 2012

intermittent failures using web synchronisation

HI

We are using HTTPS anonymous merge subscriptions....

Sometimes when trying to synchonise, we will get the following error messages returned to the subscriber....

The upload message to be sent to Publisher '**thewebserver**' is being generated
The merge process is using Exchange ID '0F65CFCB-AF17-47DC-8D98-493A44C243E0' for this web synchronization session.
The Merge Agent could not connect to the URL 'https://**thewebserver**/client/replisapi.dll' during Web synchronization. Please verify that the URL, Internet login credentials and proxy server settings are correct and that the Web server is reachable.
The Merge Agent could not connect to the URL 'https://**thewebserver**/client/replisapi.dll' during Web synchronization. Please verify that the URL, Internet login credentials and proxy server settings are correct and that the Web server is reachable.
The Merge Agent received the following error status and message from the Internet Information Services (IIS) server during Web synchronization: [401 :'Unauthorized']. When troubleshooting, ensure that the Web synchronization settings for the subscription are correct, and increase the internet timeout setting at the Subscriber and the connection timeout at the Web server.

If I then go to a web brower, put in the HTTPS address, it brings up the logon dialog - I put in the admin username and password to confirm the connection and that's fine.

We try and synchronise again, and this time it works - it's as though I have 'woken' it up again and it's happy to play.

Is increasing the timeouts as suggested by the error message the way to go ? If so, where does one set the 'internet timeout setting at the subscriber', and the 'connection timeout at the webserver' ?

thanks

I dont think it is the timeout that is causing this. But anyways,

To increase the timeout on the Client (Merge Agent) use the Merge agent parameter: -InternetTimeout

To increase the timeout on the webserver, use IIS-->WebSites-->DefaultWebSite-->Properties-->ConnectionTimeout

From what you describe, it appears to me that the -InternetLogin may not have permissions to load the replisapi.dll once the process goes away? Would that be the case? This is just a hunch.

Under what context is the IIS running? (specifically the w3wp.exe process)

Is your InternetLogin and the login running the IIS (w3wp) the same?

You could also try other ways so that you can specify the w3wp.exe to never exit out after 20 minutes (I think that is the default one)

|||I had this happen just yesterday in my test environment. I added a new subscriber laptop to the mix and I kept on getting this error. It turns out that I had to visit the replisapi.dll via Internet Explorer and install the SSL certificate. (I am using Self SSL on the test environment) Once I installed the cert the error went away.sql

intermittent failures using web synchronisation

HI

We are using HTTPS anonymous merge subscriptions....

Sometimes when trying to synchonise, we will get the following error messages returned to the subscriber....

The upload message to be sent to Publisher '**thewebserver**' is being generated
The merge process is using Exchange ID '0F65CFCB-AF17-47DC-8D98-493A44C243E0' for this web synchronization session.
The Merge Agent could not connect to the URL 'https://**thewebserver**/client/replisapi.dll' during Web synchronization. Please verify that the URL, Internet login credentials and proxy server settings are correct and that the Web server is reachable.
The Merge Agent could not connect to the URL 'https://**thewebserver**/client/replisapi.dll' during Web synchronization. Please verify that the URL, Internet login credentials and proxy server settings are correct and that the Web server is reachable.
The Merge Agent received the following error status and message from the Internet Information Services (IIS) server during Web synchronization: [401 :'Unauthorized']. When troubleshooting, ensure that the Web synchronization settings for the subscription are correct, and increase the internet timeout setting at the Subscriber and the connection timeout at the Web server.

If I then go to a web brower, put in the HTTPS address, it brings up the logon dialog - I put in the admin username and password to confirm the connection and that's fine.

We try and synchronise again, and this time it works - it's as though I have 'woken' it up again and it's happy to play.

Is increasing the timeouts as suggested by the error message the way to go ? If so, where does one set the 'internet timeout setting at the subscriber', and the 'connection timeout at the webserver' ?

thanks

I dont think it is the timeout that is causing this. But anyways,

To increase the timeout on the Client (Merge Agent) use the Merge agent parameter: -InternetTimeout

To increase the timeout on the webserver, use IIS-->WebSites-->DefaultWebSite-->Properties-->ConnectionTimeout

From what you describe, it appears to me that the -InternetLogin may not have permissions to load the replisapi.dll once the process goes away? Would that be the case? This is just a hunch.

Under what context is the IIS running? (specifically the w3wp.exe process)

Is your InternetLogin and the login running the IIS (w3wp) the same?

You could also try other ways so that you can specify the w3wp.exe to never exit out after 20 minutes (I think that is the default one)

|||I had this happen just yesterday in my test environment. I added a new subscriber laptop to the mix and I kept on getting this error. It turns out that I had to visit the replisapi.dll via Internet Explorer and install the SSL certificate. (I am using Self SSL on the test environment) Once I installed the cert the error went away.

Monday, March 12, 2012

Interactions between subset and join filters

I'm running into problems with a merge publication where I am trying to use
both subset (dynamic) filters and join filters. I was hoping that the join
filters operated on the slice of data carved out by the subset filters, but
that doesn't appear to be happening. Instead, the union of the results of
the subset filter on the entire database and the dynamic filter on the
entire database is what is synchronized.
For example, assume I have the following three tables with the listed
columns:
- User (Id, Name)
- Entry (Id, Date, UserId, SignatureId)
- Signature (Id, Date, Data)
The goals of the filters are as follows:
- Only retrieve the entry rows that are less than 30 days old.
- Only retrieve the signature rows that are less than 30 days old.
- Only retrieve the entry rows for that particular user.
I setup subset filters for the following tables:
Entry: ... WHERE Date > (GETDATE() - 30)
Signature: ... WHERE Date > (GETDATE() - 30)
I also setup a join filter to only get a particular user's Entries:
... INNER JOIN [dbo].[Entry] ON Entry.UserId = User.Id and
User.Name = HOST_NAME()
(Assume I pass in the User's name as the HOST_NAME.)
When I synchronize with SQL CE, I find that I do indeed get only the Entry
rows associated with that user, but I get ALL of that user's Entry rows,
regardless of the Date.
In addition, I only get Signatures that are less than 30 days old. The
problem is the old Entry rows point to Signature rows that do not exist as
they were filtered out, and I receive an error stating that "The row update
or insert cannot be reapplied due to an integrity violation" (Error 28549)
My question boils down to this:
In what order and on what subsets of data do filters get applied?
More specifically, how can I set up filters with this schema to avoid the
integrity violation problem?
Thanks for your time.
- Eli
Hi Eli,
i think you should read my post "Push referenced records" since we're facing
a similar problem. The solution for us was to eliminate the foreign key
constraints (all of them), because you can not ensure the order of
insertation when the snapshot arrives to the subscriber. In addition we tried
to extend the foreign key definitions with the "NOT FOR REPLICATION" option -
because we didn't want to drop the constraints - but this option is not
supported in CE. ... we also had to eliminate the triggers - fortunately "NOT
FOR REPLICATION" is supported for triggers.
When creating the replication you have to specify the function that is
filtering the records per subscribers (e.g. SUSER_SNAME(), HOST_NAME()). I
think you should put the "User.Name = HOST_NAME()" clause to the rowfilter.
Filtering by date is still a problem to solve. We have the same situation...
regards
pierre
|||Thanks for the reply, Pierre.
I solved the problem by eliminating the subset filters on tables that
already have join filters, and moved the filtering logic into the join
filter. For example, I added the last line to my join filter:
... INNER JOIN [dbo].[Entry] ON Entry.UserId = User.Id and
User.Name = HOST_NAME()
AND Entry.Dt > (GETDATE() - 30)
Thanks again,
- Eli
"Pierre Packard" <Pierre Packard@.discussions.microsoft.com> wrote in message
news:4A13E8A8-B3F0-415B-9560-2C20AB78B6F6@.microsoft.com...
> Hi Eli,
> i think you should read my post "Push referenced records" since we're
facing
> a similar problem. The solution for us was to eliminate the foreign key
> constraints (all of them), because you can not ensure the order of
> insertation when the snapshot arrives to the subscriber. In addition we
tried
> to extend the foreign key definitions with the "NOT FOR REPLICATION"
option -
> because we didn't want to drop the constraints - but this option is not
> supported in CE. ... we also had to eliminate the triggers - fortunately
"NOT
> FOR REPLICATION" is supported for triggers.
> When creating the replication you have to specify the function that is
> filtering the records per subscribers (e.g. SUSER_SNAME(), HOST_NAME()). I
> think you should put the "User.Name = HOST_NAME()" clause to the
rowfilter.
> Filtering by date is still a problem to solve. We have the same
situation...
> regards
> pierre
>

Sunday, February 19, 2012

Integrating MSDE 2000 with VB Applications

Hi,
I have VB 6.0 application using MSDE 2000.
I created setup file using Package & Deployment Wizard.
I have included "SQL Server Desktop Engine Merge Modules" and
"sqlredis.exe".
However, when I try to test it on another computer, I get following error.
DBNETLIB[ConnectionOpen(Connect()).] SQL Server does not exists or access is
denied.
clicking OK comes up with
Runtime error -2147467259 (80004005)
Automation Error
Unspecified error.
What am I missing?
Any Idea? Let me know if further info needed.
Shailesh
hi Shailesh,
Shailesh Patel wrote:
> Hi,
> I have VB 6.0 application using MSDE 2000.
> I created setup file using Package & Deployment Wizard.
> I have included "SQL Server Desktop Engine Merge Modules" and
> "sqlredis.exe".
> However, when I try to test it on another computer, I get following
> error. DBNETLIB[ConnectionOpen(Connect()).] SQL Server does not
> exists or access is denied.
> clicking OK comes up with
> Runtime error -2147467259 (80004005)
> Automation Error
> Unspecified error.
> What am I missing?
> Any Idea? Let me know if further info needed.
> Shailesh
please have a look at
http://support.microsoft.com/default...06&Product=sql
if helps
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.biz/DbaMgr.shtmhttp://italy.mvps.org
DbaMgr2k ver 0.10.0 - DbaMgr ver 0.56.0
(my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
interface)
-- remove DMO to reply