How to find the ORACLE_HOME path for Oracle DB 10g

Login to the server which you have the DB installed on
[bash]sqlplus /nolog #login to SQL*Plus console[/bash]
From SQL*Plus console:
[sql]conn user/pass as sysdba
var ohp varchar2(100);¬† –set a variable ‘ohp’
exec dbms_system.get_env(‘ORACLE_HOME’, &#58ohp) ; –call the get_env system-procedure
print ohp; –prinout the result[/sql]

You should then see an output print of the ORACLE_HOME path for the DB installed:



how to start an Oracle Database and em console (10g)

Starting an Oracle Database and EM console (10g)

login/su as the user who installed the oracle software (i.e. oracle)
wins: [bash]set ORACLE_SID=sid_name  #the name SID given when creating database[/bash]
linx: [bash]export ORACLE_SID=sid_name
sqlplus /nolog #just log onto the sqlplus console
connect user/passw as sysdba #log-in as a sysdba with user | default: system/manager
#output: Connected to an idle instance. (within SQL console)
startup #to startup the DB
exit #to commit, disconnect and log-off from db-console
lsnrctl status #to show the status of the listener ( may need ./lsnrctl)
lsnrctl start #to start the listener, based on the SID set above
#output: The command completed successfully
emctl start dbconsole #to start the Oracle Enterprise Manager console (web)
#output: ….started.[/bash]


  • listener.ora //the file that has the connection info for DBs
    path: /u01/app/oracle/product/11.2.0/db_1/network/admin/listener.ora
    (or wherever the oracle DB product was installed)

Problems initializing:

  • Shutdown and restart both database(sqlplus) and listener(linx shell)
  • Try deleting and re-creating the database again (if this is a newly created db with no data, else BACK-IT-UP first!!!)


useful SQL-Plus commands via a Lunix shell/Windows cmd

In bash/shell:
[bash]sqlplus /nolog #just log onto sqlplus console
connect as sysdba #connect as sysdba and prompt for login
connect user/passw as sysdba #log-in as a sysdba with user | default: system/manager[/bash]

In <bash><sql>:
[sql]startup –startup a database
shutdown –shutdown a database
exit –disconnect from sqlplus
SELECT * FROM NLS_SESSION_PARAMETERS; –query nls_lang params of session user
SELECT * FROM NLS_DATABASE_PARAMETERS; –query nls_lang params of database user