Solved

Linux Red Hat AND Oracle 11g

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

Complete Microsoft Windows PC® & Mac Backup

Backup and recovery solutions to protect all your PCs & Mac– on-premises or in remote locations. Acronis backs up entire PC or Mac with patented reliable disk imaging technology and you will be able to restore workstations to a new, dissimilar hardware in minutes.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Non root SFTP users cannot log in - Software caused connection abort 15 52
Problem to start Neon 20 52
null value 15 65
linux ssh 4 30
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.  …
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
This video shows syntax for various backup options while discussing how the different basic backup types work.  It explains how to take full backups, incremental level 0 backups, incremental level 1 backups in both differential and cumulative mode a…
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.

706 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now