Configure the main library parameters file:
Add to:
*.log_archive_config= ' dg_config= (cwfol,cwfolb) '
*.log_archive_dest_1= ' Location=use_db_recovery_file_dest valid_for= (all_logfiles,all_roles) DB_UNIQUE_NAME=CWFOL ‘
*.log_archive_dest_2= ' Service=cwfolb lgwr SYNC affirm valid_for= (online_logfiles,primary_role) DB_UNIQUE_NAME= Cwfolb '
Restart each node:
2. Add standby log to the main library:
ALTER DATABASE ADD standby logfile thread 1 (' +data ', ' +fra ') size 200M;
ALTER DATABASE ADD standby logfile thread 1 (' +data ', ' +fra ') size 200M;
ALTER DATABASE ADD standby logfile thread 1 (' +data ', ' +fra ') size 200M;
ALTER DATABASE ADD standby logfile thread 1 (' +data ', ' +fra ') size 200M;
ALTER DATABASE ADD standby logfile thread 1 (' +data ', ' +fra ') size 200M;
ALTER DATABASE ADD standby logfile thread 2 (' +data ', ' +fra ') size 200M;
ALTER DATABASE ADD standby logfile thread 2 (' +data ', ' +fra ') size 200M;
ALTER DATABASE ADD standby logfile thread 2 (' +data ', ' +fra ') size 200M;
ALTER DATABASE ADD standby logfile thread 2 (' +data ', ' +fra ') size 200M;
ALTER DATABASE ADD standby logfile thread 2 (' +data ', ' +fra ') size 200M;
3. Configure the static monitoring, the main library and the standby library, each node,,,
4. The main library turns on flashback and force log:
5. Generate the Password file:
Orapwd file= ' $ORACLE _home/dbs/orapwcwfol1 ' password=oracle entries=5 force=y ignorecase=y;
Orapwd file= ' $ORACLE _home/dbs/orapwcwfol2 ' password=oracle entries=5 force=y ignorecase=y;
Orapwd file= ' $ORACLE _home/dbs/orapwcwfolb ' password=oracle entries=5 force=y ignorecase=y;
Or, after a node is generated, and then copied to another node, rename it.
6. Prepare the library to edit a file, only db_name:
[email protected] dbs]$ cat Initcwfolb.ora
Db_name=cwfolb
7. Edit Duplicate.sql
[email protected] ~]$ cat Duplicate.sql
Duplicate target Database
For standby
From active database
Dorecover
SPFile
Set service_names= ' Cwfolb '
Set Db_unique_name= ' Cwfolb '
Set log_archive_dest_1= ' Location=+fra valid_for= (all_logfiles,all_roles) Db_unique_name=cwfolb '
Set log_archive_dest_2= ' Service=cowellorc lgwr SYNC valid_for= (online_logfiles,primary_role) DB_UNIQUE_NAME=CWFOL '
Set standby_file_management= ' AUTO '
Set fal_server= ' Cwfol '
Set fal_client= ' Cwfolb '
Set control_files= ' +data '
Set cluster_database= ' false ';
The error that occurred:
1.
MAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE, STACK follows ===============
RMAN-00571: ===========================================================
Rman-03002:failure of Duplicate Db command at 01/28/2016 13:03:45
Rman-05501:aborting Duplication of target database
Rman-03015:error occurred in stored script Memory script
Rman-04014:startup failed:ora-00119:invalid Specification for system parameter Remote_listener
Ora-00132:syntax error or unresolved network name ' foldb-cluster-scan:1521 '
Rman> **end-of-file**
*.remote_listener= ' foldb-cluster-scan:1521 '
Workaround: Remove this parameter from the main library and change it back after the copy is complete.
2. The primary and standby libraries cannot be synchronized in real time, with a status of Wait_for_log. ALTER system switch logfile is required.
The reason is that there is no standby log for node 2 on the standby, adding:
ALTER DATABASE ADD standby logfile thread 2 (' +data ', ' +fra ') size 200M;
ALTER DATABASE ADD standby logfile thread 2 (' +data ', ' +fra ') size 200M;
ALTER DATABASE ADD standby logfile thread 2 (' +data ', ' +fra ') size 200M;
ALTER DATABASE ADD standby logfile thread 2 (' +data ', ' +fra ') size 200M;
ALTER DATABASE ADD standby logfile thread 2 (' +data ', ' +fra ') size 200M;
The normal results are as follows:
Sql> select status from V$managed_standby;
STATUS
------------
CLOSING
CLOSING
CLOSING
CONNECTED
IDLE
IDLE
Applying_log
IDLE
IDLE
IDLE
IDLE
One by one rows selected.
RAC-DG Installation Summary