oracle-databaseoracle11goracle19c

is there a way to link oracle 11g and oracle 19c database?


We are migrating from 11g to 19c version. but we want to test if we can trasnfer a specific column from 11g to 19c upon insert.

Question?

is there a way or possible way to Connect Oracle11g and Oracle19c Database

the Scenario is Oracle11g Table1 transfer specific Columns of data to Oracle19c Table2 same column structure for both tables.

for Example:

FROM

Oracle11g

PRODUCT

Product_name product_description
Bolt Metal
Ziptie Plastic

SUPPLIER

Product_name Supplier
Bolt Home Depot
Ziptie Plastic

TO

Oracle19c

PRODUCT WAREHOUSE

Product_name product_description Supplier
Bolt metal Home Depot
Ziptie plastic Home Depot

Solution

  • Yes, you can create a database link:

    Documentation: https://docs.oracle.com/cd/E11882_01/server.112/e41084/statements_5005.htm

    Source: DB 11g Target: DB 19c right?

    So:

    1 - On source you need create a user to dblink connection

    2 - On target you need create an entry on tnsnames.ora pointing do 11g connection.

    3 - on target 19c create dblink pointing to 11g database:

    CREATE DATABASE LINK oracle11g_link CONNECT TO username IDENTIFIED BY password USING 'oracle11g_tns_entry';

    4 - Insert Data using dblink:

    create table test as select * FROM PRODUCT@oracle11g_link ;

    ORRRRRRRRRRRR

    You can use Datapump to export/import the data:

    On source:

    #If you choose export entire schema: expdp "/ as sysdba" schemas=SCHEMANAME dumpfile=test.dmp

    #If you choose export just one or more tables: expdp "/ as sysdba" tables=SCHEMANAME.TABLENAME dumpfile=test.dmp

    Wait export complete and copy the dumpfile to targer server (19c):

    On Target:

    impdp "/ as sysdba" dumpfile=test.dmp

    I hope it helps.