Solved

steps after installing 11gr2 on linux

Posted on 2011-03-25
7
394 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
  • 4
  • 2
7 Comments
 
LVL 76

Accepted Solution

by:
slightwv (䄆 Netminder) earned 167 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 76

Assisted Solution

by:slightwv (䄆 Netminder)
slightwv (䄆 Netminder) earned 167 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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
LVL 2

Assisted Solution

by:choukssa
choukssa earned 83 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 76

Assisted Solution

by:slightwv (䄆 Netminder)
slightwv (䄆 Netminder) earned 167 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 83 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 76

Assisted Solution

by:slightwv (䄆 Netminder)
slightwv (䄆 Netminder) earned 167 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Have you ever had to make fundamental changes to a table in Oracle, but haven't been able to get any downtime?  I'm talking things like: * Dropping columns * Shrinking allocated space * Removing chained blocks and restoring the PCTFREE * Re-or…
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.

910 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

22 Experts available now in Live!

Get 1:1 Help Now