I'm trying to find my listener.ora file to edit it, but the docs say it's in the ORACLE_HOME directory, but where is that?

I'm running 12.1.0 on Windows Server 2008

  • Windows - start the universal installer - click "Intalled Products" then the "Environment" tab.
    – user194056
    Commented Oct 29, 2019 at 16:22

4 Answers 4


Open up a command prompt

Start -> Run -> "cmd.exe"

Start sqlplus as administrator

sqlplus / as sysdba

There's a system stored procedure called get_env for retrieving the value for ORACLE_HOME, thanks Sabdar Syed for the query.

SQL > var OHM varchar2(100);
SQL > EXEC dbms_system.get_env('ORACLE_HOME', :OHM) ;

Should return a path like this:


  • Won't work if env var is undefined. Commented May 14, 2021 at 7:13
  • So ORACLE_HOME is actually the home of an oracle product?
    – Marinos An
    Commented Jun 16, 2021 at 21:19
  • C:\app\Administrator\product\21c\homes\OraDB21Home1
    – Vy Do
    Commented Jan 10, 2023 at 9:34

On Windows platform you can find oracle_home path in the registry.

Run regedit, then navigate to:

hkey local machine/software/oracle

Under oracle folder in the registry you will find something like:


There you can see oracle_home variable.


On cmd, type echo %ORACLE_HOME%. If ORACLE_HOME is set it will return you the path or else it will return %ORACLE_HOME%.

  • What's the default if the env var is undefined? Commented May 14, 2021 at 7:13
  • Start regedit (search for it from the Start menu)
  • Open the HKEY_LOCAL_MACHINE folder
  • Open the Oracle folder
  • Open a folder called ORACLEMTSR
  • Open the setup folder
  • Access to the current version

There you will find a "file" called HOME; open it and you will see where Oracle was installed.

  • At a guess, you've left out SOFTWARE under HKEY_LOCAL_MACHINE (on my machine, the items under HKEY_LOCAL_MACHINE are all generic, and there's only 6 of them - I'd expect Oracle's registry entry to be in SOFTWARE). Also, I suspect that ORACLEMTSR might actually be ORACLEMSTR (though I'm not sure, as I don't have an Oracle install handy to check). Could you double-check, to make sure the answer is in fact complete and correct?
    – RDFozz
    Commented Oct 28, 2017 at 0:09
  • 1
    Powershell single-liner: (Get-ItemProperty -Path "Registry::$((Get-ChildItem -Path HKLM:\SOFTWARE\ORACLE | Where-Object {$_.Property -eq "ORACLE_HOME"}).Name)").ORACLE_HOME. For 32-bit Oracle client on a 64-bit Windows, -Path HKLM:\SOFTWARE\WOW6432Node\ORACLE needs to be used. Commented May 14, 2021 at 8:05

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