Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where is Oracle sqlplus located?

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.
like image 368
XoXo Avatar asked Jun 19 '14 13:06

XoXo


2 Answers

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
like image 184
Joshua Huber Avatar answered Sep 25 '22 01:09

Joshua Huber


Usually in $ORACLE_HOME/bin and usually they suggest to run

. oraenv

to prepare your environment.

like image 23
Lajos Veres Avatar answered Sep 25 '22 01:09

Lajos Veres