RAC+DG+OGG灾备中OGG实现部分
RAC+DG+OGG灾备中OGG实现部分
本文不牵扯具体操作系统及oracle软件的安装,假定在实施完毕的rac环境及安装好oracle软件的单机平台下,讲解如何实施RAC+DG+OGG构建灾备系统中OGG实现部分,其他部分见我之前的相关博文。
RAC+DG+OGG简要架构如下:
以下为主要的实施过程:
修改存储服务器中共享盘的设置
[root@openfiler rac_ogg]# cat /etc/exports
# PLEASE DO NOT MODIFY THIS CONFIGURATION FILE!
# This configuration file was autogenerated
# by Openfiler. Any manual changes will be overwritten
# Generated at: Thu May 2 15:36:07 CST 2013
# End of Openfiler configuration
/mnt/rac_ogg/rac_ogg 192.168.137.0/24(rw,sync,no_root_squash,no_all_squash,no_subtree_check)
在rac所有节点挂载
mount -t nfs 192.168.137.141:/mnt/rac_ogg/rac_ogg/rac_ogg /u01/app/ogg/11.1
修改所有节点开机自动修改项目录属组
[root@11grac1 11.1]# cat /etc/rc.local
#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.
touch /var/lock/subsys/local
chown -R oracle:oinstall /u01/app/ogg/11.1
修改rac2个节点的开机自动挂载项
[root@11grac2 11.1]# cat /etc/fstab
LABEL=/ / ext3 defaults 1 1
LABEL=/boot /boot ext3 defaults 1 2
tmpfs /dev/shm tmpfs defaults 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
sysfs /sys sysfs defaults 0 0
proc /proc proc defaults 0 0
LABEL=SWAP-sda2 swap swap defaults 0 0
#oralce set for ogg
192.168.137.141:/mnt/rac_ogg/rac_ogg/rac_ogg /u01/app/ogg/11.1 nfs defaults 0 0
在共享的nfs目录下解压并创建ogg相关目录
[oracle@OELx64 app]$ mkdir -p ogg/11.1
[oracle@OELx64 11.1]$ tar -xvf /tmp/ggs_Linux_x64_ora11g_64bit_v11_1_1_0_0_078.tar
修改ogg用户的环境变量(此处的ogg用户为oracle)
在.bash_profile中添加以下条目
#ogg set
OGG_BASE=/u01/app/ogg; export OGG_BASE
OGG_HOME=$OGG_BASE/11.1; export OGG_HOME
PATH=$OGG_HOME:$PATH; export PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$OGG_HOME:$LD_LIBRARY_PATH
[oracle@ora10gr2 11.1]$ pwd
/u01/app/ogg/11.1
[oracle@ora10gr2 11.1]$ ggsci
Oracle GoldenGate Command Interpreter for Oracle
Version 11.1.1.1.2 OGGCORE_11.1.1.1.2_PLATFORMS_111004.2100
Linux, x86, 32bit (optimized), Oracle 10g on Oct 4 2011 23:54:04
Copyright (C) 1995, 2011, Oracle and/or its affiliates. All rights reserved.
GGSCI (ora10gr2) 1> create subdirs
Creating subdirectories under current directory /u01/app/ogg/11.1
Parameter files /u01/app/ogg/11.1/dirprm: created
Report files /u01/app/ogg/11.1/dirrpt: created
Checkpoint files /u01/app/ogg/11.1/dirchk: created
Process status files /u01/app/ogg/11.1/dirpcs: created
SQL script files /u01/app/ogg/11.1/dirsql: created
Database definitions files /u01/app/ogg/11.1/dirdef: created
Extract data files /u01/app/ogg/11.1/dirdat: created
Temporary files /u01/app/ogg/11.1/dirtmp: created
Veridata files /u01/app/ogg/11.1/dirver: created
Veridata