zoukankan      html  css  js  c++  java
  • How to import data from Oracle into PostgreSQL(转)

    In this post, we are going to see how to import Oracle data into PostgreSQL.

    If you have been using an Oracle database and now want to move to an open source alternative, then PostgreSQL is the best choice because not only is it free but it’s also a powerful RDBMS (relational database management system) with over 30 years of active development with a great reputation for performance, stability, and a very active open source community. 

    More information about PostgreSQL can be found here: https://www.postgresql.org/about/.

    There are several ways to import Oracle data into PostgreSQL. Here we will discuss a few of the methods that are well proven and most popular. 

    Method 1: Ora2Pg

    As the name suggests, Ora2Pg is used to migrate Oracle objects into PostgreSQL. This tool will connect to an Oracle database and generate SQL scripts that contain table structures and data that can be executed against PostgreSQL. 

    Some of the features include: 

    • Exports full database schema (such as tables, views including materialized view, sequences, and indexes).
    • Exports specific tables.
    • Exports user-defined functions, triggers, procedures, and packages.
    • Migrates Oracle user-defined types.
    • Supports Oracle BLOB object as BYTEA. 
    • Supports DBLINK as Oracle FDW.
    • Supports SYNONYMS as views. 

    A sample database migration report can be found here: http://ora2pg.darold.net/report.html.

    For more information please visit https://ora2pg.darold.net/start.html.

    Method 2: Oracle foreign data wrappers (Oracle_fdw) 

    PostgreSQL can link to other systems to fetch data via foreign data wrappers (FDWs). When we fire a query (e.g., SELECT)  against a foreign table, the FDW will fetch the result from the external data source and print the output via foreign table.

    Oracle_fdw is used to perform DML operations (SELECT, INSERT, UPDATE, DELETE) on Oracle servers in PostgreSQL, which is covered under the SQL Management of External Data (SQL/MED) standard.

    For more information please visit https://github.com/laurenz/oracle_fdw.

    参考:https://www.enterprisedb.com/postgres-tutorials/how-import-data-oracle-postgresql

  • 相关阅读:
    Hibernate之二级缓存
    Hibernate之HQL
    Hibernate 一对多自关联 多对多
    hibernate关联关系(一对多)
    Hibernate之主键生成策略
    Hibernate01
    struts的图片上传
    HashMap和HashTable本质性的区别
    集合03
    集合
  • 原文地址:https://www.cnblogs.com/Dragonzlx/p/13538449.html
Copyright © 2011-2022 走看看