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

5.4 确认备库tnsnames.ora
确认tnsnames.ora配置正确(on all standby nodes):

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 = jystdrac1-vip)(PORT = 1521))) LISTENER_JYZHAO2=(DESCRIPTION =(ADDRESS = (PROTOCOL = TCP)(HOST = jystdrac2-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) ) )

特别要注意LISTENER_JYZHAO1和LISTENER_JYZHAO2的配置是否对应备份的信息。

5.5 启动MRP

ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT FROM SESSION;

5.6 创建spfile然后使用spfile启动数据库
创建spfile

create spfile='+data/mynas/parameterfile/spfileMYNAS.ora' from pfile='/opt/app/oracle/product/11.2.0/dbhome_1/dbs/pfile_for_standby.txt';

在备库两个节点修改init

On jystdrac1: [oracle@jystdrac1 dbs]$ cat initjyzhao1.ora spfile='+data/mynas/parameterfile/spfileMYNAS.ora' On jystdrac2: [oracle@jystdrac2 dbs]$ cat initjyzhao2.ora spfile='+data/mynas/parameterfile/spfileMYNAS.ora'

重新启动到mount状态可以再次开启MRP进程。

6.检查同步状态

可以在备库根据下面的SQL查询相关的信息:

select * from v$archive_gap; select process, client_process, sequence#, status from v$managed_standby; select sequence#, first_time, next_time, applied from v$archived_log; select archived_thread#, archived_seq#, applied_thread#, applied_seq# from v$archive_dest_status; select thread#, max (sequence#) from v$log_history group by thread#; select thread#, max (sequence#) from v$archived_log where APPLIED='YES' group by thread#;

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

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