Connect to Oracle Database Running in Linux

_____________________________________________________________________________________________________________________

The Eucharistic Miracles of the World
Step 1. Identify the database running in the server
[oracle@TESTBOX exp]$ ps -ef|grep pmon|grep -v grep
oracle   25167     1  0 Jul18 ?        00:00:10 ora_pmon_cdb


Step 2. Identify the ORACLE_HOME path and set it PATH variable.

grep cdb /etc/oratab
cdb:/u01/app/oracle/product/19.0.0/dbhome_1:N

export ORACLE_HOME=/ u01/app/oracle/product/19.0.0/dbhome_1
export PATH=$PATH:$HOME_HOME/bin
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib 

Step 3. Check sqlplus command working or not

[oracle@TESTBOX exp]$ sqlplus / as sysdba
Error 6 initializing SQL*Plus
SP2-0667: Message file sp1<lang>.msb not found
SP2-0750: You may need to set ORACLE_HOME to your Oracle software directory


Step 4. Set ORACLE_SID

oracle@TESTBOX exp]$ export ORACLE_SID=cdb

Step 5. Test the connectivity

[oracle@TESTBOX exp]$ sqlplus / as sysdba

SQL*Plus: Release 19.0.0.0.0 - Production on Mon Jul 20 03:48:46 2020
Version 19.3.0.0.0

Copyright (c) 1982, 2019, Oracle.  All rights reserved.


Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0

_____________________________________________________________________________________________________________________

0 comments:

Post a comment

 

acehints.com Copyright 2011-20 All Rights Reserved | Site Map | Contact | Disclaimer