MS Access Forum / Replication / February 2006
help needed understanding replication
|
|
Thread rating:  |
Bikini Browser - 08 Feb 2006 18:10 GMT Hello Everyone!
I have a problem that I think replication will help me with, but I am not sure. Can you help?
I have two computers that are not always connected on a Network. One is a desktop and one is a notebook. I want both the master and the replica to be able to enter new records and delete records, and still end up with only one current table after I sync them both.
I understand that replication will help me with programming changes with the Master and the Replicate.
However, I don't understand changes in Data. If I have a Master database, and changes to the data are made in the Master, and the replica is on a notebook, not connected to the network, and changes are made to the data in the replica, what happens when you sync them both together?
My questions are: Does the data (Tables) get updated too? How does Access know which record to update? Does access ever overwrite any entire record, or can it update fields in the tables? How does it handle deleted records? Do you have to write any Code to make replication work correctly? Can you replicate databases over the Internet? If you have Windows XP home addition, on the notebook where the replica is, and Windows XP Professional where the Master is, how would you sync them up? How would you Sync the two computers mentioned above using the Internet with DHCP IP addresses on both computers?
Any help is appreciated. Please help me understand these issues.
Dale M. Allen MCSE, CCNA MCP+I San Juan, Puerto Rico www.daleallen.com The Bikini Browser of Puerto Rico MSN Messenger: banana_pages@yahoo.com
jacksonmacd - 09 Feb 2006 02:19 GMT >Hello Everyone! > [quoted text clipped - 8 lines] >I understand that replication will help me with programming changes with the >Master and the Replicate. If you mean that you are making changes to forms, reports, etc, and expecting to use replication to propogate the changes to the remote unit, then STOP. Replication is intended only for data. You should split your database into frontend (program) and backend (data) components, and replicate only the backend. Changes to the frontend are distributed using some other means. Many people use Tony Toews autoupdater from http://www.granite.ab.ca/access/autofe.htm
>However, I don't understand changes in Data. If I have a Master database, >and changes to the data are made in the Master, and the replica is on a [quoted text clipped - 3 lines] >My questions are: >Does the data (Tables) get updated too? Yes - that's its intended purpose
>How does Access know which record to update? Replication adds hidden fields and tables to the database that keep track of that information.
>Does access ever overwrite any entire record, or can it update fields in the >tables? Jet 3.5 (Access 97) is for whole record. I think that Jet 4.0 (Access 2000+) allows for single field granularity, but I've never used it.
>How does it handle deleted records? Keeps track of which records are deleted until all replicas in the replica set have been informed about their deletion. Then it deletes them permanently.
>Do you have to write any Code to make replication work correctly? No, but if you have non-sophisticated users, then providing a custom interface will make it easier for them to synchronize.
>Can you replicate databases over the Internet? Yes -- with additional software. Replication Manager, which used to be a component of the Office Developers Edition, provides two methods. Indirect Synchronization (the preferred method) requires that you establish a connection between the two nodes such that each computer can "see" a dropbox folder on the other computer. Internet Synchronization uses a web server (IIS). It's apparently much more difficult to get working properly.
>If you have Windows XP home addition, on the notebook where the replica is, >and Windows XP Professional where the Master is, how would you sync them up? Share the folder where the Master is located. Navigate to the folder from the remote.
BTW -- conventional wisdom dictates that the Design Master is NOT used for day-to-day activities. Instead, squirrel it away in a hidden location, and only synchronize it often enough to prevent it from going "stale". Create a replica for each computer to use for editing.
Also -- once a replica is created and in-place, don't move it. In particular, don't use email, floppy disk, USB drive, etc as a method of synchronizing. Doing so will eventually corrupt your database.
>How would you Sync the two computers mentioned above using the Internet with >DHCP IP addresses on both computers? Get a copy of Replication Manager and implement Indirect Synchronization over a WAN connection.
>Any help is appreciated. Please help me understand these issues. > [quoted text clipped - 3 lines] >The Bikini Browser of Puerto Rico >MSN Messenger: banana_pages@yahoo.com ********************** jackmacMACdonald@telusTELUS.net remove uppercase letters for true email http://www.geocities.com/jacksonmacd/ for info on MS Access security
David W. Fenton - 09 Feb 2006 02:52 GMT >>My questions are: >>Does the data (Tables) get updated too? > > Yes - that's its intended purpose Replication is a JET function, not an Access function, and that's why it's really only appropriate for tables and queries, which are pure Jet objects. Forms, reports, etc., are Access objects (i.e., objects the descriptions of which are stored in Jet tables, but are not themselves known to Jet), and thus cannot be reliably replicated.
>>How does Access know which record to update? > > Replication adds hidden fields and tables to the database that > keep track of that information. This is accomplished via assigning a "generation" number to the records/fields so that Jet knows which records to update. After a synch, a replica is caught up to Generation N. If a record is changed, it becomes Generation N+1, so that the next time there's a synch, it knows that all records having a generation of >N need to by synched.
In reality, it's quite a bit more complex than that, but that's the basic mechanism for accomplishing the synchronization.
[]
>>How does it handle deleted records? > > Keeps track of which records are deleted until all replicas in the > replica set have been informed about their deletion. Then it > deletes them permanently. That's not really quite true. Once a replica, say Replica A, has synched with another replica (Replica B), any deletes from the other replica (B) are really applied in Replica A. The records are now gone from Replica A, too. This is accomplished through a special hidden replication table called MSysTombstones that keeps track of all the record deletions. The tombstone record remains in the replica until it exceeds the replica's expiration period. The default for replica expiration is 1000 days, so after 1000 days, a tombstone record will be deleted. I don't know what happens if you haven't synched with all the replicas in the replica set, though.
But the records really are deleted from the replicas after a synch -- the data is not there anymore, anywhere. All that's in the tombstones table is a few fields identifying the table the record was deleted from, the generation and the exact record that was deleted. None of the data fields from the deleted records are retained, only replication metadata.
[]
>>Can you replicate databases over the Internet? > [quoted text clipped - 5 lines] > Internet Synchronization uses a web server (IIS). It's apparently > much more difficult to get working properly. It doesn't actually use the HTTP server of IIS, but the FTP server component (to transfer the files between dropboxes). This adds an additional component that has to be configured correctly, and it's a very dangerous component, one that has historically had lots of security holes in it. It makes no sense to have a web/FTP server running on a workstation, for instance, but it's required on both ends of a synch.
The preferred method is indirect synchronization, but that can be accomplished over the Internet only with a VPN. VPNs are a lot easier to set up than they used to be, so this is not nearly the hurdle it may seem to be.
>>If you have Windows XP home addition, on the notebook where the >>replica is, and Windows XP Professional where the Master is, how >>would you sync them up? > > Share the folder where the Master is located. Navigate to the > folder from the remote. No, you don't want to share the folder where your replica is located, unless you're going to use only DIRECT replication. If you're going to use Indirect (or Internet) replication, you need the the replica to *not* be shared, or to be shared only in a hidden share (i.e., one that ends in $, as in HiddenShare$).
> BTW -- conventional wisdom dictates that the Design Master is NOT > used for day-to-day activities. Instead, squirrel it away in a > hidden location, and only synchronize it often enough to prevent > it from going "stale". Create a replica for each computer to use > for editing. The reason for this is that the DM is you DESIGN MASTER, the only place you can make design changes to your replica set. That's incredibly important. It *can* be recovered if it's lost, but that can lead to damage to the replica set if there have not been regular synchs.
> Also -- once a replica is created and in-place, don't move it. In > particular, don't use email, floppy disk, USB drive, etc as a > method of synchronizing. Doing so will eventually corrupt your > database. I recently encountered Michael Kaplan's article on this subject for the first time in a long time:
http://trigeminal.com/usenet/usenet009.asp?1033
Basically, anyone contemplating replication should read everything on that website that relates to the subject. Michael Kaplan was (and still is) the master of the subject, unequalled by anyone else I've ever encountered.
[]
>>Any help is appreciated. Please help me understand these issues. You really need to read all the Microsoft FAQs on the subject of Jet replication, but keep in mind that they include marketing-speak on some subjects, such as suggesting that you replicate forms and such as a way of pushing out design changes to your front end. Read the FAQs, but be skeptical of everything you read, as not all the information in them is equally reliable.
The Google Groups archives for this newsgroup are also an incredibly helpful source of information on the subject.
 Signature David W. Fenton http://www.dfenton.com/ usenet at dfenton dot com http://www.dfenton.com/DFA/
Bikini Browser - 09 Feb 2006 15:40 GMT Hello Gentlemen!
Thank you for your great information. I have to admit, I learned a lot from your answers... NOW you raised some more issues...
If I have a design master on a Windows 2000 server with a static IP address and IIS and FTP and a firewall, do I have to have MS ACCESS 2003 installed on that server too?
If I make changes to the design master, such as new queries, new forms, new modules, and features, how do I get those delivered to the replicas, AND keep my data current and safe?
What is the difference between splitting the database and replicating it?
I understand that I really need a VPN for replication. However in some cases, a static IP is not going to be available. However I can use something like NO-IP.COM's product, which gives my computer a domain name using DHCP. Does anyone know of a VPN Client that will let me use a DOMAIN name instead of an IP Address? I will use Windows XP Professional and Windows XP Home edition for my 2 node network.
Finally, My software product will hopefull sell to many new customers in the future. I don't expect to be able to install a VPN Client on each new customers PC. Where can I find more information about installing the Solution for indirect replication on an IIS server. I understand that you all said this is not the best solution and it is hard to do, but I am trying to hire good programmers that I am doing the research for and I think we can surly do it and retain a safe network.
Your thoughts would be appreciated. Thanks in advance.
Dale Allen
>>>My questions are: >>>Does the data (Tables) get updated too? [quoted text clipped - 127 lines] > The Google Groups archives for this newsgroup are also an incredibly > helpful source of information on the subject. David W. Fenton - 09 Feb 2006 16:26 GMT > Thank you for your great information. I have to admit, I learned a > lot from your answers... NOW you raised some more issues... > > If I have a design master on a Windows 2000 server with a static > IP address and IIS and FTP and a firewall, do I have to have MS > ACCESS 2003 installed on that server too? Not to allow workstations with Access installed to edit an MDB file stored on that server, no.
However, you might install Access on the server for these reasons:
1. to be able to perform maintenance tasks in place, such as compacting a data file. For large files of 100s of megabytes, it can take significantly longer to do the same process from a workstation, across the LAN.
2. if you want to provide Windows Terminal Server access (either for administering the database or for users), you'd need Access installed so that TS users could run it on the terminal server. This is the preferred scenarior for me that basically makes replication irrelevant to most of my clients these days (however, it doesn't take care of the user who can't run the app connected to the Internet).
> If I make changes to the design master, such as new queries, new > forms, . . . There should be no forms in a replicated database. Your app should be split into back end (data tables) and front end (forms, modules, etc.), and only the BACK END should be replicated.
> . . . new > modules, . . . Should not be replicated.
> . . . and features, how do I get those delivered to the replicas, > AND keep my data current and safe? Your data should be in a separate MDB file, and replicated.
The front end should be a different MDB. When you have an update, the users just copy the new front end MDB over top of the old. They may have to relink the tables, depending on how you've configured things (on the laptops, if you put the front end in the same folder as the back end, it's easy to have the relinking happen automatically).
> What is the difference between splitting the database and > replicating it? See above.
No professional Access developer of any real competence distributes any non-trivial application, replicated or not, in an unsplit configuration. And all multi-user applications must be deployed in this fashion. If you read the Access help files on the subject of multiuser issues, you'll see that a split architecture is recommended there, and has been since at least Access 2.0 (i.e., 1994 or so).
> I understand that I really need a VPN for replication. However in > some cases, a static IP is not going to be available. However I > can use something like NO-IP.COM's product, which gives my > computer a domain name using DHCP. . . . You can use any dynamic DNS service. The way that works is that you run a process on the workstation that informs the dynamic DNS services servers of your current IP address and assigns it to the subdomain of your choice. You would then use that subdomain as the other endpoint of your VPN connection.
However, it is probably cheaper and easier to just pay your ISP the $5 or so it takes to get a permanent IP address for the home base. Remember, the laptop users will be connecting to a central "mother ship" and all they need to know is how to reach that one location. If the home office has a fixed IP address, then you don't have to deal with any other issues.
And you don't have to worry about the laptop IP addresses, as the VPN connections will always be inbound, initiated from the laptop to the main office.
> . . . Does anyone know of a VPN Client that will let me use a > DOMAIN name instead of an IP Address? I will use Windows XP > Professional and Windows XP Home edition for my 2 node network. So far as I know, any VPN client will allow that, as long as the domain name resolves to an IP address.
Keep in mind that the VPN client that comes with Windows may be perfectly sufficient for you.
However, you may have problems with that on WinXP Home -- I have always recommended that all of my clients (even home users) avoid Home, because of its crippled networking (it supports only the bloody stupid "simple neetworking" which makes it impossible to control access to shared files by users and user groups).
> Finally, My software product will hopefull sell to many new > customers in the future. I don't expect to be able to install a [quoted text clipped - 4 lines] > programmers that I am doing the research for and I think we can > surly do it and retain a safe network. I would never contemplate using Jet replication for a commercial product.
That said, setting up and configuring a VPN is much easier than installing and configuring IIS safely, and keeping it configured in a way that won't cause Internet replication to fail.
> Your thoughts would be appreciated. Thanks in advance. If you are really contemplating a commercial product, I'd rethink it from the ground up. Jet replication is going to be a nightmare to set up and install without human intervention for every installation.
 Signature David W. Fenton http://www.dfenton.com/ usenet at dfenton dot com http://www.dfenton.com/DFA/
Bikini Browser - 10 Feb 2006 18:53 GMT Ok, I have read a lot about this now, but I need a place to get started.
My needs are simple...
I have a Windows 2000 Server I have a full Class C License available to me so a Static IP is not a problem. I have two Windows XP computers. One is a home edition and other is a Professional. There is a CISCO Firewall that the 2000 server is behind. Both XP's have a CISCO VPN Client working fine and connecting to the 2000 server. I can Ping the server's netbios name without problems
I want to do the following with my Access database...
I want the XP clients to have current data on their copy of access daily from remote locations. I want the XP clients to be able to get feature updates on the database as easy as possible and keep the same data from remote locations. I don't want the XP Clients to be able to modify their copy.
I want a programmer to be able to make changes to the program and add features. I want the Design master to reside on the Windows 2000 server and no one will be making changes to the data on the master. All changes will be made on the XP Clients.
Can anyone help me with step one? I am NOT a programmer. I can only do things with Wizards. Can a MCSE do this? Or do I need someone more qualified?
Any help would be appreciated.
Dale
>> Thank you for your great information. I have to admit, I learned a >> lot from your answers... NOW you raised some more issues... [quoted text clipped - 118 lines] > set up and install without human intervention for every > installation. David W. Fenton - 11 Feb 2006 00:52 GMT > Ok, I have read a lot about this now, but I need a place to get > started. [quoted text clipped - 9 lines] > the 2000 server. I can Ping the server's netbios name without > problems That all looks very good.
Now you'll need to check if the workstations can access and edit data on the server via the VPN. If they can, that means they are authenticating appropriately on the server and you won't have to worry about that problem (which could be a major one).
> I want to do the following with my Access database... > > I want the XP clients to have current data on their copy of access > daily from remote locations. Why not just host the application on Windows Terminal Server on the server? Then the workstations won't have any complicated configuration at all, just the Remote Desktop client. Obviously, if the workstations can't be connected to the Internet at all times, then that won't work, but if they are in an office that has an always-on Internet connection (or could get one), you will save yourself an enormous amount of work and headaches setting it up that way. The cost of the monthly broadband service will be far less than the costs in time it takes to set up indirect replication and keep it running reliably.
> I want the XP clients to be able to get feature updates on the > database as easy as possible and keep the same data from remote > locations. This is not accomplished with replication, since the "program" MDB (with forms, reports, etc.) cannot be replicated. Jet replication works only for data tables, so you're going to have to push out front end updates in some other fashion. That is not a replication issue, though, so I'll let you investigate that separately. I'd suggest checking the Google Groups archives for comp.databases.ms-access.
> I don't want the XP Clients to be able to modify their copy. You mean the forms/reports, etc.? That can be accomplished by distributing an MDE file, which will prohibit updates to any forms or reports or modules (since the code will not be there -- read the help file on MDE's). The only other method to accomplish this is via Jet user-level security, and that's quite complicated to implement. The MDE is going to be much easier.
> I want a programmer to be able to make changes to the program and > add features. Not a replication issue.
> I want the Design master to reside on the Windows 2000 server and > no one will be making changes to the data on the master. All > changes will be made on the XP Clients. Only the data MDB will be replicated. You will need to periodically synch the DM with the live replica set or it will eventually expire.
Schema changes should not happen very often once the application is in production use, so there shouldn't very often be a requirement to synch the DM with the replica set beyond the periodic synch to keep it from expiring (the default expiration term is 1,000 days). However, you need to be careful with making schema changes to a replicated data file that is in production use -- make them incrementally, in small steps. If, for instance, you're changing the relationships between two tables, remove the old relationship, then synch through the whole replica set, then add the new relationship and synch all 'round the replica set again. If all you're doing is, say, adding a bunch of new fields to a new table, though, that can all be done in one go. It's only when you're altering things that affect the relationships between tables that you need to think carefully and go slowly.
Thus, you want to make sure you've got your schema as close to perfect as possible before you put it into production use.
> Can anyone help me with step one? I am NOT a programmer. I can > only do things with Wizards. Can a MCSE do this? Or do I need > someone more qualified? Well, if the PCs have to have to be used in a disconnected setting, then you're going to have to do indirect replication, and you should hire someone for that, as it *must* be someone with broad experience in replication already, not someone who thinks he's an Access wiz and can pick up what he needs to know about replication as he goes along.
Alternatively, skip replication entirely, and host the application on Windows Terminal Server. With decent bandwidth (DSL or highter), the end users will find it just about the same as working locally (though that will be dependent on the bandwidth of the two ends of the connections).
I no longer ever do replication for supporting multiple offices that want to share data -- I always do WTS hosted in one of the two offices. I only do replication when laptops need to be carried into the field and used there without an Internet connection. Mostly, that's a case where the laptop is synched with the mother ship before leaving the office, then used out of the office until the return from the trip. At that point, all the data changes made by the roving user are synched back with the mother ship while connected to the LAN in the main office. That scenario requires no programming -- it can use direct replication via the standard Access replication UI.
 Signature David W. Fenton http://www.dfenton.com/ usenet at dfenton dot com http://www.dfenton.com/DFA/
Bikini Browser - 11 Feb 2006 02:58 GMT Ok David... I read your message twice...
I cannot use Terminal Server... My application is used for contact management. It uses C:\PROGRAM FILES\WINDOWS NT\DIALER.EXE in Windows XP. All calls are logged and customer phone numbers are assigned to sales people. The point is, they have to have a copy of the database on their destop so XP Dialer can dial the phone number in their customers record, and WinFax Pro can use the fax number in the customers record.
My Cisco VPN is connecting to the 2000 server and I can ping the 2000 server. I can map a drive to the Windows 2000 server with both the XP home Edition and the XP Professional Edition using NET USE
Connectivity and security is my specialty. No problem there.
Remember, I only have 2 clients and one server. I am basiciccly a beta tester. I can get this all setup like I want it then I can import the data I need after all the goals are met. My production can continue while I struggle with the installation.
So David, where do I start? What should I do first? Your the consultant, I am the customer, What questions do you want to ask so you can help get to step one?
Dale
>> Ok, I have read a lot about this now, but I need a place to get >> started. [quoted text clipped - 112 lines] > programming -- it can use direct replication via the standard Access > replication UI. David W. Fenton - 11 Feb 2006 20:05 GMT > I cannot use Terminal Server... My application is used for > contact management. It uses C:\PROGRAM FILES\WINDOWS [quoted text clipped - 3 lines] > can dial the phone number in their customers record, and WinFax > Pro can use the fax number in the customers record. Well, I would suggest that these outside dependencies constitute a design error that could only happen because the remote scenario was not planned for in the original application design.
However, keep in mind that Terminal Server running on Win2K3 Server, or WTS on Win2K with Citrix extensions can use local printers, so WinFax ought to work just fine.
The dialer is a different issue. I don't know how that can be dealt with. Perhaps there are Citrix extensions that allow for executing such resources locally instead of remotely.
So, the fax looks pretty easy to deal with on WTS, seems to me, and the dialer may be addressable through some kind of Citrix extension. If these were possible, I'd definitely recommend you pursue them before embarking on replication at all, because once it's in place, the incremental cost of adding other remote users approaches ZERO with the WTS solution, but is pretty complex for the replicated solution. So, even inf you have to buy some Citrix extensions to make it work (or upgrade the server to Win2K3, which I'd actually recommend, in any case), the cost wioll still, in my estimation, be dwarfed in comparison to the cost of implementing, installing and administering a replicated solution.
> My Cisco VPN is connecting to the 2000 server and I can ping the > 2000 server. I can map a drive to the Windows 2000 server with > both the XP home Edition and the XP Professional Edition using NET > USE How is that accomplished? By using the hideously insecure EVERYONE group? The question arises because using indirect replication requires bi-directional write access. PC A has to be able to write to a share on PC B and vice versa. In a domain environment where PC B is validating to PC A, which happens to be a domain controller, this is simple. In the absence of a domain controlller for central authentication, you have two choices:
1. create the same username/password pair on both machines -- it will automatically authenticate from one to the other if the username/password pair matches. This is the safe way to do it, but is a bit of a pain to set up (though with only a small number of machines, it's not that difficult). Keep in mind that the accounts being used by the workstation uers cannot have a blank password (i.e., the default setup in WinXP).
2. use the EVERYONE group on both machines. This is horridly insecure (the EVERYONE group is an abomination for any use except printer sharing, in my opinion, and should never be used, ever), and I could never recommend it in any context whatsoever.
> Connectivity and security is my specialty. No problem there. Well, see what you think about the above. Perhaps your standards of security and mine are not the same.
> Remember, I only have 2 clients and one server. I am basiciccly a > beta tester. I can get this all setup like I want it then I can [quoted text clipped - 4 lines] > consultant, I am the customer, What questions do you want to ask > so you can help get to step one? At this point, I can't answer any further questions. You need to hire somebody to design and implement the inderect replication for you.
 Signature David W. Fenton http://www.dfenton.com/ usenet at dfenton dot com http://www.dfenton.com/DFA/
jacksonmacd - 11 Feb 2006 22:30 GMT Dale
Since you now have a copy of RM, which will allow you to use Indirect Synchronization, have a look at:
http://groups.google.ca/group/microsoft.public.access.replication/search?group=m icrosoft.public.access.replication&q=steps+to+configure+indirect+synchronization &qt_g=1
http://groups.google.ca/group/microsoft.public.access.replication/browse_thread/ thread/582b44e90ca44d9/acc552982573e09e?q=steps+to+configure+indirect+synchroniz ation&rnum=1#acc552982573e09e
You should work with a dummy database until you get the kinks worked out, and are comfortable with Indirect Synch. Once you have got the Indirect Synch working with your dummy database, you should investigate setting up a replica farm. Once that's working, then you can work with your live data.
>Ok David... I read your message twice... > [quoted text clipped - 138 lines] >> programming -- it can use direct replication via the standard Access >> replication UI. ********************** jackmacMACdonald@telusTELUS.net remove uppercase letters for true email http://www.geocities.com/jacksonmacd/ for info on MS Access security
|
|
|