Thursday 2 July 2020

SQL Client Installation on Linux machine

Solution:

1. Install below two RPMs

    oracle-instantclient12.2-basic-12.2.0.1.0-1.x86_64.rpm

    oracle-instantclient12.2-sqlplus-12.2.0.1.0-1.x86_64.rpm

 

2. Create the SQL.env file using below

 

ORACLE_HOME=/usr/lib/oracle/12.2/client64

PATH=$ORACLE_HOME/bin:$PATH

LD_LIBRARY_PATH=$ORACLE_HOME/lib

export ORACLE_HOME

export LD_LIBRARY_PATH

export PATH

 

3. Source the SQL.env file


4. Connection can be established using either SID/SERVICE name as below

  • Connect using SERVICE name: sqlplus "username/password@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST= <hostname>)(PORT=1531))(CONNECT_DATA=(SERVICE_NAME=<SERVICE_NAME>)))"
  • Connect using SID name: sqlplus "username/password@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST= <hostname>)(PORT=1531))(CONNECT_DATA=(SID=<SID_NAME>)))"
Note: To use the import/export utility on instant client install rpm oracle-instantclient12.2-tools-12.2.0.1.0-1.x86_64.rpm

No comments:

Post a Comment

Oracle : Database Startup Time

 Oracle Instance Startup Time SET LINES 2000 SET PAGES 9999 COLUMN INSTANCE_NAME FOR A20 SELECT     instance_name,     to_char(startup_time,...