A) 사용자 환경 변수 변경
vi ~oracle/.bash_profile로 2번 노드 oracle 프로필 변경
export ORACLE_HOSTNAME=rac2 export ORACLE_SID=racdb2
[root@node2 ~]# cat ~oracle/.bash_profile # .bash_profile # Get the aliases and functions if [ -f ~/.bashrc ]; then . ~/.bashrc fi # User specific environment and startup programs export TMP=/tmp export TMPDIR=$TMP export EDITOR=vi export ORACLE_HOSTNAME=node2 # 호스트명에 맞게 변경 export ORACLE_UNQNAME=racdb export ORACLE_BASE=/u01/app/oracle export GRID_HOME=/u01/app/19c/grid export DB_HOME=$ORACLE_BASE/product/19c/db_1 export ORACLE_HOME=$DB_HOME export ORACLE_SID=racdb2 # 2번 노드 racdb2 export ORACLE_TERM=xterm export BASE_PATH=/usr/sbin:$PATH export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:$GRID_HOME/bin:$BASE_PATH export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib export NLS_LANG=AMERICAN_KOREA.AL32UTF8 export CV_ASSUME_DISTID=OEL7 PS1='[$ORACLE_SID:$PWD]> '
oracle 유저의 환경 설정을 2번 노드에 맞게 수정합니다.
vi ~oracle/.bashrc 2번 노드의 alias 설정 변경
alias grid_env='export ORACLE_HOME=$GRID_HOME;export ORACLE_SID=+ASM2;export PATH=$ORACLE_HOME/bin:$BASE_PATH' alias db_env='export ORACLE_HOME=$DB_HOME;export ORACLE_SID=racdb2;export PATH=$ORACLE_HOME/bin:$BASE_PATH'
[root@node2 ~]# cat ~oracle/.bashrc # .bashrc # Source global definitions if [ -f /etc/bashrc ]; then . /etc/bashrc fi # User specific environment PATH="$HOME/.local/bin:$HOME/bin:$PATH" export PATH # Uncomment the following line if you don't like systemctl's auto-paging feature: # export SYSTEMD_PAGER= # User specific aliases and functions alias grid_env='export ORACLE_HOME=$GRID_HOME;export ORACLE_SID=+ASM2;export PATH=$ORACLE_HOME/bin:$BASE_PATH' alias db_env='export ORACLE_HOME=$DB_HOME;export ORACLE_SID=racdb2;export PATH=$ORACLE_HOME/bin:$BASE_PATH'
aslias 설정의 ORACLE_SID 정보도 2번 노드에 맞게 수정합니다.
{}