RAC 主库配置单实例ADG(3)

3.5 启动备库到nomount
su - oracle

mkdir -p /u01/app/oracle/admin/jyzhao/adump mkdir -p /u01/app/oracle/oradata mkdir -p /u01/app/oracle/fra startup nomount pfile='/tmp/pfile.ora' create spfile from pfile='/tmp/pfile.ora';

这里参数文件也可以只指定db_name='jyzhao_s' 但是这样的话就在duplicate时指定参数了。

3.6 使用duplicate搭建备库
例如:

--duplication script, running at jyzhao_s --这里是在备库执行脚本;连接的是原环境RAC的节点2; su - oracle mkdir -p /home/oracle/mirgration_scripts cd /home/oracle/mirgration_scripts vi /home/oracle/mirgration_scripts/duplicate.sql run { allocate channel p1 type disk; allocate channel p2 type disk; allocate auxiliary channel s1 type disk; allocate auxiliary channel s2 type disk; duplicate target database for standby from active database dorecover nofilenamecheck; } nohup rman target sys/oracle@jyzhao2 auxiliary sys/oracle@jyzhao_s @/home/oracle/mirgration_scripts/duplicate.sql log=/home/oracle/mirgration_scripts/d1.log & --实验发现,duplicate主库时,如果日志传送链路没有打开,那么是恢复不成功滴!

3.7 在OPEN状态下进行日志应用
例如:

sqlplus / as sysdba --alter database recover managed standby database cancel; alter database open; alter database recover managed standby database using current logfile disconnect from session; --alter database recover managed standby database disconnect from session; --这种不需要standby logfile

3.8 确认ADG状态正常
主库日志类似如下信息:

****************************************************************** LGWR: Setting 'active' archival for destination LOG_ARCHIVE_DEST_3 ****************************************************************** Wed Nov 30 04:48:42 2016 Archived Log entry 268 added for thread 2 sequence 115 ID 0x9603a618 dest 1: LNS: Standby redo logfile selected for thread 2 sequence 116 for destination LOG_ARCHIVE_DEST_3

备库日志类似如下信息:

Media Recovery Waiting for thread 2 sequence 116 (in transit)

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

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