Oracle connection manager


Connection manager is working as oracle SQL*NET proxy and firewall.
In this example, I am using Connection Manager of Oracle Database 12c Release 2 running on Linux x86_64

Footprint

Storage: 1.7 G
Memory: 5~28.4 MB

Requires:

Installation of Oracle Client in a separated folder than the database software
Register the connection manager in the grid infrastructure as a cluster resource


Configure and install on the intermediate host

Download Oracle Database 12c Release 2 Client
unzip linuxx64_12201_client.zip
Change response file /client/response/client_install.rsp:
UNIX_GROUP_NAME=
INVENTORY_LOCATION=
ORACLE_HOME=
ORACLE_BASE=
oracle.install.client.installType=Custom
oracle.install.client.customComponents=oracle.network.cman:12.2.0.1.0
Start silent installation:
cd /client
./runInstaller -silent -responseFile /client/response/client_install.rsp -ignoreSysPrereqs -ignorePrereq -noconfig -waitforcompletion -force -showProgress
run root.sh
sudo /oracle/product/12.2.0.1/client/root.sh

copy a sample file of connection manager
cp /network/admin/samples/cman.ora /network/admin/

edit the file /network/admin/cman.ora:

replace with current hostname (intermediate host)
replace with connection manager port
replace with log directory 
replace with trace directory

set the following environment variables
ORACLE_HOME=/oracle/product/12.2.0.1/client
PATH=$ PATH:$ORACLE_HOME/bin
LD_LIBRARY_PATH=$ORACLE_HOME/lib

Starting the connection manager

cmctl startup

Stopping the connection manager

cmctl shutdown [abort]

Register the connection manager as a resource in grid infrastructure or as a daemon in the Operating system.

configure and install the client

on the endpoint machine, i.e the client machine we have just to change the tnsnames.ora (or the OCI connection string)

original:

db_alias =
  (DESCRIPTION=
    (ADDRESS=
      (PROTOCOL=TCP)(HOST=DatabaseHost)(PORT=DatabasePort)
    )
    (CONNECT_DATA=
      (SERVICE_NAME=DatabaseService)
    )
  )

New:

db_alias =
  (DESCRIPTION=
    (SOURCE_ROUTE=YES)
    (ADDRESS=
      (PROTOCOL=TCP)(HOST=ConnectionManagerHost)(PORT=ConnectionManagerPort)
    )

    (ADDRESS=
      (PROTOCOL=TCP)(HOST=DatabaseHost)(PORT=DatabasePort)
    )
    (CONNECT_DATA=
      (SERVICE_NAME=DatabaseService)
    )
  )
As long as the connection manager is up and working, we can make the connection and stay connected.

Comments

Popular posts from this blog

Silent Installation

Data Guard - Changing IP Addresses

Fixing & Registering ORACLE_HOMES in Central Inventory