Simpler Navigation coming for Servers and Operating Systems
Coming soon: a much simpler Servers and Operating Systems section of the Community. We will combine many of the older boards, and you won't have to click through so many levels to get at the information you need. If you are looking for an older board and do not find it, check the consolidated boards, as the posts are still there.
Databases
cancel
Showing results for 
Search instead for 
Did you mean: 

VARIABLE DEFINITION for oracle user

mohamed_42
Frequent Advisor

VARIABLE DEFINITION for oracle user

I want to ask how can i Define a req. variaable for oracle user and i copy my oracle CD on /var/ora how can i define req. variable according this path....
3 REPLIES
Mel Burslan
Honored Contributor

Re: VARIABLE DEFINITION for oracle user

if you are talking about a shell variable, you can easily do this in either .profile or .kshrc /.cshrc (<--This one depends on your shell type) files located on oracle user's home directory.

Like:

ORACLE_BASE=/disk01/app/oracle
ORACLE_PATH=/disk01/app/oracle/product/8.1.7/bin:/opt/bin:/bin:/usr/local/bin
ora_db=/disk01/app/oracle/admin/INF
ORACLE_SID=XYZ
ORACLE_HOME=/disk01/app/oracle/product/8.1.7

Hope this helps
________________________________
UNIX because I majored in cryptology...
Indira Aramandla
Honored Contributor

Re: VARIABLE DEFINITION for oracle user

Hi Mohamed,

You just do like

ORACLE_BASE=/opt/oracle
and when ever you want to refer this path you can say $ORACLE_BASE

Like ORACLE_HOME=/opt/oracle/product/8.1.7.4

Then you can say
ORACLE_HOME=$ORACLE_BASE/product/8.1.7.4
and refer it as $ORACLE_HOME in the script


Indira A
Never give up, Keep Trying
Yogeeraj_1
Honored Contributor

Re: VARIABLE DEFINITION for oracle user

hi,

you can also do:
export MYVAR=/var/ora

regards
yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)