Where is Oracle sqlplus located?

Xiao picture Xiao · Jun 19, 2014 · Viewed 31.8k times · Source

Background

Coming from a mysql background, I find getting started with Oracle quite a different experience.

Question

Where do I find this command tool for Oracle?

I have checked wikipedia and it only says:

An Oracle programmer in the appropriately configured software environment can launch SQL*Plus

And it's not in the PATH on my Windows:

C:\Users\jeff>sqlplus
'sqlplus' is not recognized as an internal or external command,
operable program or batch file.

Answer

Joshua Huber picture Joshua Huber · Jun 19, 2014

You can locate the sqlplus executable in Windows by running in a CMD shell

dir /s /b c:\sqlplus.exe

Suppose you find the file at

c:\oracle\product\11.2.0\client_1\bin\sqlplus.exe

Then you have determined that your ORACLE_HOME is:

c:\oracle\product\11.2.0\client_1

Assuming the above ORACLE_HOME, set your environment variables (Control Panel > System > Environment Variables). Below is example, so modify these to match the ORACLE_HOME you determined above.

ORACLE_HOME=c:\oracle\product\11.2.0\client_1

TNS_ADMIN=c:\oracle\product\11.2.0\client_1\network\admin

PATH=  *(add this below the end of your PATH)*
         ;c:\oracle\product\11.2.0\client_1\bin