I have to restart a database, but it seems, it has not been start by the good process:

ps -ef | grep smon | grep mydb
oracle 54621  1 0 2021 ?    00:10:55 ora_smon_mydb

. oraenv
ORACLE_SID = [oracle] ? mydb
The Oracle base has been set to /product/oracle/1120

sqlplus / as sysdba
SQL*Plus realease Prodction
connected to an idle instance

So how to know how the process has been started to stop it properly?

  • Sounds like ORACLE_HOME might not be set correctly.
    – pmdba
    Jan 12 at 13:42
  • I set the ORACLE_HOME properly but maybe the guy who start the db not. So the trick is maybe how to find the ORACLE_HOME set by the active process?
    – eliatou
    Jan 12 at 14:58

1 Answer 1


Below command shows you the ORACLE_HOME used for that process.

strings /proc/54621/environ | grep ORACLE_HOME

Sometimes people add an unnecessary slash to the ORACLE_HOME, for example they use /product/oracle/1120/db_1/ instead of /product/oracle/1120/db_1, which may cause the above issue.

  • Nice and easy solution! I just did a ls -l /proc/54621 to see the Oracle_home who started the process!
    – eliatou
    Jan 12 at 21:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.