Solved

Linux Red Hat AND Oracle 11g

Posted on 2009-05-15
5
824 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Are You Using the Best Web Development Editor?

The worlds of web hosting and web development are constantly evolving. Every year we see design trends change, coding standards adapt and new frameworks/CMS created. With such a quick pace of change it’s easy to get lost trying to keep up.

See if your editor made the list.

Question has a verified solution.

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

I remember the day when someone asked me to create a user for an application developement. The user should be able to create views and materialized views and, so, I used the following syntax: (CODE) This way, I guessed, I would ensure that use…
When it comes to protecting Oracle Database servers and systems, there are a ton of myths out there. Here are the most common.
This video shows setup options and the basic steps and syntax for duplicating (cloning) a database from one instance to another. Examples are given for duplicating to the same machine and to different machines
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Suggested Courses

631 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