ORA-12162 TNS :net service name is incorrectly specified error.
ERROR:ORA-12162 TNS :net service name is incorrectly specified error.
Solution:
we need to add the following Oracle environments to the Bash Profile file.
- Go to bash profile.
PATH=$PATH:$HOME/.local/bin:$HOME/bin
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=/u01/app/oracle/product/19.3.0/db_home
export ORACLE_SID=PRIM
export LD_LIBRARY_PATH=\$ORACLE_HOME/lib:/lib:/usr/lib
export CLASSPATH=\$ORACLE_HOME/jlib:\$ORACLE_HOME/rdbms/jlib
PATH=$PATH:$HOME/.local/bin:$ORACLE_HOME/bin
export PATH