Skip to Main Content
  • Questions
  • Strange Behaviour with Oracle_Home and trailing slash


Dev Live Dev Intro

This month we are celebrating Developers at AskTOM. We welcome Developers of all levels of experience to join us at our FREE Developer Live events coming in August. Just click on the left to register today! If you are brand new to Database Technology, then we also have got you covered. Just click on the right for your comprehensive FREE training program to kick start your Oracle Database Development journey!

Question and Answer

Connor McDonald

Thanks for the question, Mickael.

Asked: May 20, 2020 - 6:20 am UTC

Answered by: Connor McDonald - Last updated: May 22, 2020 - 12:51 am UTC

Category: Database Administration - Version: 19.3

Viewed 100+ times

You Asked


I have a server hosting several instances based on the same oracle engine 19.3 (
As an example, let's consider DB1 and DB2.
We connect to the server with a user account member of dba group.
In the same user session :
export ORACLE_HOME=/oracle/product/
sqlplus system/*******@DB1 ==> works
sqlplus system/*******@DB2 ==> TNS Lost contact error

# Changing ORACLE_HOME value :

export ORACLE_HOME=/oracle/product/ (with a / at the end)
sqlplus system/*******@DB1 ==> TNS Lost contact error
sqlplus system/*******@DB2 ==> works

I work in the same user user. The only context value modified is ORACLE_HOME.
ORACLE_HOME is the mount point of a filesystem (not a symlink etc... )

Both DBs are declared correctly in the tnsnames.ora:
DB1 =
    (ADDRESS = (HOST = dbserver)(PROTOCOL = TCP)(PORT = 1587))
      (SID = DB1)
      (SERVICE_NAME = DB1)

DB2 =
    (ADDRESS = (HOST = dbserver)(PROTOCOL = TCP)(PORT = 1587))
      (SID = DB2)
      (SERVICE_NAME = DB2)

I don't have any issue to connect remotly these 2 instances.

Do you have any where this can come from ?

Best regards,

and we said...

Trailing slashes are something you don't want to have :-)

In the instance above, it is likely that one of the databases (DB2) was *started* with ORACLE_HOME set to the trailing slash, and the other one (DB1) was not.

- Stop DB2
- Correct the ORACLE_HOME
- Start DB2

and hopefully things should sort themselves out

More to Explore


Need more information on Administration? Check out the Administrators guide for the Oracle Database