ORA-12162 "TNS:net service name is incorrectly specified" results from improperly setting your ORACLE_SID value.
In Linux, these commands sets ORACLE_HOME and $ORACLE_SID as follows:
ORACLE_HOME=/u01/oracle; export ORACLE_HOME
ORACLE_SID=asdb; export ORACLE_SID
To set these values permanently do this:
As Oracle user…
Add the following at the bottom of the file or append what you have. Paths might need to be altered to match your systm…