Home » RDBMS Server » Server Administration » I Need to Know, but its too much,
I Need to Know, but its too much, [message #58578] Thu, 18 September 2003 10:19 Go to next message
Kapil
Messages: 145
Registered: May 2002
Senior Member
Can any one give me an example of .profile file in unix, and explain me all environment variables in it. please guys.. need to understand. or else tell me what book or what documentation to read to comprehend in detail.
Thanks guys.
Re: I Need to Know, but its too much, [message #58579 is a reply to message #58578] Thu, 18 September 2003 11:40 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10707
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
$ cat .profile
export ORACLE_HOME=/u01/app/oracle/product/9.2.0
export ORACLE_SID=mutation
export ORACLE_BASE=/u01/app/oracle
export ORACLE_TERM=vt100
export PATH=$PATH:/bin:/usr/ccs/bin:/usr/openwin/bin:/usr/local/bin:.:$ORACLE_HOME/bin
export CLASSPATH=$ORACLE_HOME/jdbc/lib/classes12.jar:.
export SHLIB_PATH=$ORACLE_HOME/lib:$ORACLE_HOME/jdbc/lib
export LD_LIBRARY_PATH=$ORACLE_HOME/lib32:$ORACLE_HOME/rdbms/lib32:$SHLIB_PATH
export TNS_ADMIN=$ORACLE_HOME/network/admin

host1=`hostname`
host2=`echo $host1 &#124cut -f1 -d"."`
PS1='$host2:$PWD >'

HISTFILE='.sh_history'
export HISTFILE
HISTSIZE=400
export HISTSIZE
set -o vi

stty kill "^U" intr "^C" eof "^D"
stty erase ^H
#stty hupcl ixon ixoff

alias enscript='/usr/local/bin/enscript'
alias lp2='enscript -2r -G -j -f Courier7 -dhp321t'
alias lpcourier='enscript -G -f Courier10 -dhp321t'
alias lptimes='enscript -G -f Times-Roman12 -dhp321t'
alias lpwide='enscript -G -f Courier10 -r -dhp321t'
alias dfk='$ORACLE_HOME/bin/dfk.pl'

#!/bin/ksh
#sidlist=`cut -d: -f1,2/etc/oratab`
#echo "SIDS on this machine are:n$sidlist"
#ORAENV_ASK=
#./u01/app/oracle/product/8.0.5/bin/oraenv
DISPLAY=mutation.xx.xx.xxx:0.0
export DISPLAY
cd /home/oracle/scr

----------------------------------------------------------------------

im using the above profile
change the paths for ORACLE_HOME if needed.
i have some customizations( alias) which you may not be intrested in.

Re: I Need to Know, but its too much, [message #58580 is a reply to message #58578] Thu, 18 September 2003 12:26 Go to previous message
Thiru
Messages: 1089
Registered: May 2002
Senior Member
Kapil,
Here's an extract from the documentation :
-----------------------------------------
Table 4-2 Environment Variable Settings
Environment Variable Recommended Setting
ORACLE_HOME Set the ORACLE_HOME variable to specify the directory containing the Oracle software for a particular release. The OFA recommended value is:

$ORACLE_BASE/product/release

For example,

ORACLE_BASE variable is:
/u01/app/oracle, then the ORACLE_HOME variable would be:
/u01/app/oracle/product/9.2.0.1.0

CLASSPATH Set the CLASSPATH variable to ensure Java functionality. The CLASSPATH variable is different for various products.

CLASSPATH must include the following:

$ORACLE_HOME/jlib/<product jar file>:
$ORACLE_HOME/product/jlib/product_jar_file

See Also: Oracle9i Java documentation for more information on setting the CLASSPATH variable.
LD_LIBRARY_PATH Set the LD_LIBRARY_PATH variable as $ORACLE_HOME/lib for HP, Linux, Tru64, and Solaris 32-bit.

Set the LD_LIBRARY_PATH variable as
$ORACLE_HOME/lib32 for Solaris 64-bit.
LD_LIBRARY_PATH_64 Set the LD_LIBRARY_PATH_64 variable as
$ORACLE_HOME/lib for Solaris 64-bit.
SHLIB_PATH Set the SHLIB_PATH variable as $ORACLE_HOME/lib32 for HP.
LIBPATH Set the LIBPATH variable as $ORACLE_HOME/lib32: $ORACLE_HOME/lib for AIX.
ORACLE_SID Set the ORACLE_SID variable to specify the name of the Oracle Server instance name. Oracle Corporation recommends restricting it to no more than four characters to avoid filename problems on different operating systems, as the sid is incorporated in many files. If you do not remember the value you entered when you were prompted by the Oracle Universal Installer, you can find it listed in the installActions.log file located in the oraInventory_location/ logs directory.

The oraInventory_location directory is defined in the /etc/oraInst.loc file in AIX and /var/opt/oracle/oraInst.loc file in HP, Linux, Solaris and Tru64.
PATH Make sure the new $ORACLE_HOME/bin directory is included in the PATH setting.

AIX Path is $ORACLE_HOME/bin,/etc, /usr/bin,/usr/bin/X11,/usr/lbin, and /usr/local/bin, if it exists

HP Path is $ORACLE_HOME/bin,/usr/bin,/etc, /usr/bin/X11 and /usr/local/bin, if it exists

Linux Path is $ORACLE_HOME/bin,/usr/bin,/bin, /usr/bin/X11 and /usr/local/bin,if it exists

Solaris Path is $ORACLE_HOME/bin,/usr/ccs/bin, /usr/bin,/etc,/usr/openwin/bin and /usr/local/bin, if it exists

Tru64 Path is $ORACLE_HOME/bin,/usr/bin,/etc, /usr/bin/X11 and /usr/local/bin,if it exists

TNS_ADMIN TNS_ADMIN specifies the directory containing the Oracle Net Services configuration files.

Oracle Net Services configuration files are typically, but not always located in the $ORACLE_HOME/admin/network directory. Depending on the file, Oracle Net uses a different search order to locate the file.

The search order for the sqlnet.ora and ldap.ora files is as follows:

1.

The directory specified by the TNS_ADMIN environment variable, if set
2.

/var/opt/oracle directory for Solaris and /etc directory for AIX, HP, Linux, and Tru64.
3.

The $ORACLE_HOME/admin/network directory

TWO_TASK Set the TWO_TASK variable to the default connect identifier to use in the connect string. The default connect identifier does not need to be specified in the connect string. For example, if the TWO_TASK environment variable is set to sales, you can connect to a database using the CONNECT username/password command rather than the CONNECT username/password@sales command.

----------------------------------------

Hope this helps
Thiru
Previous Topic: database tablespace
Next Topic: DATABASE IMPORT IN THE DEFAULT TABLESPACE OF USER
Goto Forum:
  


Current Time: Fri Sep 20 15:22:42 CDT 2024