2

我需要导出特定对象及其对 DML 的引用,然后另一个应用程序将使用 DML 获取文件并导入它。数据库模式当然是相同的。

是否有一些工具可以做到这一点,或者我必须使用带有选项的 mysql 转储?

我感谢所有的建议

4

4 回答 4

2

您可以使用 Liquibase for DB Change 从一个数据库迁移到具有相同架构的另一个数据库。

它是维护数据库更改的非常棒的工具。

于 2013-02-22T11:26:13.657 回答
1

I know this doesn't directly answer you question, but given the fact that I don't think there is a reliable solution using your desired approach I'll post here.

Have you tried using MySql replication instead to allow the databases to synchronize themselves without having to worry about it at the application layer.

http://dev.mysql.com/doc/refman/5.0/en/replication.html

于 2013-02-24T19:10:57.913 回答
1

请参阅SchemaExport.execute方法。设置输出文件并为除“justCreate”和“justDrop”之外的所有值传递“false”(假设您也对放置脚本感兴趣)。但是,这将为所有实体生成模式。

于 2013-02-24T20:04:33.053 回答
1

你可以看看这个工具,看看它是否满足你的需求:) http://www.ssmstoolspack.com/

于 2013-02-19T21:43:33.450 回答