Solved

Linux Red Hat AND Oracle 11g

Posted on 2009-05-15
5
814 Views
Last Modified: 2013-11-11
experts,

      I often need to open the terminal window and set the Oracle environment for one SID. Is there a way to automate this process? I looked up the solution but the web site listed that the commands should be saved to a file ~oracle/.bash         where is that? The oracle home path? What directory do I place the script?

MissyMadi
0
Comment
Question by:missymadi
  • 2
5 Comments
 
LVL 74

Expert Comment

by:sdstuber
ID: 24396394
~oracle

means the  home directory of the oracle user,  NOT necessarily the samething as an ORACLE_HOME (and probably not)


probably something like

/home/oracle

0
 

Author Comment

by:missymadi
ID: 24396482
Where would I set the environment variables for Oracle SID so that I don't have to keep entering each time a terminal window is opened?
0
 
LVL 30

Accepted Solution

by:
Kerem ERSOY earned 125 total points
ID: 24396582
$HOME/.bash_profile file is where you save your oracle variables. If you place them there they will be in your environment as soon as you logon. To see the result you need to logoff and logon back.

If you want to check what is in your environmen simply type :
# env

and it will show all your environment variables.

Cheers,
K.
0
 
LVL 74

Assisted Solution

by:sdstuber
sdstuber earned 125 total points
ID: 24396633
inside your resource file put these lines

export ORAENV_ASK=NO
export ORACLE_SID=YOURSID
. oraenv 2>/dev/null
unset ORAENV_ASK

if oraenv isn't in your path then fully qualify it,
it might look like...

. /usr/local/bin/oraenv 2>/dev/null

and you can, of course, redirect your stderr to a file instead of devnull if you want a log.

0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

How to Unravel a Tricky Query Introduction If you browse through the Oracle zones or any of the other database-related zones you'll come across some complicated solutions and sometimes you'll just have to wonder how anyone came up with them.  …
I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

756 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question