Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

steps after installing 11gr2 on linux

Posted on 2011-03-25
7
Medium Priority
?
402 Views
Last Modified: 2012-08-14
HI Guys, i just installed 11gr2 on linux, please tell me the steps to set .profile and environment
0
Comment
Question by:nirvairghuman
[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
  • 4
  • 2
7 Comments
 
LVL 77

Accepted Solution

by:
slightwv (䄆 Netminder) earned 668 total points
ID: 35218538
Did you run root.sh as root?

>> please tell me the steps to set .profile and environment

Environment to do what and as whom?
0
 

Author Comment

by:nirvairghuman
ID: 35218628
i have set oracle_home and oracle_sid
0
 
LVL 77

Assisted Solution

by:slightwv (䄆 Netminder)
slightwv (䄆 Netminder) earned 668 total points
ID: 35218688
You 'have' set or you 'need to' set?

The only other thing you need is to add $ORACLE_HOME/bin to your PATH and possible add some entries to your LD_LIBRARY_PATH but that depends on what I was asking in my original post:  

It all depends on what you are using and who will be using them.

Everything should already be set up for the 'oracle' user and you should not need to do anything.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 2

Assisted Solution

by:choukssa
choukssa earned 332 total points
ID: 35218725

After installation make sure you ran 2 root scripts mentioned in the installation wizard.

you are running oracle on linux so you can do  something like this :

Put following in your   .bashrc

# .bashrc

# User specific aliases and functions

# Source global definitions
if [ -f /etc/bashrc ]; then
        . /etc/bashrc
fi

. oraenv

alias sid='env | grep SID'
export PS1="\u | SID: $ORACLE_SID | \w >"

Open in new window


see . oraenv in the file.

Wheen you login oraenv will get sourced in and will ask you for a SID. You can provide the sid there (works great if you are running multiple DBs.)


Now set your  .bash_profile like this

# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
        . ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATH:$HOME/bin

export PATH
unset USERNAME

Open in new window



Put your SID and HOme in /etc/oratab like this


testdb:/data/binaries/oracle11g2/app/ora11g2/product/11.2.0/dbhome_1:N

Open in new window


--choukssa
0
 
LVL 77

Assisted Solution

by:slightwv (䄆 Netminder)
slightwv (䄆 Netminder) earned 668 total points
ID: 35219157
>>Wheen you login oraenv will get sourced in and will ask you for a SID.

I agree but this might be a bad thing.  This is why I was waiting for more information on who will be using these 'env' variables.

For example:  Any user such as 'oracle' that needs to run a cron cannot just run oraenv unless they first export ORACLE_SID and ORAENV_ASK=NO.  Otherwise the cron job will never run.
0
 
LVL 2

Assisted Solution

by:choukssa
choukssa earned 332 total points
ID: 35219468

The question does not say anything about cron jobs.

While the cron jobs can set that in their ORAENV_ASK=NO and ORACLE_SID in the script. You can find an example in one of my earlier posts.

One can also put ORACLE_SID, ORACLE_HOME, ORACLE_BASE etc. in .bashrc but the option I have proposed is the one that I use every day. I have 50+ SIDs and I think this is the most efficient.

--choukssa  

0
 
LVL 77

Assisted Solution

by:slightwv (䄆 Netminder)
slightwv (䄆 Netminder) earned 668 total points
ID: 35219537
>>I have proposed is the one that I use every day.

I'm not disputing that.  That is how I had mine set up as well.

>>The question does not say anything about cron jobs.

Agreed but it also doesn't.  It asks how to set the env after install.  We do not know what users, apps, processes, ???  needs to use them or from where.

Until we know that, we really cannot answer the question.  Anything we post until we know that is a guess.

That is why my first post included "Environment to do what and as whom?".
0

Featured Post

Nothing ever in the clear!

This technical paper will help you implement VMware’s VM encryption as well as implement Veeam encryption which together will achieve the nothing ever in the clear goal. If a bad guy steals VMs, backups or traffic they get nothing.

Question has a verified solution.

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

Why doesn't the Oracle optimizer use my index? Querying too much data Most Oracle developers know that an index is useful when you can use it to restrict your result set to a small number of the total rows in a table. So, the obvious side…
Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
This video shows information on the Oracle Data Dictionary, starting with the Oracle documentation, explaining the different types of Data Dictionary views available by group and permissions as well as giving examples on how to retrieve data from th…
This video shows how to recover a database from a user managed backup

722 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