Sometimes You can get “TNS-12162: TNS:net service name is incorrectly specified ” error.
Details of error are as follows.
TNS-12162: TNS:net service name is incorrectly specified
$ echo $ORACLE_HOME $ echo $ORACLE_SID
If they are not set, then set them as follows.
export ORACLE_HOME=/u01/app/product/12.2.0/dbhome_1 export ORACLE_SID=MSDB
Or you can add the following Oracle environments to the Bash Profile file.
Bash Profile file name may be .bash_profile, .profile or .bashrc files according to OS.
export ORACLE_HOME=/u01/app/product/12.2.0/dbhome_1 export ORACLE_BASE=/u01/app export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:$PATH export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$ORACLE_HOME/lib32 export LIBPATH=$ORACLE_HOME/lib:$ORACLE_HOME/lib32 export ORACLE_SID=MSDB export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:$PATH
This will give the BEQUEATH adapter a route to connect to the Database.
2. Make sure on REMOTE connections to always include a connection string.
When making a connection from on the same server but not in the same ORACLE_HOME, it is required that a connection string containing an ADDRESS and a SERVICE value is included.
This can take the form of a local tnsnames.ora file, an EZCONNECT string, or a centralized LDAP Server.
Do you want to learn more details about RMAN, then read the following articles.
724 views last month, 3 views today