同一环境下新建Standby RAC库(3)

发现日志文件有不符合预期的路径,进行修正:

SQL> show parameter convert NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ db_file_name_convert string +DATA/jyzhao, +DATA/jyzhaodg log_file_name_convert string +DATA/jyzhao, +DATA/jyzhaodg SQL> alter system set log_file_name_convert='+DATA/jyzhao','+DATA/jyzhaodg','+FRA/jyzhao','+FRA/jyzhaodg' scope=spfile; SQL> shutdown immediate; ORA-01109: database not open Database dismounted. ORACLE instance shut down. SQL> startup mount; ORACLE instance started. Total System Global Area 313159680 bytes Fixed Size 2252824 bytes Variable Size 222302184 bytes Database Buffers 83886080 bytes Redo Buffers 4718592 bytes Database mounted. SQL> select member from v$logfile; MEMBER -------------------------------------------------------------------------------- +DATA/jyzhaodg/onlinelog/group_2.262.931878637 +FRA/jyzhaodg/onlinelog/group_2.258.931878639 +DATA/jyzhaodg/onlinelog/group_1.261.931878635 +FRA/jyzhaodg/onlinelog/group_1.257.931878637 +DATA/jyzhaodg/onlinelog/group_3.265.931879021 +FRA/jyzhaodg/onlinelog/group_3.259.931879023 +DATA/jyzhaodg/onlinelog/group_4.266.931879027 +FRA/jyzhaodg/onlinelog/group_4.260.931879029 8 rows selected. 第五章 rman恢复数据库

Standby RAC节点1:

确定ORACLE_SID变量:

echo $ORACLE_SID export ORACLE_SID=jyzhaodg1

a. 如果是使用从备份集恢复的方式
vi restore.sh

rman target / <<EOF! > db_restore.log run { allocate channel d1 type disk; allocate channel d2 type disk; restore database; release channel d1; release channel d2; } exit; EOF!

nohup sh restore.sh &

b. 如果是直接使用copy到磁盘组的
直接switch database to copy即可。

RMAN> switch database to copy; using target database control file instead of recovery catalog datafile 1 switched to datafile copy "+DATA/jyzhaodg/datafile/0eru6m4s.dbf" datafile 2 switched to datafile copy "+DATA/jyzhaodg/datafile/0fru6m4s.dbf" datafile 3 switched to datafile copy "+DATA/jyzhaodg/datafile/0hru6meo.dbf" datafile 4 switched to datafile copy "+DATA/jyzhaodg/datafile/0iru6mg5.dbf" datafile 5 switched to datafile copy "+DATA/jyzhaodg/datafile/0jru6mg6.dbf" datafile 6 switched to datafile copy "+DATA/jyzhaodg/datafile/0gru6men.dbf" 第六章 备库开启日志应用

确认Primary RAC的日志传输链路打开:

echo $ORACLE_SID export ORACLE_SID=jyzhao1 SQL> alter system set log_archive_dest_state_3=enable;

Standby RAC节点1在mount状态下开启日志应用:

echo $ORACLE_SID export ORACLE_SID=jyzhaodg1 SQL> alter database recover managed standby database disconnect from session; 第七章 创建standby log

停止备库应用:

SQL> alter database recover managed standby database cancel;

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

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