[英]Combine several mssql database to one mysql with php
We are handling a data aggregation project by having several microsoft sql server databases combining to one mysql database. 我们正在通过将多个Microsoft sql服务器数据库合并到一个mysql数据库来处理数据聚合项目。 all mssql database have the same schema. 所有mssql数据库都具有相同的架构。
The requirements are : 要求是:
before being able to import each record to mysql we need to validates each records with a specific createrias via php. 在能够将每个记录导入mysql之前,我们需要通过php使用特定的createrias验证每个记录。
each imported mssql database can be rollbacked. 每个导入的mssql数据库都可以回滚。 It means even it already imported to mysql, all the mssql database can be removed from the mysql. 这意味着即使已经将其导入到mysql,也可以从mysql中删除所有mssql数据库。
we would still like to know where does each record imported to the mysql come from what mssql database. 我们仍然想知道导入到mysql的每条记录从哪里来的mssql数据库。
All import process will be done with PHP . 所有导入过程都将使用PHP完成。
we have difficulty in many aspects. 我们在很多方面都有困难。 we don't know what is the best approach to solve our problem. 我们不知道解决问题的最佳方法是什么。
your help will be highly appreciated. 非常感谢您的帮助。
ps: each mssql database has around 60 tables and each table can have a few hundred thousands . ps:每个mssql数据库大约有60个表,每个表可以有几十万个。
Don't use PHP as a database administration utility. 不要将PHP用作数据库管理实用程序。 Any time you build a quick PHP script to transfer records directly from one database to another, you're going to cause yourself a world of hurt when that script becomes required for production operation. 每当您构建一个快速的PHP脚本以将记录直接从一个数据库直接传输到另一个数据库时,当生产操作需要该脚本时,就会给自己造成很大的伤害。
You have a number of problems that you need solved: 您有许多需要解决的问题:
The solution? 解决方案?
At this point you have two options left: 至此,您还有两个选择:
Hope this helps. 希望这可以帮助。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.