简体   繁体   English

如何仅使用 Oracle 工具将数据库(或仅表)从 PostgreSQL 迁移(转换)到 Oracle?

[英]How to migrate(convert) database(or just tables) from PostgreSQL to Oracle using only Oracle tools?

Data was sent to our company with PostgreSQL, but we are prohibited to use the tools of PostgreSQL, permitted the use of only Oracle.数据以 PostgreSQL 发送到我公司,但我们禁止使用 PostgreSQL 的工具,仅允许使用 Oracle。

How to migrate data from PostgreSQL to Oracle without using a third party application(they are also prohibited)?如何在不使用第三方应用程序的情况下将数据从 PostgreSQL 迁移到 Oracle(也被禁止)? You can only use the tools of Oracle.您只能使用 Oracle 的工具。

I found this article https://support.oracle.com/knowledge/Oracle%20Database%20Products/2220826_1.html but we don't have Support Identifier我找到这篇文章https: //support.oracle.com/knowledge/Oracle%20Database%20Products/2220826_1.ZFC35FDC70D5FC69D2639883A822C7

We have one .sql file.我们有一个.sql文件。 It weighs 8 Gigabytes.它重 8 GB。

It looks like you have so many impediments in your company.看起来你的公司有很多障碍。 Regarding Oracle's SQL Developer Migration Workbench, unfortunately it does not support the migration of PostgreSQL databases.关于Oracle的SQL Developer Migration Workbench,很遗憾它不支持PostgreSQL数据库的迁移。 However, the following 3rd-party software tools are available and may assist in migration, but I am afraid you cannot use them as you said that those products are forbidden:但是,以下 3rd-party 软件工具可用并且可能有助于迁移,但恐怕您不能使用它们,因为您说这些产品是被禁止的:

http://www.easyfrom.net/download/?gclid=CNPntY36vsQCFUoqjgodHnsA0w#.VRBHKGPVuRQ http://www.sqlines.com/postgresql-to-oracle http://www.easyfrom.net/download/?gclid=CNPntY36vsQCFUoqjgodHnsA0w#.VRBHKGPVuRQ http://www.sqllines.com/postgresql-to-oracle

Other options will only move the data from your Postgresql database to Oracle database, it means that you must have the DDLs of the tables before to run the import:其他选项只会将数据从 Postgresql 数据库移动到 Oracle 数据库,这意味着您必须在运行导入之前拥有表的 DDL:

  • To move data only, you can generate a flat file of the the PostgreSQL data and use Oracle SQL*Loader.要仅移动数据,您可以生成 PostgreSQL 数据的平面文件并使用 Oracle SQL*Loader。
  • Another option to migrate data only is to use Oracle Database Gateway for ODBC which requires an ODBC driver to connect to the PostreSQL database, and copy each table over the network using sqlplus "COPY" or "CREATE TABLE AS SELECT" commands via oracle database link. Another option to migrate data only is to use Oracle Database Gateway for ODBC which requires an ODBC driver to connect to the PostreSQL database, and copy each table over the network using sqlplus "COPY" or "CREATE TABLE AS SELECT" commands via oracle database link .

Also, Oracle has discussion forum for migrating non-oracle databases to Oracle.此外,Oracle 有将非 Oracle 数据库迁移到 Oracle 的论坛。

http://www.oracle.com/technetwork/database/migration/third-party-093040.html http://www.oracle.com/technetwork/database/migration/third-party-093040.html

But, if you have only a sql file, you should look at it to see whether you have both DDLs ( create tables and indexes, etc ) and the data itself as insert statements.但是,如果您只有一个 sql 文件,您应该查看它,看看您是否同时拥有 DDL(创建表和索引等)和数据本身作为插入语句。 If so, you need to split it and treat the DDLs to convert the original data types to Oracle datatypes.如果是这样,您需要将其拆分并处理 DDL 以将原始数据类型转换为 Oracle 数据类型。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM