自动 Oracle 模式迁移工具

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/1296835/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-18 18:49:33  来源:igfitidea点击:

Automated Oracle Schema Migration Tool

oracleschemamigration

提问by Dave Jarvis

What are some tools (commercial or OSS) that provide a GUI-based mechanism for creating schema upgrade scripts? To be clear, here are the tool responsibilities:

有哪些工具(商业或 OSS)提供基于 GUI 的机制来创建模式升级脚本?需要明确的是,以下是工具职责:

  • Obtain connection to recent schema version (called "source").
  • Obtain connection to previous schema version (called "target").
  • Compare all schema objects between source and target.
  • Create a script to make the target schema equivalent to the source schema ("upgrade script").
  • Create a rollback script to revert the source schema, used if the upgrade script fails (at any point).
  • Create individual files for schema objects.
  • 获取与最近模式版本(称为“源”)的连接。
  • 获取与先前模式版本(称为“目标”)的连接。
  • 比较源和目标之间的所有架构对象。
  • 创建一个脚本,使目标模式等同于源模式(“升级脚本”)。
  • 创建回滚脚本以恢复源架构,在升级脚本失败时使用(在任何时候)。
  • 为架构对象创建单独的文件。

The software must:

该软件必须:

  • Use ALTER TABLE instead of DROP and CREATE for renamed columns.
  • Work with Oracle 10g or greater.
  • Create scripts that can be batch executed (via command-line).
  • Trivial installation process.
  • (Bonus) Create scripts that can be executed with SQL*Plus.
  • 对重命名的列使用 ALTER TABLE 而不是 DROP 和 CREATE。
  • 使用 Oracle 10g 或更高版本。
  • 创建可以批量执行的脚本(通过命令行)。
  • 简单的安装过程。
  • (奖励)创建可以用 SQL*Plus 执行的脚本。

Here are some examples (from StackOverflow, ServerFault, and Google searches):

以下是一些示例(来自 StackOverflow、ServerFault 和 Google 搜索):

Software that does not meet the criteria, or cannot be evaluated, includes:

不符合标准或无法评估的软件包括:

  • TOAD
  • PL/SQL Developer- Invalid SQL*Plus statements. Does not produce ALTER statements.
  • SQL Fairy- No installer. Complex installation process. Poorly documented.
  • DBDiff- Crippled data set evaluation, poor customer support.
  • OrbitDB- Crippled data set evaluation.
  • SchemaCrawler- No easily identifiable download version for Oracle databases.
  • SQL Compare- SQL Server, not Oracle.
  • LiquiBase- Requires changing the development process. No installer. Manually edit config files. Does not recognize its own baseUrl parameter.
  • 蟾蜍
  • PL/SQL Developer- 无效的 SQL*Plus 语句。不产生 ALTER 语句。
  • SQL Fairy- 没有安装程序。安装过程复杂。记录不佳。
  • DBDiff- 残缺的数据集评估,糟糕的客户支持。
  • OrbitDB- 残缺的数据集评估。
  • SchemaCrawler- Oracle 数据库没有易于识别的下载版本。
  • SQL 比较- SQL Server,而不是 Oracle。
  • LiquiBase- 需要改变开发过程。没有安装程序。手动编辑配置文件。无法识别其自己的 baseUrl 参数。

The only acceptable crippling of the evaluation version is by time. Crippling by restricting the number of tables and views hides possible bugs that are only visible in the software during the attempt to migrate hundreds of tables and views.

评估版本唯一可以接受的削弱是时间。通过限制表和视图的数量来削弱可能的错误,这些错误仅在尝试迁移数百个表和视图期间在软件中可见。

采纳答案by David Atkinson

Schema Compare for Oracleshould meet your requirements. This can be downloaded here:

Oracle 模式比较应该满足您的要求。这可以在这里下载:

http://www.red-gate.com/products/schema_compare_for_oracle/index.htm

http://www.red-gate.com/products/schema_compare_for_oracle/index.htm

回答by dlamblin

Have you looked at the official tool(more meta link) for this? Called Oracle Migration Workbench.

您是否查看过官方工具(更多元链接)?称为Oracle 迁移工作台

回答by dlamblin

I don't think SQLDeveloper is the way to go. It is great for migrating between different databases, not the incremental changes to a data model.

我不认为 SQLDeveloper 是要走的路。它非常适合在不同数据库之间迁移,而不是对数据模型进行增量更改。

回答by Mark Harrison

Toad for Oraclewith the DBA module does all of this quite nicely with the exception of the rollback script.

除了回滚脚本之外,带有 DBA 模块的Toad for Oracle可以很好地完成所有这些工作。

回答by Mark Harrison

cx_OracleTools

cx_Oracle工具

If you don't mind command-line oriented tools this open source package will do what you require, with the exception of generating rollback scripts.

如果您不介意面向命令行的工具,这个开源包将满足您的需求,但生成回滚脚本除外。

ExportObjects[options]

导出对象[选项]

Export all of the objects in a schema as a set of directories named after the type of object containing a set of files named after the object itself.

将模式中的所有对象导出为一组以对象类型命名的目录,其中包含一组以对象本身命名的文件。

GeneratePatch[options] FROMDIR TODIR

GeneratePatch[选项] FROMDIR TODIR

Generates a patch for differences in objects in two directories (which may have been created with ExportObjects) and ensures that the patch script can be executed without fear of encountering errors because of dependencies between objects.

为两个目录(可能是用ExportObjects创建的)中的对象差异生成补丁,并确保可以执行补丁脚本而不必担心因为对象之间的依赖关系而遇到错误。

http://cx-oracletools.sourceforge.net/

http://cx-oracletools.sourceforge.net/