Solved

Linux Red Hat AND Oracle 11g

Posted on 2009-05-15
5
802 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 73

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 73

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

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
form builder not starting 3 34
awk file 6 51
Problem with duplicate records in Oracle query 16 26
Oracle collections 15 20
SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
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.  …
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
This video shows how to Export data from an Oracle database using the Original Export Utility.  The corresponding Import utility, which works the same way is referenced, but not demonstrated.

776 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