数据库复制问题 [英] Database Replication Issue

查看:69
本文介绍了数据库复制问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我已经有3个数据库在运行:

A.它们都有相同的表和相同的结构

B.没有1个主表,它们都是单独的表


我想要做的是将它们合并到1个主表中以便能够生成报告等。追加查询是不够的因为某些字段在orginial数据库中得到更新。


我已经研究过数据库复制,我认为它会起作用。我考虑过以下方法:


1.将所有数据合并到1个表中

2.创建3个副本'

使用此方法的问题:


1.每个数据库将填充来自其他2个不需要的数据库的数据。


有没有办法解决这个问题,因为如果我从其他2个表中删除数据,那么复制向导是不是要从Master中删除那些数据呢?


最好的问候

解决方案

在我看来,复制绝对不是你想要实现的目标。相反,我建议使用以下链接中讨论和说明的DoCmd.TransferDatabase方法:

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

http://www.blueclaw-db.com/transferdatabase-docmd.htm


您似乎使用术语数据库和表互换。这两个词绝对没有相同的含义。


因此,如果不做出假设,很难清楚地理解这个问题,我宁愿留给那些不要做的人。不知道更好;)


PS。如果听起来像我可能指的是pDog,我可以断然说我不是。



你似乎使用这些条款"数据库"和表互换。这两个词绝对没有相同的含义。


因此,如果不做出假设,很难清楚地理解这个问题,我宁愿留给那些不要做的人。不知道更好;)


PS。如果听起来像我可能指的是pDog,我可以断然说我不是。



Adrian,

哈哈!当我回答这个问题时,似乎很清楚OP只是想将具有相同表结构的外部数据库中的数据整合到主表中以用于报告目的。


pDog


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

解决方案

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


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.


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


这篇关于数据库复制问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆