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

注:对于db_unique_name,我这里开始规划的主备库分别是pcssd和mynas。
pcssd:说明这个库在我的PC机上的SSD存储上。
mynas:说明这个库在我的NAS存储上。
最后,由于考虑到生产环境一般要求对主库环境影响最小,所以主库的db_unique_name最终选择不更改,还是保留jyzhao。
此外,这里LOG_ARCHIVE_DEST_2使用的是归档进程传输,后续可以根据需要改成LGWR传输,这样主备库的延迟可以更低。

修改参数值:

--alter system set db_unique_name='jyzhao' scope=spfile; alter system set log_archive_config= 'DG_CONFIG=(jyzhao,mynas)'; alter system set log_archive_dest_1='LOCATION=USE_DB_RECOVERY_FILE_DEST VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=jyzhao'; alter system set log_archive_dest_2='SERVICE=mynas ARCH VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=mynas'; alter system set log_archive_dest_state_1=enable; alter system set log_archive_dest_state_2=enable; alter system set FAL_SERVER='mynas'; alter system set db_file_name_convert='+data/mynas','+data1/jyzhao' scope=spfile; alter system set log_file_name_convert='+data/mynas','+data1/jyzhao','+fra/mynas','+fra1/jyzhao' scope=spfile; alter system set standby_file_management=AUTO;

3.4 创建SRLs
确认当前v$log信息:

SYS@jyzhao1 >select * from v$log; GROUP# THREAD# SEQUENCE# BYTES BLOCKSIZE MEMBERS ARC STATUS FIRST_CHANGE# FIRST_TIME NEXT_CHANGE# NEXT_TIME ---------- ---------- ---------- ---------- ---------- ---------- --- ---------------- ------------- ------------ ------------ ------------ 1 1 121 52428800 512 2 YES INACTIVE 3784808 08-AUG-17 3822869 09-AUG-17 2 1 122 52428800 512 2 NO CURRENT 3822869 09-AUG-17 2.8147E+14 3 2 97 52428800 512 2 YES INACTIVE 3822868 09-AUG-17 3841980 09-AUG-17 4 2 98 52428800 512 2 NO CURRENT 3841980 09-AUG-17 2.8147E+14

创建存放SRL的目录并添加SRLs:

ASMCMD> mkdir +fra1/jyzhao/STANDBYLOG --alter system set standby_file_management=manual scope=both sid='*'; alter database add standby logfile thread 1 group 11 '+fra1/jyzhao/standbylog/standby_group_11.log' size 52428800; alter database add standby logfile thread 1 group 12 '+fra1/jyzhao/standbylog/standby_group_12.log' size 52428800; alter database add standby logfile thread 1 group 13 '+fra1/jyzhao/standbylog/standby_group_13.log' size 52428800; alter database add standby logfile thread 2 group 21 '+fra1/jyzhao/standbylog/standby_group_21.log' size 52428800; alter database add standby logfile thread 2 group 22 '+fra1/jyzhao/standbylog/standby_group_22.log' size 52428800; alter database add standby logfile thread 2 group 23 '+fra1/jyzhao/standbylog/standby_group_23.log' size 52428800; --alter system set standby_file_management=auto scope=both sid='*';

添加完SRLs之后,可以查询到:

SYS@jyzhao1 >select * from v$standby_log; GROUP# DBID THREAD# SEQUENCE# BYTES BLOCKSIZE USED ARC STATUS FIRST_CHANGE# FIRST_TIME NEXT_CHANGE# NEXT_TIME LAST_CHANGE# LAST_TIME ---------- ---------------------------------------- ---------- ---------- ---------- ---------- ---------- --- ---------- ------------- ------------ ------------ ------------ ------------ ------------ 11 UNASSIGNED 1 0 52428800 512 0 YES UNASSIGNED 12 UNASSIGNED 1 0 52428800 512 0 YES UNASSIGNED 13 UNASSIGNED 1 0 52428800 512 0 YES UNASSIGNED 21 UNASSIGNED 2 0 52428800 512 0 YES UNASSIGNED 22 UNASSIGNED 2 0 52428800 512 0 YES UNASSIGNED 23 UNASSIGNED 2 0 52428800 512 0 YES UNASSIGNED 6 rows selected.

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

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