oracle 从 TSQL 到 PL/SQL 的迁移工具?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/3140771/
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
Migration tool from TSQL to PL/SQL?
提问by elifiner
We need to migrate our database from MSSQL to Oracle and we have over 100 stored procedures written in PL/SQLTSQL. I know its a long shot, but has anybody ever successfully used an automatic migration tool to do the work? I've seen some tools on the web, but I have no way to judge their ability to handle various code. Any personal experience in the matter would help.
我们需要将我们的数据库从 MSSQL 迁移到 Oracle,我们有 100 多个用PL/SQLTSQL编写的存储过程。我知道这是一个漫长的过程,但是有没有人成功地使用过自动迁移工具来完成这项工作?我在网上看到了一些工具,但我无法判断它们处理各种代码的能力。在这方面的任何个人经验都会有所帮助。
采纳答案by Will Marcouiller
- SwisSQL - SQL Server to Oracle Migration Tool 3.5;
- tsql to pl sql;
- Convert SQL Server T-SQL to Oracle PL/SQL (syntax and equivalences);
However, there are some optimisation that may be required to perform after the conversion is done. So, you should consider revising the conversion after it is done.
但是,在转换完成后可能需要执行一些优化。因此,您应该考虑在完成后修改转换。
EDIT #1
编辑#1
Another interesting tool would be:
另一个有趣的工具是:
Spectral Core's Full Convert Enterprise
Do you have experience with any of them?
你有与他们相处的经验吗?
Unfortunately not. I have just performed conversions to SQL Server using SSIS.
不幸的是没有。我刚刚使用 SSIS 执行了到 SQL Server 的转换。
EDIT #2
编辑#2
There seems to be a more appropriate tool directly from Oracle that I would better trust.
似乎有一个更合适的直接来自 Oracle 的工具,我更愿意相信它。
Directly from Oracle: Migrating from Microsoft SQL Server to Oracle
直接从 Oracle:从 Microsoft SQL Server 迁移到 Oracle
And the core features:
以及核心功能:
SQL Developer Migration technology supports the following core features when migrating from Microsoft SQL Server:
从 Microsoft SQL Server 迁移时,SQL Developer Migration 技术支持以下核心功能:
- Automatically converts column data types to appropriate Oracle data types.
- Automatically resolves object name conflicts, such as conflicts with Oracle reserved words.
- Parses and transforms T-SQL stored procedures, functions, triggers, and views to Oracle PL/SQL.
- Provides advanced customization capabilities such as the ability to change data type mappings, delete and rename objects.
- Generates reports about the status of the migration.
- Generates the DDL scripts for the creation of the destination Oracle database.
- Generates scripts for data movement
Displays informational, error, and warning messages about the migration in a progress window.
- So, I would suggest that you look out everything in details that is not above-mentionned;
- Take a good look to the information details provided by the tool;
- Test your stored procedures after they are converted.
- 自动将列数据类型转换为适当的 Oracle 数据类型。
- 自动解决对象名称冲突,例如与 Oracle 保留字的冲突。
- 将 T-SQL 存储过程、函数、触发器和视图解析并转换为 Oracle PL/SQL。
- 提供高级自定义功能,例如更改数据类型映射、删除和重命名对象的能力。
- 生成有关迁移状态的报告。
- 生成用于创建目标 Oracle 数据库的 DDL 脚本。
- 为数据移动生成脚本
在进度窗口中显示有关迁移的信息、错误和警告消息。
- 因此,我建议您仔细查看上述未提及的所有内容;
- 好好看看工具提供的信息详情;
- 在转换后测试您的存储过程。
If you take a look as what SQL Server doesn't offer in comparison to Oracle, these are points where I would look first. In order to know these differences, follow the 3. Convert SQL Server T-SQL to Oracle PL/SQL (syntax and equivalences)
link above.
如果您看看与 Oracle 相比 SQL Server 没有提供什么,这些是我首先要看的地方。要了解这些差异,请点击3. Convert SQL Server T-SQL to Oracle PL/SQL (syntax and equivalences)
上面的链接。
回答by Jeff Maass
I would suggest doing it by hand. First, to me, personally, a 100 doesn't sound too bad at all. I'd bet that your development follows patterns - using getutcdate() instead of current_timestamp, etc. This means, there probably are a few very repetitive problems that you and your team will be able to learn from. To me, this will hold the added benefit of teaching you PL/SQL nuances/extensions, which you'll probably need to learn in order to maintain / expand the new system.
我建议手工做。首先,就我个人而言,100 听起来一点也不差。我敢打赌,您的开发遵循模式 - 使用 getutcdate() 而不是 current_timestamp 等。这意味着,您和您的团队可能会从中学习一些非常重复的问题。对我来说,这将带来教你 PL/SQL 细微差别/扩展的额外好处,你可能需要学习这些才能维护/扩展新系统。
Good luck!
祝你好运!
回答by Diego
In the past I tried to do the opposite, but I'm afraid there's no 100% reliable way. Some features are unique to each RDBMS and can't be replicated by a tool (for example IDENTITY fields in SQL Server vs Sequences in Oracle). Considering that, at the end, I had to review each Stored Procedure to ensure it does what it's supposed to do, I realized it was better to plan a manual port and learn some PL/SQL while doing it.
过去我试图做相反的事情,但恐怕没有 100% 可靠的方法。有些特性是每个 RDBMS 独有的,不能被工具复制(例如 SQL Server 中的 IDENTITY 字段与 Oracle 中的序列)。考虑到最后,我必须检查每个存储过程以确保它完成它应该做的事情,我意识到最好计划一个手动移植并在做的时候学习一些 PL/SQL。