473,394 Members | 1,739 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Database Replication Issue

171 100+
Hi,
I already have 3 Databases running:
A. they all have the same tables and the same structure
B. There is no 1 Master table they are all separate tables

What I want to do is to merge them into 1 Master Table to be able to generate reports etc. An append query will not suffice because some fields get updated in the orginial databases.

I have looked into database replication and I think it would work. I have considered the following method:

1. Merge all Data into 1 table
2. create 3 replica's

Issue with this method:

1. Each Database will be populated with data from 2 other databases which is not needed.

Is there a way to resolve this, because if I delete the data from the 2 other tables, wouldn't the replication wizard want to delete that data from the Master aswell?

Best Regards
Sep 29 '08 #1
30 2921
puppydogbuddy
1,923 Expert 1GB
In my opinion Replication is definitely not the way to go for what you want to accomplish. Instead, I recommend the DoCmd.TransferDatabase method as discussed and illustrated in the following links:

http://msdn.microsoft.com/en-us/library/bb214131.aspx

http://www.blueclaw-db.com/transferdatabase-docmd.htm
Sep 30 '08 #2
NeoPa
32,556 Expert Mod 16PB
You seem to use the terms "Database" and "Table" interchangeably. These two terms most definitely do not have the same meaning.

As a result, getting a clear understanding of the question is difficult without making assumptions, which I prefer to leave to those who don't know better ;)

PS. In case that sounds like I may have been referring to pDog, I can say categorically I was not.
Sep 30 '08 #3
puppydogbuddy
1,923 Expert 1GB
You seem to use the terms "Database" and "Table" interchangeably. These two terms most definitely do not have the same meaning.

As a result, getting a clear understanding of the question is difficult without making assumptions, which I prefer to leave to those who don't know better ;)

PS. In case that sounds like I may have been referring to pDog, I can say categorically I was not.
Adrian,
LOL!! At the time I answered the question, it seemed pretty clear that the OP simply wanted to consolidate data from external databases with the same table structure into a master table for reporting purposes.

pDog
Sep 30 '08 #4
NeoPa
32,556 Expert Mod 16PB
pDog,

For those experts (such as yourself I assume) that are already familiar with the subject matter I expect there are assumptions that can be made quite sensibly. As I have no experience in this area and simply look to find a sensible solutions to posters problems in such cases, it is very important that I (and other experts in a similar position) have a question that explains what's what.

As explained earlier, I intended no criticism towards yourself. Simply at the OP who seemed to expect people to realise he meant one thing when saying another.

There are other areas of Access where I am on quite familiar ground and I can guess what the OPs mean even when poorly expressed. Other experts may struggle in the same situations. I try to encourage members to post questions that make sense in all cases, on the assumption that they don't know who will be available to offer a solution. It seems only reasonable after all, if they expect others to go to far greater trouble on their behalf.

In case it's not clear, I also understand that members are often unable to express themselves clearly in technical terms, even when they do make an effort. Making the effort never hurt though.

In this case I felt the question led rather to a solution which was query based, as he didn't want all the data in together except for the report. Sometimes the OP's own perception of the problem can be quite ill-informed. I didn't want to assume that though, as I've been led up many a blind-alley before.

Anyway, we can see how this one progresses :)
Sep 30 '08 #5
iheartvba
171 100+
Sorry, my mistake, I encountered a brain not work error in my brain. I have amended the post, as well as adding a query regarding PDog's reply

Hi,
I already have 3 Databases running:
A. they all have the same tables and all tables have the same structure
B. There is no 1 Master Database they are all run independantley

What I want to do is to merge them into 1 Master Database to be able to generate reports etc. An append query will not suffice because some fields get updated in the orginial databases.

I have looked into database replication and I think it would work. I have considered the following method:

1. Merge all Databases into 1 Database
2. create 3 replica's

Issue with this method:

1. Each Database will be populated with data from 2 other databases which is not needed.

Is there a way to resolve this, because if I delete the data from the 2 other databases, wouldn't the replication wizard want to delete that data from the Master aswell?

Best Regards


P.S. as per Pdog I have now also considered doing the DoCmd.TransferDatabase, from what I understand this is how it would be done:

Lets Call the Master Database office M_DB
Lets Call the Sub Database offices S_DB

1. Create VPN between M_DB and S_DB's
2. Delete all tables in M_DB and initiate DoCmd.TransferDatabase from the first S_DB to M_DB
a. the reason for deleting the tables is that some fields may be updated so access would not allow a duplicate primary key for those records
3. Then the DoCmd.TransferDatabase would be initiatied on the other 2 S_DB's
4. if my understanding is right, then isn't this a really long winded way to acheive my objective
Oct 1 '08 #6
puppydogbuddy
1,923 Expert 1GB
What I want to do is to merge them into 1 Master Database to be able to generate reports etc. An append query will not suffice because some fields get updated in the orginial databases.

I have looked into database replication and I think it would work. Issue with this method:

1. Each Database will be populated with data from 2 other databases which is not needed.

Is there a way to resolve this, because if I delete the data from the 2 other databases, wouldn't the replication wizard want to delete that data from the Master aswell?

4. if my understanding is right, then isn't this a really long winded way to acheive my objective
In my opinion, replication represents the long-winded way to achieve your objective. Firstly, replication is suited for home office with large distributed databases, each of which need to work from a consistent (consolidated) pool of data. You stated that the master table would be used strictly to consolidate data for reporting purposes, and that only the master table needs to have all of the information. The distributed computers are to be used only to capture data at the site and pass it on to the Master table at the home site.

With replication, true synchronization of all replicas and the design master is more difficult to achieve in practice then in theory…..identifying and resolving conflicts can require considerably more of your time than anticipated, even where a code approach is used.

The transferdatabase method is analogous to an automated file import/export, coded to run at the click of a button. And contrary to your conception, I don't believe the "master" table has to be deleted. The way I conceive the process, is that the master table would have its own autonumber primary key plus an additional field that would be used to capture and store the sitePrimaryKey. The retention of the sitePrimaryKey in the master table would enable you to distinguish between new records and updates of existing records.
Oct 2 '08 #7
iheartvba
171 100+
Thanks,
Actually there would need to be some deletion otherwise there will be unnessecary duplication. I will go with the transfer database method as it doesn't really matter if there is deletion or not.

Much Appreciated
Oct 2 '08 #8
NeoPa
32,556 Expert Mod 16PB
If the databases are accessible over a network, what about merging the data together on the fly using a query instead. This would assume only read/only access is required of course (for reporting).

I would consider an ACTUAL master database here, at your site, which has no actual data, but simply links to all the required tables of the other databases.

Does this sound like it may fit the bill?
Oct 2 '08 #9
iheartvba
171 100+
That would be absolutley brilliant!

I thought it wasnt possible to merge muiltiple tables with the same table structure into 1 table without using an append query. If what you are saying is that I can merge multiple tables using only a select query that would be excellent.

How would I go about doing that?
Oct 2 '08 #10
iheartvba
171 100+
Wooohooo

Thank you Thank you Thank You!!!

I think the person who invented access should be given a Nobel Prize. It never ceases to amaze me. Wow! A Union Query allows you to merge 2 tables.

Thank You NeoPa
Oct 3 '08 #11
NeoPa
32,556 Expert Mod 16PB
A UNION query would be my first recommendation, but there may be issues with that, particularly if your data comes to many thousands of records.

MS Access struggles to produce the same level of optimisations for tables joined in a UNION. Frankly, unless the volumes are severe I would stick with that, but if that becomes too much of an issue then you can build a temporary table (or some tables) in the local master database and then run your report(s) from that.

You would need to determine the balance of what constitutes the better solution for you. Bear in mind if the latter option becomes necessary, a message to the operator explaining the delay while the building is going on, followed by more responsive reports, is often considered an acceptable way to work.

Good luck with your project anyway :)
Oct 3 '08 #12
NeoPa
32,556 Expert Mod 16PB
How would I go about doing that?
I assumed that you are now happy with this and no longer need a direct response. If this is not the case please let me know.
Oct 3 '08 #13
iheartvba
171 100+
Hi NeoPa,
Sorry about the delayed response. Firstly yes I am happy with the response, I have not been able to configure everything yes so I'm not sure if it is slow or not.

I just don't know how VPN's work, I know how to connect to another computer via VPN but then what? How do I connect the back end of the remote office to the main database?
Oct 8 '08 #14
NeoPa
32,556 Expert Mod 16PB
I think you may have to tell me how VPNs got into the picture.

Virtual Private Networks are a whole subject unto themselves. Depending on how complex that gets we may need to set that up as a new thread in the Networking forum.

I certainly need a better understanding of what you're talking about before I can proceed though. Are VPNs mentioned anywhere already in this thread at all?
Oct 8 '08 #15
iheartvba
171 100+
See Post #6 it has mention of VPN.

I will repeat the situation

There are 3 offices

1 x Main Office With A front End

2 x Branch Offices with Separate Back End's

The Main Office needs to do the following:
1. run reports from data derived from the branch offices
2. Receive payments from clients and then append the branch office databases to mark the invoices as paid at the branch office.

Now I don't really understand how this will work. I don't want to download the Databases everyday using Remote Desktop. I would like to create some sort of a inter office network where the main office Front End can connect to the Branch Office Back Ends and Vise Versa.

Thanks
Oct 9 '08 #16
NeoPa
32,556 Expert Mod 16PB
The fundamental first question then is :
Currently, what links do you have available to the offices from your main office?
Oct 9 '08 #17
iheartvba
171 100+
The fundamental first question then is :
Currently, what links do you have available to the offices from your main office?
1. Internet
A. Download entire database from Remote Desktop
B. have entire Database Emailed to me
2. USB Hard Drive
A. I go to the offices once a week, and I then copy the databases and bring them over.
But I'm confused why is the fundamental question the links between the offices?
Oct 10 '08 #18
NeoPa
32,556 Expert Mod 16PB
It's fundamental because if you, like many do nowadays, had a directly addressable link to the other files though your network, then we would not be looking at getting copies transferred, but at accessing them directly instead.

Now I know that you don't currently have a direct link, we are looking at :
  1. Getting a direct link (VPN) set up.
  2. Getting copies transferred.

I would not consider getting a VPN set up without professional assistance. An IT department may be able to arrange it for you, but someone needs to have good knowledge of what they're doing. Security is extremely important in this day and age, and an inadequately set up VPN could easily compromise that.

Otherwise, you need copies available which always need to be stored in the same (relative) locations.
Oct 10 '08 #19
NeoPa
32,556 Expert Mod 16PB
I've just reread post #16 and it seems you may want to update the remote databases too. If so, this is a far more complicated problem. Is this the case?
Oct 10 '08 #20
iheartvba
171 100+
I've just reread post #16 and it seems you may want to update the remote databases too. If so, this is a far more complicated problem. Is this the case?
Yes thats right, I also need to update the remote databases but even if I can just get the remote office data to the Main office that would be sufficient, it's not essential for me to update the remote databases, I can do that manually.

I still don't understand, how would I go about doing this. Shouldn't I just be able to connect to a VPN, there by creating a Wide Area Interoffice network and connect the main office front end to both the remote office back ends. Please excuse me if I am repeating the same question but I am still genuinley utterly confused.
Oct 11 '08 #21
NeoPa
32,556 Expert Mod 16PB
If you have a working VPN available, then yes. This is perfectly true.

Unfortunately, there is a world of problems (Networking not Access problems) in setting up a VPN safely. I would never personally recommend anyone just try it out for themselves. Maybe there are other networking experts who may feel comfortable with that, but I don't. It's too easy to leave a link into your actual private network accessible by third parties.

What position are you in exactly relative to VPNs in your organisation?
Oct 11 '08 #22
NeoPa
32,556 Expert Mod 16PB
Yes that's right, I also need to update the remote databases but even if I can just get the remote office data to the Main office that would be sufficient, it's not essential for me to update the remote databases, I can do that manually.
With a VPN, both way transfers are possible (feasible even).

Without it, external transfers (of whatever variety) will be necessary. The reporting is relatively straightforward. Updating the remote DBs is a little more complex. Possible, but more fiddly.
Oct 11 '08 #23
iheartvba
171 100+
With a VPN, both way transfers are possible (feasible even).

Without it, external transfers (of whatever variety) will be necessary. The reporting is relatively straightforward. Updating the remote DBs is a little more complex. Possible, but more fiddly.
What I currently do is this:

I generate the required information from the data available in the remote office, that information (query) is then exported to a text file. The text file is manually e-mailed to head office. Then someone at head office downloads the report from their e-mail and imports it into their database. This works fine but it isn't foolproof, if I am just contemplating whether to invest time in making it foolproof, or whether there is a more sensible way of doing what I was trying to do. So if you have any suggetions please provide them


Your Help is Much Appreciated
Oct 12 '08 #24
NeoPa
32,556 Expert Mod 16PB
What position are you in exactly relative to VPNs in your organisation?
That depends fundamentally on your answer to the question above (from post #22).
Oct 12 '08 #25
iheartvba
171 100+
Sorry I just realised I didn't answer that question.

I use Windows XP Professional VPN. We are a small accounting firm and do not have servers in any office, we have peer-to-peer networks in all offices. So all I have done so far is setup the Windows VPN connection in all of our offices, then connected those VPN's, a VPN network connected icon came up near where the clock is on the right hand side of the windows toolbar, showing there is a connection, but I am stuck after that. I thought the computers on the remote office LAN would just show up in my network places.

Just as a note the DNS server Address for the head office and remote office is different so could be that is the problem.
Oct 12 '08 #26
NeoPa
32,556 Expert Mod 16PB
The DNS thing certainly won't help.

This is a networking issue then.

It's good news you have a VPN, but you need to be able to browse to the other offices (at least access them across the network) otherwise it is no help.
Oct 12 '08 #27
iheartvba
171 100+
I will have to dig up some time to play around with this, because i would need to change the DNS server for the main office. Would you be able to refer me to a good forum where I can get more info about accessing remote office computers using windows VPN?

Thanks alot for your help
Oct 13 '08 #28
NeoPa
32,556 Expert Mod 16PB
Have you tried either of our Windows or Networking forums?
Oct 14 '08 #29
iheartvba
171 100+
Just to update, yes I have tried the networking forum, I have continued this question on:

http://bytes.com/answers/networking/...opeer-networks
Nov 24 '08 #30
NeoPa
32,556 Expert Mod 16PB
In that case, I will lock this thread to further posts. Otherwise there is the danger that responses appear in both threads and one will not know of the other.

Good luck with your problem.
Nov 25 '08 #31

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Anshul Seth | last post by:
Hi All, I am currently handling a J2EE application with the Application server as Weblogic 7.0 SP2 and Database on Oracle 9.2.1.0. The client wants to setup a test environment, and as the...
0
by: Jon | last post by:
I have a database called abc-100 which seems to cause problems with replication and importing sql files created with mysqldump. First, if on the master we create a temporary table (because we...
1
by: Uli | last post by:
Dear group, I have to replicate remote data to a SQL Server in the headquarter. The data are on a site which does not have permanent online-connection to the headquarter. I have written a...
5
by: Ken Massey | last post by:
First let me say I'm not interested in replication. I want to sync a target database with a source database at regular intervals (say weekly), but in the intermediate time they may differ. The...
1
by: Andrew Chanter | last post by:
I developed 3 different replicated database applications in MS Access for 3 different corporate clients in Access 97 several years ago to enable data to be shared across wide area networks. I...
1
by: MAILTONRK | last post by:
Hi, I am a Mainframe guy. I am working with MS access(maintaining a application) for the last 2 weeks. I had one master database and four replicas. One of my replica had trouble in...
18
by: Asif | last post by:
Hi all, I am working on portal which is using MS Access 2003 database. The problem that I am facing is that once I received data from vendors I have to upload whole Access Database file to...
3
by: Alex | last post by:
Hello, I am running an Access 2003 database, quite modest in size, that is used by upwards of 5 users. I need to modify the database such that these users can work simultaneously and, in some...
2
by: Query Builder | last post by:
Hi, I have transactional replication set up on on of our MS SQL 2000 (SP4) Std Edition database server Because of an unfortunate scenario, I had to restore one of the publication databases. I...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.