Home » SQL & PL/SQL » Client Tools » Setting of ORACLE_HOME & SID (Oracle 10 G)
Setting of ORACLE_HOME & SID [message #602902] Tue, 10 December 2013 05:08 Go to next message
aliawan41
Messages: 10
Registered: December 2013
Location: lahore
Junior Member
Whenever i start sqlplus i have to set ORACLE_HOME and ORACLE_SID parameters.kindly help me with permanent solution so that i can start sqlplus normally.
Re: Setting of ORACLE_HOME & SID [message #602905 is a reply to message #602902] Tue, 10 December 2013 05:25 Go to previous messageGo to next message
Michel Cadot
Messages: 59761
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

If on Unix, put it in your profile.
If on Windows, put it in your registry or environment.

Re: Setting of ORACLE_HOME & SID [message #602906 is a reply to message #602902] Tue, 10 December 2013 05:26 Go to previous messageGo to next message
martijn
Messages: 278
Registered: December 2006
Location: Netherlands
Senior Member
Show exactly what you do in a shell or cmd-box.
(copy paste)

I do not see any problems thus far.

You have to set some environment settings before starting to work. (think oraenv)
Think of it.
The system you work with somehow has to understand which sqlplus is where.

And also, sqlplus needs to know which instance to connect to.
Re: Setting of ORACLE_HOME & SID [message #602907 is a reply to message #602906] Tue, 10 December 2013 05:29 Go to previous messageGo to next message
gazzag
Messages: 358
Registered: November 2010
Location: Bristol, UK
Senior Member
Operating system?
Re: Setting of ORACLE_HOME & SID [message #602914 is a reply to message #602907] Tue, 10 December 2013 06:38 Go to previous messageGo to next message
aliawan41
Messages: 10
Registered: December 2013
Location: lahore
Junior Member
REDHAT LINUX 5
Re: Setting of ORACLE_HOME & SID [message #602917 is a reply to message #602914] Tue, 10 December 2013 06:41 Go to previous messageGo to next message
gazzag
Messages: 358
Registered: November 2010
Location: Bristol, UK
Senior Member
Then, like Michel said, put the following in your .profile file:

export ORACLE_HOME=<path_to_Oracle_Home>
export ORACLE_SID=<database_sid>
export PATH=${ORACLE_HOME}/bin:${PATH}


HTH
-g
Re: Setting of ORACLE_HOME & SID [message #602919 is a reply to message #602917] Tue, 10 December 2013 06:44 Go to previous messageGo to next message
aliawan41
Messages: 10
Registered: December 2013
Location: lahore
Junior Member
In bash profile everything is fine.
oracle base ,oracle home, oracle sid are set proper
Re: Setting of ORACLE_HOME & SID [message #602920 is a reply to message #602919] Tue, 10 December 2013 06:48 Go to previous messageGo to next message
gazzag
Messages: 358
Registered: November 2010
Location: Bristol, UK
Senior Member
But are you using the Bash shell? What does the following return?

$ echo ${SHELL}


Re: Setting of ORACLE_HOME & SID [message #602935 is a reply to message #602919] Tue, 10 December 2013 08:10 Go to previous message
EdStevens
Messages: 332
Registered: September 2013
Senior Member
aliawan41 wrote on Tue, 10 December 2013 06:44
In bash profile everything is fine.
oracle base ,oracle home, oracle sid are set proper


So you say, but the fact you are having a problem suggests otherwise.

First, do as gazzag suggests and confirm you are using the bash shell.

If you are using bash, then confirm that things are NOT being set properly (which is your assertion) by doing the following:

Log on to the server.
Execute the following commands:

id
whoami
cat .bash_profile
env | grep ORA
echo $PATH

COPY the entire session and PASTE the results back here.
Previous Topic: Do I need OracleMTSRecoveryService
Next Topic: INSERT INTO with GUI - insert record greyed out
Goto Forum:
  


Current Time: Mon Nov 24 14:23:20 CST 2014

Total time taken to generate the page: 0.16439 seconds