根据主库之前导出的参数文件修改备库的参数文件:
cp /tmp/pfile.ora /tmp/pfile_std.ora
vi /tmp/pfile_std.ora
主要是注意后面#add之后的内容。
3.3 在ASM中创建standby的spfile在ASM中创建standby的spfile,并确定各节点的参数文件内容指向磁盘中的spfile。
节点1:
节点2:
echo $ORACLE_SID export ORACLE_SID=jyzhaodg2 cat initjyzhaodg2.ora SPFILE='+DATA/jyzhaodg/spfilejyzhaodg.ora'创建adump目录(所有节点)
mkdir -p /u01/app/oracle/admin/jyzhaodg/adump 3.4 Standby RAC启动到nomount节点1:
echo $ORACLE_SID export ORACLE_SID=jyzhaodg1 startup nomount节点2:
echo $ORACLE_SID export ORACLE_SID=jyzhaodg2 startup nomount 第四章 rman恢复控制文件在Primary RAC上创建备库使用的控制文件:
echo $ORACLE_SID export ORACLE_SID=jyzhao1 SQL> alter database create standby controlfile as '/tmp/control01.ctlbak';在Standby RAC的节点1上恢复控制文件并启动到mount:
echo $ORACLE_SID export ORACLE_SID=jyzhaodg1 restore controlfile from '/tmp/control01.ctlbak'; alter database mount; crosscheck backupset; --如果是之前copy到磁盘组的备份没加载到控制文件中,可以手动catalog catalog start with '+data/jyzhaodg/DATAFILE'; --同样,如果是之前的备份集没加载到控制文件中,一样手动catalog catalog start with '/u01/orabak/';查看此时standby记录的各文件路径是否符合预期:
SQL> select name from v$datafile; NAME -------------------------------------------------------------------------------- +DATA/jyzhaodg/datafile/system.256.931878537 +DATA/jyzhaodg/datafile/sysaux.257.931878537 +DATA/jyzhaodg/datafile/undotbs1.258.931878537 +DATA/jyzhaodg/datafile/users.259.931878537 +DATA/jyzhaodg/datafile/undotbs2.264.931878827 +DATA/jyzhaodg/datafile/dbs_d_jingyu.268.937515173 6 rows selected. SQL> select member from v$logfile; MEMBER -------------------------------------------------------------------------------- +DATA/jyzhaodg/onlinelog/group_2.262.931878637 +FRA/jyzhao/onlinelog/group_2.258.931878639 +DATA/jyzhaodg/onlinelog/group_1.261.931878635 +FRA/jyzhao/onlinelog/group_1.257.931878637 +DATA/jyzhaodg/onlinelog/group_3.265.931879021 +FRA/jyzhao/onlinelog/group_3.259.931879023 +DATA/jyzhaodg/onlinelog/group_4.266.931879027 +FRA/jyzhao/onlinelog/group_4.260.931879029 8 rows selected. SQL> select name from v$tempfile; NAME -------------------------------------------------------------------------------- +DATA/jyzhaodg/tempfile/temp.263.931878661 SQL> select name from v$controlfile; NAME -------------------------------------------------------------------------------- +DATA/jyzhaodg/controlfile/current.288.937645851 +FRA/jyzhaodg/controlfile/current.275.937645851