DBink between on-prem and Autonomous Database

DBink between on-prem and Autonomous Database

Scenario: Establish a DBLink between On-Prem Database and Autonomous Database in OCI

Source: RAC database in Virtualbox (Simulating On-Prem Setup)

Target: OWLSDB - Autonomous Transaction Processing

Steps Involved:

  1. Download the ADB wallet to Source server
  2. Create a DBLink in Source DB
  3. Test the connectivity

The wallet files can be downloaded from Service COnsole -> Administration -> Download Client Wallet

Once the downloaded wallet file is unzipped, we can create the DB link:

SQL>  select name,open_mode from v$database;

NAME      OPEN_MODE
--------- --------------------
RAC       READ WRITE

SQL> select instance_number,instance_name,host_name from gv$instance;

INSTANCE_NUMBER INSTANCE_NAME    HOST_NAME
--------------- ---------------- --------------------------------------------------
              1 rac1             srv1.localdomain

SQL> select * from dba_db_links;

no rows selected


SQL> create database link autonomousdb_owlsd
connect to ADMIN identified by "Luffy_is_Nika"
using '(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=adb.some_region.oraclecloud.com))
(connect_data=(service_name=gf0a9e772bb7d89_owlsdb_high.adb.oraclecloud.com))
(security=(my_wallet_directory=/home/oracle/wallet/1)
(ssl_server_cert_dn="Get_this_from_TNSNAMES.ORA")))'
        

Testing:

SQL> select * from global_name@autonomousdb_owlsdb;

GLOBAL_NAME
---------------------------------------------------------------------------
GF0A9E772BB7D89_OWLSDB

SQL> select * from pytest@autonomousdb_owlsdb;

        ID NAME
---------- ----------
         1 Owl
        

References:


To view or add a comment, sign in

More articles by Rohith Solomon

  • Certified Kubernetes Security Specialist - 2022

    Exam Experience: Again, I hate the PSI checks and the setup. It strains your eye considering you can't use extra…

    2 Comments
  • Certified K8s Admin

    Exam Date: 27-AUG-2022 Exam Prep Plan: Course: https://www.udemy.

  • Chaos Engineering

    I first heard about Chaos Engineering when I read an article on Netflix's Chaos Monkey. The purpose of Chaos Monkey:…

  • Accessing data between two Autonomous Databases using DBLinks

    Scenario Setup: Source: OWLSDB - Autonomous Transaction Processing Target: OWLSDB2 - Autonomous Transaction Processing…

Explore content categories