ORACLE RAC中grid和oracle中环境变量设置和相关命令使用原则

来源:互联网 发布:手机卸载软件 编辑:程序博客网 时间:2024/06/06 09:19

环境变量的具体设置如下,主机ORACLE_HOME的不同

[grid@dtydb3 ~]$ id
uid=601(grid) gid=501(oinstall) groups=501(oinstall),502(dba),503(oper),504(asmadmin),506(asmdba),507(asmoper)
[grid@dtydb3 ~]$ cat .bash_profile
# .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

ORACLE_SID=+ASM1; export ORACLE_SID
ORACLE_BASE=/oracle/app/grid; export ORACLE_BASE
ORACLE_HOME=/oracle/11.2.0/grid; export ORACLE_HOME
GRID_HOME=/oracle/11.2.0/grid; export GRID_HOME
THREADS_FLAG=native; export THREADS_FLAG
PATH=$ORACLE_HOME/bin:$PATH; export PATH
if [ $USER = "oracle" ] || [ $USER = "grid" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
umask 022
fi
export LANG="en_US.UTF-8"

[root@dtydb3 ~]# su - oracle
[oracle@dtydb3 ~]$ cat .bash_profile
# .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

ORACLE_BASE=/oracle/app/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1; export ORACLE_HOME
ORACLE_SID=tyolap1; export ORACLE_SID
export ORACLE_UNQNAME=tyolap
TNS_ADMIN=$ORACLE_HOME/network/admin; export TNS_ADMIN
PATH=/usr/sbin:$PATH; export PATH
PATH=$ORACLE_HOME/bin:$PATH; export PATH
export NLS_LANG="SIMPLIFIED CHINESE_CHINA.ZHS16GBK"
export NLS_DATE_FORMAT="yyyy-mm-dd hh24:mi:ss"
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH
if [ $USER = "oracle" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi
export LANG="en_US.UT

     设置的原则和相关命令的使用原则如下:

If you use ASMCMD, srvctl, sqlplus, or lnsrctl to manage Oracle ASM or its listener, then use the binaries located in the Grid home, not the binaries located in the Oracle Database home, and set the ORACLE_HOME environment variable to the location of the Grid home.

    如果使用ASMCMD, srvctl, sqlplus, or lnsrctl命令去管理ASM和它的监听使用grid用户执行grid home下相关命令
    If you use srvctl, sqlplus, or lnsrctl to manage a database instance or its listener, then use the binaries located in the Oracle home where the database instance or listener is running, and set the ORACLE_HOME environment variable to the location of that Oracle home
 如果使用srvctl, sqlplus, or lnsrctl管理数据库实例相关命令,则使用oracle用户只需oracle home下的相关命令

原创粉丝点击
热门问题 老师的惩罚 人脸识别 我在镇武司摸鱼那些年 重生之率土为王 我在大康的咸鱼生活 盘龙之生命进化 天生仙种 凡人之先天五行 春回大明朝 姑娘不必设防,我是瞎子 宝宝脸上角质层薄有红血丝怎么办 红衣军到决赛圈怎么办 宝宝湿疹留下的黑印怎么办 出牙宝宝很烦躁怎么办 法斗嘴唇破了怎么办 狗嘴巴周围红了怎么办 脸上起红包还痒怎么办 睾丸胀痛有下坠感怎么办 英语不好又不会读怎么办 七个月宝宝手上长倒刺怎么办 字母纹身纹反了怎么办 花甲生的吃了怎么办 别人告我欠他钱怎么办 实习手册没有公司的印章怎么办? 家长管的太严怎么办 对于老公沉迷于股票怎么办 月经期吃了香瓜怎么办 月经漏到内裤上怎么办 上班没时间养狗怎么办 宝宝呼吸道感染反复发烧怎么办 熬夜后头晕想吐怎么办 生气后全身无力酸痛怎么办? 久坐导致的腰疼怎么办 削土豆手变黑了怎么办 熬夜后头痛眼痛怎么办 孩子毎天通宵游戏怎么办 熬夜写作业困了怎么办 三十多岁白头发越来越多怎么办 AI界面字体太小怎么办 睡不着怎么办躺倒床上脑子混乱 作息规律不正常夜里睡不着怎么办 作息不规律引起身体痒怎么办 在大学里好无聊怎么办 开会时间通知错了怎么办 商场要求商户变更位置怎么办 怀孕初期症状小腹痛怎么办 1岁半宝宝吃夜奶怎么办 戒奶宝宝不喝奶粉怎么办 2岁半宝宝老晚睡怎么办 老是熬夜然后想调生物钟怎么办 一个月宝宝睡眠不好怎么办