Group:  Microsoft Access ยป microsoft.public.access.replication
Thread: Synchronising two Access-Databases

DotNetBag
.NET Development Newsgroups

HTVi
TV Discussion Newsgroups

Our Hot Pick: Rising Antivirus 2006 - Certified by TUV & Checkmark! Get 10% discount by entering this coupon code: ONDISCOUNT10
Rising Antivirus 2006

Synchronising two Access-Databases
Michael Maes 13.09.2006 19:27:01
Hello,

We develop dotNet applications.
We normally use SQL Server as datastore, but now we have a small project on
an existing Access Database.
Our issue is that there are two copies of the db, one on a lan and one on a
webserver (on the other side of the world).
Our customer want's to have those two (identical) database synchronised
bi-directional daily.
How can this be done in access (I know, a verry 'broad' question).
The process has to be automated (we'll implement it in a Windows Service).

Thanks for any tips!

Michael
Re: Synchronising two Access-Databases
"David W. Fenton" <XXXusenet[ at ]dfenton.com.invalid> 14.09.2006 01:05:28
Michael Maes <michael.maes[ at ]community.nospam> wrote in
news:F54F70A5-91C8-40A5-96DD-4E423C1EB33A[ at ]microsoft.com:

[Quoted Text]
> We develop dotNet applications.
> We normally use SQL Server as datastore, but now we have a small
> project on an existing Access Database.
> Our issue is that there are two copies of the db, one on a lan and
> one on a webserver (on the other side of the world).
> Our customer want's to have those two (identical) database
> synchronised bi-directional daily.
> How can this be done in access (I know, a verry 'broad' question).

Jet Replication White Papers:
=============================

* Jet 4: http://support.microsoft.com/?id=190766

PDF Versions:
http://dfenton.com/DFA/Replication/Files/WhitePaper4_0_Replication.pd
f (152KB)
http://dfenton.com/DFA/Replication/Files/WhitePaper4_0_InternetRepl
ication.pdf (678KB)

* Jet 3.x: http://support.microsoft.com/kb/164553

PDF Version:
http://dfenton.com/DFA/Replication/Files/WhitePaper3_x_Replication.pd
f (238KB)

It's probably helpful to read both if you are using Jet 3.x, as the
Jet 4 version includes a lot of information based on the experience
gained using Jet 3.x that was not available when the 3.x version
article was written. However, keep in mind that any information
about Jet 4 conflicts and replication errors will not apply to 3.x.
If you're using Jet 3.x, it's probably a good idea to read Michael
Kaplan's review of the differences between Jet 4 and Jet 3.x
Replication at the link below
(http://www.mvps.org/access/general/gen0033.htm).

Jet Replication FAQs:
=====================

* Jet 4: http://support.microsoft.com/?id=282977

PDF version:
http://dfenton.com/DFA/Replication/Files/FAQ4_0_JetReplication.pdf
(320KB)

* Jet 3.x: http://support.microsoft.com/kb/182886

PDF version:
http://dfenton.com/DFA/Replication/Files/FAQ3_x_JetReplication.pdf
(235KB) Note these two things:

1. It's probably helpful to read both if you are using Jet 3.x, as
the Jet 4 version includes a lot of information based on the
experience gained using Jet 3.x that was not available when the 3.x
version article was written. However, keep in mind that any
information about Jet 4 conflicts and replication errors will not
apply to 3.x. If you're using Jet 3.x, it's probably a good idea to
read Michael Kaplan's review of the differences between Jet 4 and
Jet 3.x Replication at the link below
(http://www.mvps.org/access/general/gen0033.htm).

2. If you're using Firefox, you may need to view these articles in
IE, as in Firefox 1.5, the bottom of the article is hidden behind
the footer of the page.

Michael Kaplan on Jet 4 Replication vs. Jet 3.x:
================================================

http://www.mvps.org/access/general/gen0033.htm

Explains many of the improvements made to Jet 4.
Michael Kaplan's old site, Trigeminal.com: http://trigeminal.com/
This site has a number of articles and utilities that are essential
to understanding and using Jet Replication.

The newsgroup microsoft.public.access.replication:
news://microsoft.public.access.replication
==================================================

The premier location for discussion of replication issues. The
Google Groups archives of this newsgroup are indispensable in
solving replication problems as over the years, all the problems
anyone can encounter have been brought up there and solutions
provided form Michael Kaplan and other experienced users of Jet
Replication.

> The process has to be automated (we'll implement it in a Windows
> Service).

No, you won't. Jet is not thread-safe, so there are no tools
available for implementing it as a service.

--
David W. Fenton http://www.dfenton.com/
usenet at dfenton dot com http://www.dfenton.com/DFA/
Re: Synchronising two Access-Databases
petery[ at ]online.microsoft.com (Peter Yang [MSFT]) 14.09.2006 06:39:36
Hello Michael,

You may want to concider using replication manager included in Office
deveoper edition 2000/xp other than builing your own program/services to do
this job for you. Replication Manager includes features that let you
schedule and execute unattended synchronizations without programming.
Additionally, it lets you use indirect synchronization and Internet
synchronization, and provides tools for examining the synchronization
history for a replica. One of the components of Replication Manager is the
Synchronizer. This component performs the unattended synchronizations that
you set up with Replication Manager.

Or you could use JRO directly to syncrhronize replicas. Replication is
actually a *JET* technology, not an Access one and you could use

258539 MOD2000: The Syntax for Synchronization Using Microsoft Jet and
http://support.microsoft.com/?id=258539

If you want to develope in .net, you have to use COM interop to call JRO:

Exposing COM Components to the .NET Framework
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/htm
l/cpconexposingcomcomponentstonetframework.asp

306287 How to compact a Microsoft Access database by using Visual Basic .NET
http://support.microsoft.com/default.aspx?scid=kb;EN-US;306287

More related information:

Internet Synchronization with the Microsoft Jet Database Engine: A
Technical Overview
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnacc2k/htm
l/intrjet4.asp

190766 Jet 4.0 replication white papers available in MSDN Online Library
http://support.microsoft.com/default.aspx?scid=kb;EN-US;190766

If anything is unclear or you have further questions, please feel free to
let's know. I look forward to your reply.
Best Regards,

Peter Yang
MCSE2000/2003, MCSA, MCDBA
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications
<http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx>.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
<http://msdn.microsoft.com/subscriptions/support/default.aspx>.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

Re: Synchronising two Access-Databases
Michael Maes 14.09.2006 12:36:01
Many thanks David!

Kind regards,

Michael

"David W. Fenton" wrote:

[Quoted Text]
> Michael Maes <michael.maes[ at ]community.nospam> wrote in
> news:F54F70A5-91C8-40A5-96DD-4E423C1EB33A[ at ]microsoft.com:
>
> > We develop dotNet applications.
> > We normally use SQL Server as datastore, but now we have a small
> > project on an existing Access Database.
> > Our issue is that there are two copies of the db, one on a lan and
> > one on a webserver (on the other side of the world).
> > Our customer want's to have those two (identical) database
> > synchronised bi-directional daily.
> > How can this be done in access (I know, a verry 'broad' question).
>
> Jet Replication White Papers:
> =============================
>
> * Jet 4: http://support.microsoft.com/?id=190766
>
> PDF Versions:
> http://dfenton.com/DFA/Replication/Files/WhitePaper4_0_Replication.pd
> f (152KB)
> http://dfenton.com/DFA/Replication/Files/WhitePaper4_0_InternetRepl
> ication.pdf (678KB)
>
> * Jet 3.x: http://support.microsoft.com/kb/164553
>
> PDF Version:
> http://dfenton.com/DFA/Replication/Files/WhitePaper3_x_Replication.pd
> f (238KB)
>
> It's probably helpful to read both if you are using Jet 3.x, as the
> Jet 4 version includes a lot of information based on the experience
> gained using Jet 3.x that was not available when the 3.x version
> article was written. However, keep in mind that any information
> about Jet 4 conflicts and replication errors will not apply to 3.x.
> If you're using Jet 3.x, it's probably a good idea to read Michael
> Kaplan's review of the differences between Jet 4 and Jet 3.x
> Replication at the link below
> (http://www.mvps.org/access/general/gen0033.htm).
>
> Jet Replication FAQs:
> =====================
>
> * Jet 4: http://support.microsoft.com/?id=282977
>
> PDF version:
> http://dfenton.com/DFA/Replication/Files/FAQ4_0_JetReplication.pdf
> (320KB)
>
> * Jet 3.x: http://support.microsoft.com/kb/182886
>
> PDF version:
> http://dfenton.com/DFA/Replication/Files/FAQ3_x_JetReplication.pdf
> (235KB) Note these two things:
>
> 1. It's probably helpful to read both if you are using Jet 3.x, as
> the Jet 4 version includes a lot of information based on the
> experience gained using Jet 3.x that was not available when the 3.x
> version article was written. However, keep in mind that any
> information about Jet 4 conflicts and replication errors will not
> apply to 3.x. If you're using Jet 3.x, it's probably a good idea to
> read Michael Kaplan's review of the differences between Jet 4 and
> Jet 3.x Replication at the link below
> (http://www.mvps.org/access/general/gen0033.htm).
>
> 2. If you're using Firefox, you may need to view these articles in
> IE, as in Firefox 1.5, the bottom of the article is hidden behind
> the footer of the page.
>
> Michael Kaplan on Jet 4 Replication vs. Jet 3.x:
> ================================================
>
> http://www.mvps.org/access/general/gen0033.htm
>
> Explains many of the improvements made to Jet 4.
> Michael Kaplan's old site, Trigeminal.com: http://trigeminal.com/
> This site has a number of articles and utilities that are essential
> to understanding and using Jet Replication.
>
> The newsgroup microsoft.public.access.replication:
> news://microsoft.public.access.replication
> ==================================================
>
> The premier location for discussion of replication issues. The
> Google Groups archives of this newsgroup are indispensable in
> solving replication problems as over the years, all the problems
> anyone can encounter have been brought up there and solutions
> provided form Michael Kaplan and other experienced users of Jet
> Replication.
>
> > The process has to be automated (we'll implement it in a Windows
> > Service).
>
> No, you won't. Jet is not thread-safe, so there are no tools
> available for implementing it as a service.
>
> --
> David W. Fenton http://www.dfenton.com/
> usenet at dfenton dot com http://www.dfenton.com/DFA/
>
Re: Synchronising two Access-Databases
Michael Maes 19.09.2006 10:19:02
Hi Peter,

Thanks for your additional info.
I'll try this out asap.
I have been ill lately, so I couldn't try it and now I have to catch up my
work first.

Keep you posted!

Regards,


Michael

"Peter Yang [MSFT]" wrote:

[Quoted Text]
> Hello Michael,
>
> You may want to concider using replication manager included in Office
> deveoper edition 2000/xp other than builing your own program/services to do
> this job for you. Replication Manager includes features that let you
> schedule and execute unattended synchronizations without programming.
> Additionally, it lets you use indirect synchronization and Internet
> synchronization, and provides tools for examining the synchronization
> history for a replica. One of the components of Replication Manager is the
> Synchronizer. This component performs the unattended synchronizations that
> you set up with Replication Manager.
>
> Or you could use JRO directly to syncrhronize replicas. Replication is
> actually a *JET* technology, not an Access one and you could use
>
> 258539 MOD2000: The Syntax for Synchronization Using Microsoft Jet and
> http://support.microsoft.com/?id=258539
>
> If you want to develope in .net, you have to use COM interop to call JRO:
>
> Exposing COM Components to the .NET Framework
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/htm
> l/cpconexposingcomcomponentstonetframework.asp
>
> 306287 How to compact a Microsoft Access database by using Visual Basic .NET
> http://support.microsoft.com/default.aspx?scid=kb;EN-US;306287
>
> More related information:
>
> Internet Synchronization with the Microsoft Jet Database Engine: A
> Technical Overview
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnacc2k/htm
> l/intrjet4.asp
>
> 190766 Jet 4.0 replication white papers available in MSDN Online Library
> http://support.microsoft.com/default.aspx?scid=kb;EN-US;190766
>
> If anything is unclear or you have further questions, please feel free to
> let's know. I look forward to your reply.
> Best Regards,
>
> Peter Yang
> MCSE2000/2003, MCSA, MCDBA
> Microsoft Online Community Support
> ==================================================
> Get notification to my posts through email? Please refer to
> http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
> ications
> <http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx>.
> Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
> where an initial response from the community or a Microsoft Support
> Engineer within 1 business day is acceptable. Please note that each follow
> up response may take approximately 2 business days as the support
> professional working with you may need further investigation to reach the
> most efficient resolution. The offering is not appropriate for situations
> that require urgent, real-time or phone-based interactions or complex
> project analysis and dump analysis issues. Issues of this nature are best
> handled working with a dedicated Microsoft Support Engineer by contacting
> Microsoft Customer Support Services (CSS) at
> <http://msdn.microsoft.com/subscriptions/support/default.aspx>.
> ==================================================
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
>
Re: Synchronising two Access-Databases
Michael Maes 23.09.2006 20:40:02
Hi Peter,

I guess we're doing something wrong.
I'm quite conviced that the credentials are ok locally and on the webserver.
The folder has even anonymous access!

Each time we try to synch, we recieve this error:

Invalid HTTP address. (Error 3685)
The HTTP address specified is not valid for this replica set. The HTTP
address supplied did not match any values in the field InternetAddress in the
system table MSysTranspAddress.

I do can send you an email containing screenshots to clarify some things.

Thanks for your help!

Michael




"Peter Yang [MSFT]" wrote:

[Quoted Text]
> Hello Michael,
>
> You may want to concider using replication manager included in Office
> deveoper edition 2000/xp other than builing your own program/services to do
> this job for you. Replication Manager includes features that let you
> schedule and execute unattended synchronizations without programming.
> Additionally, it lets you use indirect synchronization and Internet
> synchronization, and provides tools for examining the synchronization
> history for a replica. One of the components of Replication Manager is the
> Synchronizer. This component performs the unattended synchronizations that
> you set up with Replication Manager.
>
> Or you could use JRO directly to syncrhronize replicas. Replication is
> actually a *JET* technology, not an Access one and you could use
>
> 258539 MOD2000: The Syntax for Synchronization Using Microsoft Jet and
> http://support.microsoft.com/?id=258539
>
> If you want to develope in .net, you have to use COM interop to call JRO:
>
> Exposing COM Components to the .NET Framework
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/htm
> l/cpconexposingcomcomponentstonetframework.asp
>
> 306287 How to compact a Microsoft Access database by using Visual Basic .NET
> http://support.microsoft.com/default.aspx?scid=kb;EN-US;306287
>
> More related information:
>
> Internet Synchronization with the Microsoft Jet Database Engine: A
> Technical Overview
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnacc2k/htm
> l/intrjet4.asp
>
> 190766 Jet 4.0 replication white papers available in MSDN Online Library
> http://support.microsoft.com/default.aspx?scid=kb;EN-US;190766
>
> If anything is unclear or you have further questions, please feel free to
> let's know. I look forward to your reply.
> Best Regards,
>
> Peter Yang
> MCSE2000/2003, MCSA, MCDBA
> Microsoft Online Community Support
> ==================================================
> Get notification to my posts through email? Please refer to
> http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
> ications
> <http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx>.
> Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
> where an initial response from the community or a Microsoft Support
> Engineer within 1 business day is acceptable. Please note that each follow
> up response may take approximately 2 business days as the support
> professional working with you may need further investigation to reach the
> most efficient resolution. The offering is not appropriate for situations
> that require urgent, real-time or phone-based interactions or complex
> project analysis and dump analysis issues. Issues of this nature are best
> handled working with a dedicated Microsoft Support Engineer by contacting
> Microsoft Customer Support Services (CSS) at
> <http://msdn.microsoft.com/subscriptions/support/default.aspx>.
> ==================================================
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
>
Re: Synchronising two Access-Databases
"David W. Fenton" <XXXusenet[ at ]dfenton.com.invalid> 24.09.2006 02:07:17
Michael Maes <michael.maes[ at ]community.nospam> wrote in
news:B9D41F13-AD2A-4983-B7C7-DD37DCD563F1[ at ]microsoft.com:

[Quoted Text]
> Each time we try to synch, we recieve this error:
>
> Invalid HTTP address. (Error 3685)
> The HTTP address specified is not valid for this replica set. The
> HTTP address supplied did not match any values in the field
> InternetAddress in the system table MSysTranspAddress.

Well, is the HTTP address correct? Is it one that is listed for the
replica in question in the table given?

I don't do Internet replication (I consider it a bad idea), but what
the error is telling you is that you've not got it configured
correctly. It's not a credentials issue, but a setup question. I
have no idea where you set the HTTP address of a replica. My
suspicion is that you've illegally moved the replica in question
from its original location to the present one, and it still has the
original location recorded.

--
David W. Fenton http://www.dfenton.com/
usenet at dfenton dot com http://www.dfenton.com/DFA/
Re: Synchronising two Access-Databases
petery[ at ]online.microsoft.com (Peter Yang [MSFT]) 25.09.2006 06:06:44
Hello Michael,

To know the issue better, I'd like to know if you follow the steps in the
following article to configure Internet replication? Or if it is different,
please let me know the exact steps you use.

Internet Synchronization with the Microsoft Jet Database Engine: A
Technical Overview
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnacc2k/htm
l/intrjet4.asp

As David mentioned, you may want to check if moved replica from another
place.

Also, please note that using direct synchronization requires a robust
permanent connection. Direct synchronization for users who are connecting
over a wide area
network (WAN) is not recommended because of the greater possibility that
corruption may occur. If the customer only has an Internet connection, they
can only use
Internet Synchronization. You may need to take a look at the following
article:

http://support.microsoft.com/?id=262833

To confirm if you have valid HTTP address configured, please open table
"MSysTranspAddress" in Access (You may go to Tools->Options->View to enable
viewing Hidden/System objects). You may find that it does contain any
enabled HTTP transporter. Therefore, and invalid HTTP address message would
occur all the time no matter how you specified the URL and you were able to
synchronize through the Internet.

I assume that there may be some small mistakes when you set up the Internet
Replication. To resolve this problem, I suggest you reconstruct Internet
Replication by the instructions in the following above article.

You may want to check mstrai40.exe is currently in
c:\Inetpub\Scripts\Replication Manager\ on the IIS computer. If you setup
the Internet Replication by following the instructions of the Internet
replication white paper, this file would be copied to c:\Inetpub\Scripts
folder by Replication Manager (Please refer to Step 12 in "Configure
Microsoft Replication Manager 4.0" section of the article). Please check
whether this file is available.

If it is available, please go to the client computer, and type the
following URL
in Internet Explorer:

http://80.62.53.100/scripts/mstrai40.exe

This may return a CGI error as follows:

CGI Error
The specified CGI application misbehaved by not returning a complete set of
HTTP headers.

If you do not receive the above error, but receive some other errors,
please let me know.

In the configuration of the Replication Manager, I'd like to know if you
entered the IP address of the NIC in the server that was connected to the
Internet.
Entering the IP address is typically a more reliable method of configuring
Internet Replication, as it eliminates the reliance on DNS. However, when
running the mstrai40.exe CGI program, if the server cannot correctly
translate the external IP address to the IP address of the internal NIC,
the mstrai40.exe may behave incorrectly and does not return a valid HTTP
header. We have seen some similar issues like that. (One issue that we
encountered before is that the replication was configured to the IP
address. After the get request for mstrai40.exe, it did a DNS query on the
domain name, and it failed, and then the CGI application did not provide
the right headers.) I would suggest that on the server we add the entries
of both the Internet NIC IP and the internal NIC IP in the LMHOSTS file,
and see if it is helpful.

For test purposes, I would also suggest that you enter the machine name of
the server in the Replication Manager configuration, and setup a DNS and
make sure the DNS entries are updated to reflect the Internet Server
information. Does this work?

Please try my suggestions and let me know your results. I am looking
forward to your reply. Thank you

Best Regards,

Peter Yang
MCSE2000/2003, MCSA, MCDBA
Microsoft Online Partner Support


=====================================================

This posting is provided "AS IS" with no warranties, and confers no rights.
======================================================


Re: Synchronising two Access-Databases
"David W. Fenton" <XXXusenet[ at ]dfenton.com.invalid> 25.09.2006 11:52:56
petery[ at ]online.microsoft.com (Peter Yang [MSFT]) wrote in
news:k2afIjG4GHA.3440[ at ]TK2MSFTNGXA01.phx.gbl:

[Quoted Text]
> I would suggest that on the server we add the entries
> of both the Internet NIC IP and the internal NIC IP in the LMHOSTS
> file, and see if it is helpful.

Why LMHOSTS instead of HOSTS?

--
David W. Fenton http://www.dfenton.com/
usenet at dfenton dot com http://www.dfenton.com/DFA/
Re: Synchronising two Access-Databases
petery[ at ]online.microsoft.com (Peter Yang [MSFT]) 26.09.2006 06:43:47
I agree with you Lmhosts is related to netbios/Intranet while hosts is DNS
related. I suggested that he tries this since I once saw similar issue in
intranet and he may test the issue in LAN other than from Internet
actually.

Best Regards,

Peter Yang
MCSE2000/2003, MCSA, MCDBA
Microsoft Online Partner Support


=====================================================

This posting is provided "AS IS" with no warranties, and confers no rights.
======================================================


Re: Synchronising two Access-Databases
Michael Maes 28.09.2006 07:55:02
Hi Peter, david,

Many thanks for your kindest help.
It's been a bit quit lately :) because we are in the middle of synchronising
SQL Servers with SQLBase Servers with different datascheme's :-s

As soon as I have "spare time" I'll look in to this matter and let you know
our progress.

Meawhile: thanks!

Michael

"Peter Yang [MSFT]" wrote:

[Quoted Text]
> I agree with you Lmhosts is related to netbios/Intranet while hosts is DNS
> related. I suggested that he tries this since I once saw similar issue in
> intranet and he may test the issue in LAN other than from Internet
> actually.
>
> Best Regards,
>
> Peter Yang
> MCSE2000/2003, MCSA, MCDBA
> Microsoft Online Partner Support
>
>
> =====================================================
>
> This posting is provided "AS IS" with no warranties, and confers no rights.
> ======================================================
>
>
>
Re: Synchronising two Access-Databases
petery[ at ]online.microsoft.com (Peter Yang [MSFT]) 29.09.2006 01:40:41
Hello Michael,

If you have any furhter update on this issue, please feel free to post
back. Thank you.

Best Regards,

Peter Yang
MCSE2000/2003, MCSA, MCDBA
Microsoft Online Community Support


=====================================================


This posting is provided "AS IS" with no warranties, and confers no rights.
======================================================


Home | Search | Terms | Imprint | Contact
Newsgroups Reader - provided by WiredBox.Net