模拟生产搭建Standby RAC实验环境(11.2.0.4 DG)(4)

3.5 备份数据库

mkdir -p /public/hotback/jyzhao/standby rman target / run { allocate channel ch1 type disk; backup database format '/public/hotback/jyzhao/standby/dbbackup_for_stndby_%U'; backup current controlfile for standby format '/public/hotback/jyzhao/standby/control_for_standby.ctl'; release channel ch1; }

3.6 创建备库参数文件

create pfile='pfile_for_standby.txt' from spfile;

3.7 更新tnsnames.ora文件

JYZHAO = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.51)(PORT = 1521)) (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.53)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = jyzhao) ) ) JYZHAO1 = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.51)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = jyzhao) (SID = jyzhao1) ) ) JYZHAO2 = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.53)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = jyzhao) (SID = jyzhao2) ) ) LISTENER_JYZHAO1=(DESCRIPTION =(ADDRESS = (PROTOCOL = TCP)(HOST = jyrac1-vip)(PORT = 1521))) LISTENER_JYZHAO2=(DESCRIPTION =(ADDRESS = (PROTOCOL = TCP)(HOST = jyrac2-vip)(PORT = 1521))) MYNAS = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.62)(PORT = 1521)) (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.64)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = mynas) ) ) MYNAS1 = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.62)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = mynas) (SID = jyzhao1) ) ) MYNAS2 = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.64)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = mynas) (SID = jyzhao2) ) ) 4.备库配置

备库配置操作主要有:

拷贝主库RMAN备份和参数文件

拷贝密码文件

创建备库需要的目录

修改备库参数文件

拷贝tnsnames.ora文件

创建ASM相关目录

4.1 拷贝主库RMAN备份和参数文件
我这里备份所在的空间可以直接nfs挂载到备库,不需要拷贝。

4.2 拷贝密码文件

scp $ORACLE_HOME/dbs/orapwjyzhao1 192.168.1.61:$ORACLE_HOME/dbs/orapwjyzhao1 scp $ORACLE_HOME/dbs/orapwjyzhao1 192.168.1.63:$ORACLE_HOME/dbs/orapwjyzhao2

4.3 创建备库需要的目录
On jystdrac1:

mkdir -p /opt/app/oracle/admin/mynas/adump mkdir -p /opt/app/oracle/diag/rdbms/mynas/jyzhao1 cd /opt/app/oracle/diag/rdbms/mynas/jyzhao1 mkdir trace cdump

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/41b909d7fe2e6d6da5927df0d4318bef.html