...
No Format |
---|
oracle@kiwi81[/usr/dbvisit/standby]: . oraenv ORACLE_SID = [DEV1] ? DEV1 The Oracle base remains unchanged with value /u01/app/oracle oracle@kiwi81[/usr/dbvisit/standby]: sqlplus /nolog SQL*Plus: Release 11.2.0.4.0 Production on Thu Apr 7 18:47:24 2016 Copyright (c) 1982, 2013, Oracle. All rights reserved. SQL> connect / as sysdba Connected. SQL> show parameter cluster NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ cluster_database boolean FALSE cluster_database_instances integer 1 cluster_interconnects string SQL> select controlfile_type from v$database; CONTROL ------- CURRENT SQL> alter system set cluster_database_instances=2 scope=spfile; System altered. SQL> alter system set cluster_database=true scope=spfile; System altered. SQL> shutdown immediate; Database closed. Database dismounted. ORACLE instance shut down. SQL> exit Disconnected from Oracle Database 11g Release 11.2.0.4.0 - 64bit Production With the Real Application Clusters and Automatic Storage Management options oracle@kiwi81[/usr/dbvisit/standby]: srvctl start database -d DEV oracle@kiwi81[/usr/dbvisit/standby]: srvctl status database -d DEV -v Instance DEV1 is running on node kiwi81. Instance status: Open. Instance DEV2 is running on node kiwi82. Instance status: Open. |
Update Dbvisit Standby -
The second DDC file on the standby server dbv_DEV2.env can now be copied to the secondary primary node - kiwi82, example:
No Format |
---|
oracle@kiwi81[/usr/dbvisit/standby]: scp conf/dbv_DEV2.env kiwi82:/usr/dbvisit/standby/conf/
dbv_DEV2.env 100% 40KB 40.5KB/s 00:00
oracle@kiwi81[/usr/dbvisit/standby]: |
Once the file are on the second primary node kiwi82, you must edit the DDC file by updating the following parameters:
No Format |
---|
SOURCE=kiwi92
DESTINATION=kiwi81 |
to
No Format |
---|
SOURCE = kiwi82
DESTINATION = kiwi91 |
You can now run Dbvisit as normal on both kiwi81 and kiwi82 to send logs to the standby node kiwi91.
Optional - set RAC_TAKEOVER_FORCE
Another option you can review is to send logs from only one RAC primary node, shipping the archive logs for both instances.
This can be done by setting the RAC_TAKEOVER_FORCE parameter in the dbv_DEV1.env DDC file to Y (YES). Example:
No Format |
---|
[15 RAC Settings]
RAC = Y
RAC_TAKEOVER = Y
RAC_TAKEOVER_SID = DEV2
RAC_TAKEOVER_FORCE = Y |
Running Dbvisit Standby now on the new primary node kiwi81, logs will be shipped for both threads:
No Format |
---|
oracle@kiwi81[/usr/dbvisit/standby]: ./dbvisit -R DEV1
=============================================================
Dbvisit Standby Database Technology (7.0.54.15715) (pid 21310)
dbvisit started on kiwi81: Thu Apr 7 19:04:00 2016 ()
=============================================================
>>> Note FORCE_LOGGING is disabled in the primary database.
Waiting 3 seconds for log switch completion...
Resynch option given. Dbvisit Standby configuration will be copied to kiwi91...
> Transferring 'dbv_DEV1.env' to server kiwi91:7890
Progress: 0%...20%...40%...60%...80%...100% [12894 KB/s] - done.
Contacting Standby Database DEV1 on kiwi91...
Next standby sequence required for recovery (80) for thread 1.
>>> Log file(s) for DEV1 will be transferred from kiwi81 to kiwi91...
> Transferring 'thread_1_seq_80.261.908563819.gz' to server kiwi91:7890
Progress: 0%...20%...40%...60%...80%...100% [34678 KB/s] - done.
> Transferring 'thread_1_seq_81.264.908563823.gz' to server kiwi91:7890
Progress: 0%...20%...40%...60%...80%...100% [64 KB/s] - done.
> Transferring 'thread_1_seq_82.263.908564347.gz' to server kiwi91:7890
Progress: 0%...20%...40%...60%...80%...100% [6579 KB/s] - done.
> Transferring 'thread_1_seq_83.270.908564477.gz' to server kiwi91:7890
Progress: 0%...20%...40%...60%...80%...100% [12607 KB/s] - done.
> Transferring 'thread_1_seq_84.268.908564645.gz' to server kiwi91:7890
Progress: 0%...20%...40%...60%...80%...100% [4641 KB/s] - done.
5 archive log transfers to kiwi91 for DEV1 completed.
Last sequence was 84 thread 1.
No Mail sent as SEND_MAIL_FLAG = N
>>> Note FORCE_LOGGING is disabled in the primary database.
Contacting Standby Database DEV1 on kiwi91...
Next standby sequence required for recovery (27) for thread 2.
>>> Log file(s) for DEV2 will be transferred from kiwi82 to kiwi91...
> Transferring 'thread_2_seq_27.271.908564347.gz' to server kiwi91:7890
Progress: 0%...20%...40%...60%...80%...100% [5873 KB/s] - done.
> Transferring 'thread_2_seq_28.269.908564477.gz' to server kiwi91:7890
Progress: 0%...20%...40%...60%...80%...100% [7413 KB/s] - done.
> Transferring 'thread_2_seq_29.267.908564645.gz' to server kiwi91:7890
Progress: 0%...20%...40%...60%...80%...100% [2166 KB/s] - done.
3 archive log transfers to kiwi91 for DEV2 completed.
Last sequence was 29 thread 2.
No Mail sent as SEND_MAIL_FLAG = N
>>> Dbvisit Archive Management Module (AMM)
Dbvisit Archive Management Module (AMM) not turned on
=============================================================
dbvisit ended on kiwi81: Thu Apr 7 19:04:34 2016
============================================================= |
Logs are applied to the standby on kiwi91:
No Format |
---|
oracle@kiwi91[/usr/dbvisit/standby]: ./dbvisit DEV1
=============================================================
Dbvisit Standby Database Technology (7.0.54.15715) (pid 25084)
dbvisit started on kiwi91: Thu Apr 7 19:08:22 2016 ()
=============================================================
>>> Log file(s) for DEV1 from kiwi81 will be applied to kiwi91
201604071908 - Log seq 80 thread 1 applied to standby database DEV1.
201604071908 - Log seq 81 thread 1 applied to standby database DEV1.
201604071908 - Log seq 27 thread 2 applied to standby database DEV1.
201604071908 - Log seq 82 thread 1 applied to standby database DEV1.
201604071908 - Log seq 27 thread 2 applied to standby database DEV1.
201604071908 - Log seq 83 thread 1 applied to standby database DEV1.
201604071908 - Log seq 27 thread 2 applied to standby database DEV1.
201604071908 - Log seq 28 thread 2 applied to standby database DEV1.
201604071908 - Log seq 83 thread 1 applied to standby database DEV1.
201604071908 - Log seq 84 thread 1 applied to standby database DEV1.
201604071908 - Log seq 28 thread 2 applied to standby database DEV1.
201604071908 - Log seq 29 thread 2 applied to standby database DEV1.
201604071908 - Log seq 84 thread 1 applied to standby database DEV1.
No Mail sent as SEND_MAIL_FLAG_DR = N
>>> Dbvisit Archive Management Module (AMM)
Config: number of archives to keep = 0
Config: number of days to keep archives = 7
Config: diskspace full threshold = 80%
Processing /u01/app/oracle/dbvisit_archdest/DEV...
Archive log dir: /u01/app/oracle/dbvisit_archdest/DEV
Total number of archive files : 7
Number of archive logs deleted = 0
Current Disk percent full : 56%
=============================================================
dbvisit ended on kiwi91: Thu Apr 7 19:08:30 2016
============================================================= |
Log Gap Report shows everything is up to date:
No Format |
---|
oracle@kiwi81[/usr/dbvisit/standby]: ./dbvisit -i DEV1
=============================================================
Dbvisit Standby Database Technology (7.0.54.15715) (pid 23654)
dbvisit started on kiwi81: Thu Apr 7 19:10:09 2016 ()
=============================================================
Dbvisit Standby log gap report for DEV1 at 201604071910 (thread 1):
-------------------------------------------------------------
Standby database on kiwi91 is at sequence: 84.
Primary database on kiwi81 is at log sequence: 85.
Primary database on kiwi81 is at archived log sequence: 84.
Dbvisit Standby last transfer log sequence: 84.
Dbvisit Standby last transfer at: 201604071904.
Archive log gap for DEV1: 0.
Transfer log gap for DEV1: 0.
Standby database time lag (HH:MI:SS): 00:06:06.
No Mail sent as SEND_MAIL_FLAG = N
Dbvisit Standby log gap report for DEV2 at 201604071910 (thread 2):
-------------------------------------------------------------
Standby database on kiwi91 is at sequence: 28.
Primary database on kiwi82 is at log sequence: 30.
Primary database on kiwi82 is at archived log sequence: 29.
Dbvisit Standby last transfer log sequence: 29.
Dbvisit Standby last transfer at: 201604071904.
Archive log gap for DEV2: 1.
Transfer log gap for DEV2: 0.
Standby database time lag (HH:MI:SS): 00:06:09.
No Mail sent as SEND_MAIL_FLAG = N
=============================================================
dbvisit ended on kiwi81: Thu Apr 7 19:10:13 2016
============================================================= |
You can now perform a Graceful Switchover (GS) back to the original configuration by running the ./dbv_oraStartStop switchover DDC <key> command.