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

环境变量的具体设置如下,主机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下的相关命令

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值