在Oracle 12C上实施ACFS replication(二)

2015-02-02 20:43:03 · 作者: · 浏览: 10
.1.0.1.0 - 64bit Production


With the Real Application Clusters and Automatic Storage Management options


?


SQL> alter system set service_names='+ASM1,primary_acfsrep' sid='+ASM1';


?


System altered.


?


SQL> show parameter service_name


?


NAME? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? TYPE? ? ? ? VALUE


------------------------------------ ----------- ------------------------------


service_names? ? ? ? ? ? ? ? ? ? ? ? string? ? ? +ASM1,primary_acfsrep


?


--add service name for +ASM1 & +ASM2


grid@qc550707:/home/grid>sqlplus '/as sysasm'


?


SQL*Plus: Release 12.1.0.1.0 Production on Fri Feb 14 16:37:06 2014


?


Copyright (c) 1982, 2013, Oracle.? All rights reserved.


?


?


Connected to:


Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production


With the Real Application Clusters and Automatic Storage Management options


?


SQL> alter system set service_names='+ASM2,standby_acfsrep' sid='+ASM2';


?


System altered.


?


SQL> show parameter service_name


?


NAME? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? TYPE? ? ? ? VALUE


------------------------------------ ----------- ------------------------------


service_names? ? ? ? ? ? ? ? ? ? ? ? string? ? ? +ASM2,standby_acfsrep


?


4、 在Primary 和 Standby节点tnsnames.ora文件中增加指向ASM instance的连接串


--add standby FS net service name to tnsnames.ora in Primary node qc550705


standby_acfsrep=(DESCRIPTION=


? (ADDRESS=(PROTOCOL=tcp)(HOST=qc550707)(PORT=1521))


? (CONNECT_DATA=(SERVICE_NAME=standby_acfsrep)))?


?


--add Primary FS net service name to tnsnames.ora in standby node qc550707


primary_acfsrep=(DESCRIPTION=


? (ADDRESS=(PROTOCOL=tcp)(HOST=qc550705)(PORT=1521))


? (CONNECT_DATA=(SERVICE_NAME=primary_acfsrep)))


?


--Test connection to standby ASM instance using sqlplus on primary node


sqlplus acfsrep1/773946@standby_acfsrep as sysasm


?


--Test connection to primary ASM instance using sqlplus on standby node


sqlplus acfsrep1/773946@primary_acfsrep as sysasm


?


5、 在Standby node和Primary node上发起replication initialize


--initialize standby FS


root@qc550707:/>acfsutil repl init standby -p acfsrep1/773946@primary_acfsrep -c standby_acfsrep /acfsstd1


Registering with user specified service name-standby_acfsrep


?


--观察standby node上的复制已经启动


root@qc550707:/>acfsutil repl info -c -v /acfsstd1


Site:? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? Standby


Standby status:? ? ? ? ? ? ? ? ? ? ? Initializing


? ? Initializing directories


Background Resources:? ? ? ? ? ? ? ? 4 of 4 Online


Standby mount point:? ? ? ? ? ? ? ? /acfsstd1


Standby Oracle Net service name:? ? standby_acfsrep


Primary mount point:


Primary Oracle Net service name:? ? primary_acfsrep


Primary Oracle Net alias:? ? ? ? ? ? repladm/****@primary_acfsrep


Replicated tags:


Log compression:? ? ? ? ? ? ? ? ? ? Off


Debug log level:? ? ? ? ? ? ? ? ? ? 2


?


--紧接着在Primary node上发起ACFS replication的操作


/sbin/acfsutil repl init primary -s acfsrep1/773946@standby_acfsrep -m /acfsstd1 -c primary_acfsrep /acfs3


root@qc550705:/>/sbin/acfsutil repl init primary -s acfsrep1/773946@standby_acfsrep -m /acfsstd1 -c primary_acfsrep /acfs3


validating the remote connection


remote connection has been established


Registering with user specified service name-primary_acfsrep


The standby replication site is initialized. ACFS replication will begin.


?


6、 验证replication是否已经完成


--Primary node


root@qc550705:/acfs3/.ACFS/repl/logs>acfsutil repl info -c -v /acfs3


Site:? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? Primary


Lag Time:? ? ? ? ? ? ? ? ? ? ? ? ? ? 00:00:00


Primary status:? ? ? ? ? ? ? ? ? ? ? Online


Background Resources:? ? ? ? ? ? ? ? 3 of 3 Online


Primary mount point:? ? ? ? ? ? ? ? /