Thursday, February 22, 2018

Data Guard Config for RAC Database.




This Article will illustrate you for Configuring
11gR2 Physical Standby Setup: Primary Database 2 Node RAC And Standalone Standby Database

Assumptions:
Primary - RAC Node Names:
RAC1, RAC2
Standby – Standalone Name:
RAC3
DB Name:
DELL
Scan Name:
dellc
DB Version:
11.2.0.4
ASM Disk groups:
+DATA
Grid Home:
/u01/app/grid_home
Oracle Home:
/u01/app/oracle/product/11.2.0/dbhome_1


Major Highlighted Steps Before Configuration:
Primary – RAC DB
Standby – Standalone DB
-    Datagaurd Parameters
-    Enable Archivelogs, flashback, force logging,
-    Adding Standby logs
-    Dedicated Listener
-    Tns parameters
-    SCP of orapwDELL to Stanby and renaming
-    Use same host & tns entries on all nodes  
-    Datagaurd Parameters
-    Listerner
-    Tns parameter
-    Creation of Directories
-     



Expected Errors while implementing

1: Why Dedicated Listener For Duplicate Database Command ?
When duplicate database command is issued from RMAN, it copies the password file from Primary database host to Standby database host.  If this operation is performed from remote client (with tnsnames.ora having SCAN name), it would cause issues when password file gets copied from the Primary host to Standby host. This is because SCAN directs connection to a node based on load.  Here is the error:

[oracle@rac3 admin]$ rman target sys/oracle@DELLP auxiliary sys/oracle@DELLS

Recovery Manager: Release 11.2.0.4.0 - Production on Sun Feb 25 08:19:49 2018

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

connected to target database: DELL (DBID=3939503436)
connected to auxiliary database: DELL (not mounted)


RMAN> 
RMAN> duplicate target database for standby from active database nofilenamecheck;

Starting Duplicate Db at 25-FEB-18
using target database control file instead of recovery catalog
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=18 device type=DISK

contents of Memory Script:
{
   backup as copy reuse
   targetfile  '/u01/app/oracle/product/11.2.0/dbhome_1/dbs/orapwDELL2' auxiliary format
 '/u01/app/oracle/product/11.2.0/dbhome_1/dbs/orapwDELL'   ;
}
executing Memory Script

Starting backup at 25-FEB-18
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=100 instance=DELL2 device type=DISK
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 02/25/2018 14:28:10
RMAN-05501: aborting duplication of target database
RMAN-03015: error occurred in stored script Memory Script

RMAN-03009: failure of backup command on ORA_DISK_1 channel at 02/25/2018 14:28:09
ORA-19505: failed to identify file "/u01/app/oracle/product/11.2.0/dbhome_1/dbs/orapwDELL1"
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3

RMAN>

Solution: To avoid this error ORA-19505, create a dedicated Listener on source node [rac1] for this operation.

================================================================================================================
1.1: ORA-12154 Error
RMAN>

RMAN> duplicate target database for standby from active database nofilenamecheck;

Starting Duplicate Db at 25-FEB-18
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=19 device type=DISK

contents of Memory Script:
{
   backup as copy reuse
   targetfile  '/u01/app/oracle/product/11.2.0/dbhome_1/dbs/orapwDELL2' auxiliary format
 '/u01/app/oracle/product/11.2.0/dbhome_1/dbs/orapwDELL'   ;
}
executing Memory Script

Starting backup at 25-FEB-18
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=92 instance=DELL2 device type=DISK
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 02/25/2018 08:05:27
RMAN-05501: aborting duplication of target database
RMAN-03015: error occurred in stored script Memory Script
RMAN-03009: failure of backup command on ORA_DISK_1 channel at 02/25/2018 08:05:27

ORA-17629: Cannot connect to the remote database server
ORA-17627: ORA-12154: TNS:could not resolve the connect identifier specified
ORA-17629: Cannot connect to the remote database server

RMAN>


Solution: Check your Tns entries on all nodes, RAC-nodes, Standalone Server.

================================================================================================================

2: Why need only copy of password file.?
Copy password file from primary host to Standby host and then rename it on standby host. This is just to ensure that duplication can work from a remote client. Otherwise, password file is copied as a part of duplication process.

Solution: If you are explicitly creating password file on standby site, it would give errors while shipping the logs. Only copying of password file from Primary (RAC-1) to Standby (RAC-3) and renaming it on Standby (RAC-3) would work.




How to check master node in RAC Cluster Ware:
[root@rac1 ~]#
[root@rac1 ~]# olsnodes
rac1
rac2
[root@rac1 ~]#
[root@rac1 ~]# cat /u01/app/grid_home/log/rac1/crsd/crsd.log | grep 'OCR MASTER' | tail -1
2018-01-18 11:27:20.201: [  OCRMAS][1223633216]th_master:12: I AM THE NEW OCR MASTER at incar 1. Node Number 1
[root@rac1 ~]#
[root@rac2 ~]# cat /u01/app/grid_home/log/rac2/crsd/crsd.log | grep 'OCR MASTER' | tail -1
2018-01-18 11:27:25.170: [  OCRMAS][1220979008]th_master: NEW OCR MASTER IS 1
[root@rac2 ~]#

Add Host file entries to all nodes:
[root@rac2 ~]#
[root@rac1 ~]#
[root@rac1 ~]# cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1               localhost.localdomain localhost
::1             localhost6.localdomain6 localhost6
##-- Public-IP
192.168.1.11    rac1.dell.com   rac1
192.168.1.12    rac2.dell.com   rac2
192.168.1.13    rac3.dell.com   rac3
##-- Private-IP
10.0.0.11 rac1-priv.dell.com rac1-priv
10.0.0.12 rac2-priv.dell.com rac2-priv
10.0.0.13 rac3-priv.dell.com rac3-priv
##-- Virtual-IP
192.168.1.21 rac1-vip.dell.com rac1-vip
192.168.1.22 rac2-vip.dell.com rac2-vip
192.168.1.23 rac3-vip.dell.com rac3-vip
##-- SCAN IP
192.168.1.30 dellc-scan.dell.com dellc-scan
192.168.1.31 dellc-scan.dell.com dellc-scan
192.168.1.32 dellc-scan.dell.com dellc-scan
##-- Storage-IP
192.168.1.40    san.dell.com    san
[root@rac1 ~]#

[oracle@rac1 ~]$ cd $ORACLE_HOME/dbs
[oracle@rac1 dbs]$ 
[oracle@rac1 dbs]$ cat initDELL1.ora
SPFILE='+DATA/DELL/spfileDELL.ora'
[oracle@rac1 dbs]$
[oracle@rac1 dbs]$
[oracle@rac1 ~]$ 
[oracle@rac1 ~]$ srvctl status database -d DELL
Instance DELL1 is running on node rac1
Instance DELL2 is running on node rac2
[oracle@rac1 ~]$ 
[oracle@rac1 dbs]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.4.0 Production on Thu Feb 22 08:42:50 2018

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


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options

SQL> select INSTANCE_NAME, STATUS, DATABASE_STATUS, VERSION from  gv$instance;

INSTANCE_NAME    STATUS       DATABASE_STATUS   VERSION
---------------- ------------ ----------------- -----------------
DELL1            OPEN         ACTIVE            11.2.0.4.0
DELL2            OPEN         ACTIVE            11.2.0.4.0

SQL>
SQL>
SQL>
SQL> show parameter spfile;

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
spfile                               string      +DATA/dell/spfiledell.ora
SQL>
SQL>
SQL> archive log list;
Database log mode              No Archive Mode
Automatic archival             Disabled
Archive destination            USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence     1
Current log sequence           2
SQL>
SQL>
SQL> show parameter cluster

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
cluster_database                     boolean     TRUE
cluster_database_instances           integer     2
cluster_interconnects                string
SQL>
SQL> select LOG_MODE,FLASHBACK_ON,FORCE_LOGGING from v$database;

LOG_MODE     FLASHBACK_ON       FOR
------------ ------------------ ---
NOARCHIVELOG NO                 NO

SQL>
SQL>


C-R-D files Location
SQL>
SQL> select name from v$controlfile;

NAME
--------------------------------------------------------------------------------
+DATA/dell/control01.ctl
+DATA/dell/control02.ctl

SQL>
SQL> col member for a32;
SQL> SELECT * FROM GV$LOGFILE;

   INST_ID     GROUP# STATUS  TYPE    MEMBER                         IS_
---------- ---------- ------- ------- ------------------------------ ---
         1          2         ONLINE  +DATA/dell/redo02.log          NO
         1          1         ONLINE  +DATA/dell/redo01.log          NO
         1          3         ONLINE  +DATA/dell/redo03.log          NO
         1          4         ONLINE  +DATA/dell/redo04.log          NO
         2          2         ONLINE  +DATA/dell/redo02.log          NO
         2          1         ONLINE  +DATA/dell/redo01.log          NO
         2          3         ONLINE  +DATA/dell/redo03.log          NO
         2          4         ONLINE  +DATA/dell/redo04.log          NO

8 rows selected.


SQL>
SQL> col TABLESPACE_NAME for a20;
SQL> col FILE_NAME for a40;
SQL> select TABLESPACE_NAME, FILE_NAME,STATUS from dba_data_files;

TABLESPACE_NAME      FILE_NAME                                STATUS
-------------------- ---------------------------------------- ---------
USERS                +DATA/dell/users01.dbf                   AVAILABLE
UNDOTBS1             +DATA/dell/undotbs01.dbf                 AVAILABLE
SYSAUX               +DATA/dell/sysaux01.dbf                  AVAILABLE
SYSTEM               +DATA/dell/system01.dbf                  AVAILABLE
UNDOTBS2             +DATA/dell/undotbs02.dbf                 AVAILABLE

SQL>
SQL> select TABLESPACE_NAME, FILE_NAME, STATUS from DBA_TEMP_FILES;

TABLESPACE_NAME      FILE_NAME                                STATUS
-------------------- ---------------------------------------- -------
TEMP                 +DATA/dell/temp01.dbf                    ONLINE

SQL>


The following parameters are of default installation for RAC Database (DELL):
SQL>
SQL> show parameter log_archive_max_processes

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
log_archive_max_processes            integer     4
SQL>


SQL> show parameter standby

NAME                                 TYPE        VALUE

------------------------------------ ----------- ------------------------------
standby_archive_dest                 string      ?/dbs/arch
standby_file_management              string      MANUAL
SQL>
SQL>
SQL> show parameter unique

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
db_unique_name                       string      DELL
SQL>


SQL> show parameter log_archive_config

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
log_archive_config                   string
SQL>

SQL> show parameter log_archive_dest_1

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
log_archive_dest_1                   string
SQL>

SQL> show parameter log_archive_dest_2

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
log_archive_dest_2                   string
SQL>

SQL> show parameter convert

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
db_file_name_convert                 string
log_file_name_convert                string
SQL>
SQL>

SQL> show parameter fal

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
fal_client                           string
fal_server                           string
SQL>


Create new Pfile and upload the below parameter to spfile. Enable Database features.
SQL>
SQL> create pfile from spfile;

File created.

SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options
[oracle@rac1 dbs]$
[oracle@rac1 dbs]$ srvctl stop database -d dell
[oracle@rac1 dbs]$
[oracle@rac1 dbs]$ cat initDELL1.ora
DELL2.__db_cache_size=289406976
DELL1.__db_cache_size=289406976
DELL1.__java_pool_size=4194304
DELL2.__java_pool_size=4194304
DELL2.__large_pool_size=8388608
DELL1.__large_pool_size=8388608
DELL1.__pga_aggregate_target=335544320
DELL2.__pga_aggregate_target=335544320
DELL1.__sga_target=499122176
DELL2.__sga_target=499122176
DELL1.__shared_io_pool_size=0
DELL2.__shared_io_pool_size=0
DELL1.__shared_pool_size=188743680
DELL2.__shared_pool_size=188743680
DELL1.__streams_pool_size=0
DELL2.__streams_pool_size=0
*.audit_file_dest='/u01/app/oracle/admin/DELL/adump'
*.audit_trail='db'
*.cluster_database=true
*.compatible='11.2.0.4.0'
*.control_files='+DATA/DELL/control01.ctl','+DATA/DELL/control02.ctl'
*.db_block_size=8192
*.db_domain=''
*.db_name='DELL'
*.db_recovery_file_dest='+DATA'
*.db_recovery_file_dest_size=4621074432
*.diagnostic_dest='/u01/app/oracle'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=DELLXDB)'
DELL2.instance_number=2
DELL1.instance_number=1
*.memory_target=834666496
*.open_cursors=300
*.processes=150
*.remote_listener='dellc-scan:1521'
*.remote_login_passwordfile='exclusive'
DELL2.thread=2
DELL1.thread=1
DELL2.undo_tablespace='UNDOTBS2'
DELL1.undo_tablespace='UNDOTBS1'
[oracle@rac1 dbs]$
[oracle@rac1 dbs]$

#---Add the below Primary parameters to pfile and create new spfile in same Location in ASM:
#--- Parameters need to add to Primary
*.log_archive_max_processes=20
*.log_archive_config='dg_config=(DELLP,DELLS)'
*.log_archive_dest_1='location=use_db_recovery_file_dest valid_for=(all_logfiles,all_roles) db_unique_name=DELLP'
*.log_archive_dest_2='service="DELLS"','ASYNC NOAFFIRM delay=0 optional compression=disable max_failure=10 max_connections=5 reopen=180 db_unique_name="DELLS" net_timeout=30','valid_for=(online_logfiles,primary_role)'
*.log_archive_dest_state_1='enable'
*.log_archive_dest_state_2='enable'
*.log_file_name_convert='+DATA/DELL/ONLINELOG','/u01/app/oracle/DELLS/onlinelog'
*.db_file_name_convert='+DATA/DELL/DATAFILE','/u01/app/oracle/DELLS/datafile','+DATA/DELL/TEMPFILE','/u01/app/oracle/DELLS/datafile'
*.fal_client='DELLP'
*.fal_server='DELLS'
*.standby_file_management='AUTO'
*.db_unique_name='DELLP'


[oracle@rac1 dbs]$ 
[oracle@rac1 dbs]$ echo $ORACLE_SID
DELL1
[oracle@rac1 dbs]$
[oracle@rac1 dbs]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.4.0 Production on Thu Feb 22 09:09:35 2018

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

Connected to an idle instance.

SQL> startup
ORACLE instance started.

Total System Global Area  830930944 bytes
Fixed Size                  2257800 bytes
Variable Size             599788664 bytes
Database Buffers          226492416 bytes
Redo Buffers                2392064 bytes
Database mounted.
Database opened.
SQL>
SQL> show parameter spfile;

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
spfile                               string
SQL>
SQL> create spfile='+DATA/dell/spfiledell.ora' from pfile;

File created.

SQL>
SQL> select instance_name,status from gv$instance;

INSTANCE_NAME    STATUS
---------------- ------------
DELL1            OPEN

SQL>
SQL> shut immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL>
SQL>
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options
[oracle@rac1 dbs]$
[oracle@rac1 dbs]$
[oracle@rac1 dbs]$ vi initDELL1.ora
[oracle@rac1 dbs]$
[oracle@rac1 dbs]$ cat initDELL1.ora
SPFILE='+DATA/DELL/spfileDELL.ora'
[oracle@rac1 dbs]$


Start Database in Mount State using spfile and Verify Database Parameters updated to spfile:
[oracle@rac1 dbs]$
[oracle@rac1 dbs]$ srvctl status database -d DELL
Instance DELL1 is not running on node rac1
Instance DELL2 is not running on node rac2
[oracle@rac1 dbs]$
[oracle@rac1 dbs]$
[oracle@rac1 dbs]$ srvctl start database -d DELL -o mount
[oracle@rac1 dbs]$
[oracle@rac1 dbs]$
[oracle@rac1 dbs]$ srvctl status database -d DELL
Instance DELL1 is running on node rac1
Instance DELL2 is running on node rac2
[oracle@rac1 dbs]$
[oracle@rac1 dbs]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.4.0 Production on Thu Feb 22 09:20:18 2018

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


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options

SQL> select instance_name,status from gv$instance;

INSTANCE_NAME    STATUS
---------------- ------------
DELL2            MOUNTED
DELL1            MOUNTED


SQL> show parameter spfile;

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
spfile                               string      +DATA/dell/spfiledell.ora
SQL>
SQL>
SQL> show parameter convert

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
db_file_name_convert                 string      +DATA/DELL/DATAFILE, /u01/app/
                                                 oracle/DELLS/datafile, +DATA/D
                                                 ELL/TEMPFILE, /u01/app/oracle/
                                                 DELLS/datafile
log_file_name_convert                string      +DATA/DELL/ONLINELOG, /u01/app
                                                 /oracle/DELLS/onlinelog
SQL>
SQL> show parameter fal

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
fal_client                           string      DELLP
fal_server                           string      DELLS
SQL>
SQL> show parameter standby

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
standby_archive_dest                 string      ?/dbs/arch
standby_file_management              string      AUTO
SQL>
SQL>
SQL> show parameter unique

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
db_unique_name                       string      DELLP
SQL>
SQL>


Enable Database Features: Archivelog, Flashback, Force logging and Standby logfiles:
SQL> 
SQL> archive log list;
Database log mode              No Archive Mode
Automatic archival             Disabled
Archive destination            USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence     2
Current log sequence           3

SQL>
SQL>
SQL> select LOG_MODE,FLASHBACK_ON,FORCE_LOGGING from v$database;

LOG_MODE     FLASHBACK_ON       FOR
------------ ------------------ ---
NOARCHIVELOG NO                 NO

SQL>
SQL> alter database archivelog;

Database altered.

SQL>
SQL> alter database flashback on;

Database altered.

SQL>
SQL> alter database force logging;

Database altered.

SQL>
SQL> archive log list;
Database log mode              Archive Mode
Automatic archival             Enabled
Archive destination            USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence     2
Next log sequence to archive   3
Current log sequence           3
SQL>
SQL>
SQL> select LOG_MODE,FLASHBACK_ON,FORCE_LOGGING from v$database;

LOG_MODE     FLASHBACK_ON       FOR
------------ ------------------ ---
ARCHIVELOG   YES                YES

SQL>

Adding Standby Redologs:
SQL>
SQL> select * from v$standby_log;

no rows selected

SQL> 
SQL> select * from gv$standby_log;

no rows selected

SQL>
SQL> select * from gv$log;

   INST_ID     GROUP#    THREAD#  SEQUENCE#      BYTES  BLOCKSIZE    MEMBERS ARC
---------- ---------- ---------- ---------- ---------- ---------- ---------- ---
STATUS           FIRST_CHANGE# FIRST_TIM NEXT_CHANGE# NEXT_TIME
---------------- ------------- --------- ------------ ---------
         1          1          1          3   52428800        512          1 NO
CURRENT                 937220 22-FEB-18   2.8147E+14

         1          2          1          2   52428800        512          1 YES
INACTIVE                926002 22-FEB-18       937220 22-FEB-18

         1          3          2          1   52428800        512          1 NO
CURRENT                 932933 22-FEB-18   2.8147E+14 22-FEB-18


   INST_ID     GROUP#    THREAD#  SEQUENCE#      BYTES  BLOCKSIZE    MEMBERS ARC
---------- ---------- ---------- ---------- ---------- ---------- ---------- ---
STATUS           FIRST_CHANGE# FIRST_TIM NEXT_CHANGE# NEXT_TIME
---------------- ------------- --------- ------------ ---------
         1          4          2          0   52428800        512          1 YES
UNUSED                       0                      0

         2          1          1          3   52428800        512          1 NO
CURRENT                 937220 22-FEB-18   2.8147E+14

         2          2          1          2   52428800        512          1 YES
INACTIVE                926002 22-FEB-18       937220 22-FEB-18


   INST_ID     GROUP#    THREAD#  SEQUENCE#      BYTES  BLOCKSIZE    MEMBERS ARC
---------- ---------- ---------- ---------- ---------- ---------- ---------- ---
STATUS           FIRST_CHANGE# FIRST_TIM NEXT_CHANGE# NEXT_TIME
---------------- ------------- --------- ------------ ---------
         2          3          2          1   52428800        512          1 NO
CURRENT                 932933 22-FEB-18   2.8147E+14 22-FEB-18

         2          4          2          0   52428800        512          1 YES
UNUSED                       0                      0


8 rows selected.

SQL>

SQL> select INST_ID, GROUP#, THREAD#, BYTES  from gv$log;

   INST_ID     GROUP#    THREAD#      BYTES
---------- ---------- ---------- ----------
         1          1          1   52428800
         1          2          1   52428800
         1          3          2   52428800
         1          4          2   52428800
         2          1          1   52428800
         2          2          1   52428800
         2          3          2   52428800
         2          4          2   52428800

8 rows selected.

SQL>
SQL> select INST_ID, GROUP#, THREAD#, BYTES from gv$standby_log;

no rows selected

SQL>
SQL> col member for a32;
SQL> SELECT * FROM GV$LOGFILE;

   INST_ID     GROUP# STATUS  TYPE    MEMBER                         IS_
---------- ---------- ------- ------- ------------------------------ ---
         1          2         ONLINE  +DATA/dell/redo02.log          NO
         1          1         ONLINE  +DATA/dell/redo01.log          NO
         1          3         ONLINE  +DATA/dell/redo03.log          NO
         1          4         ONLINE  +DATA/dell/redo04.log          NO
         2          2         ONLINE  +DATA/dell/redo02.log          NO
         2          1         ONLINE  +DATA/dell/redo01.log          NO
         2          3         ONLINE  +DATA/dell/redo03.log          NO
         2          4         ONLINE  +DATA/dell/redo04.log          NO

8 rows selected.


SQL>

SQL> alter database add standby logfile '+DATA/dell/stbyredo05.log' size 50M;

Database altered.

SQL> alter database add standby logfile '+DATA/dell/stbyredo06.log' size 50M;

Database altered.

SQL> alter database add standby logfile '+DATA/dell/stbyredo07.log' size 50M;

Database altered.

SQL> alter database add standby logfile '+DATA/dell/stbyredo08.log' size 50M;

Database altered.

SQL>
SQL> SELECT * FROM GV$LOGFILE;

   INST_ID     GROUP# STATUS  TYPE    MEMBER                           IS_
---------- ---------- ------- ------- -------------------------------- ---
         1          2         ONLINE  +DATA/dell/redo02.log            NO
         1          1         ONLINE  +DATA/dell/redo01.log            NO
         1          3         ONLINE  +DATA/dell/redo03.log            NO
         1          4         ONLINE  +DATA/dell/redo04.log            NO
         1          5         STANDBY +DATA/dell/stbyredo05.log        NO
         1          6         STANDBY +DATA/dell/stbyredo06.log        NO
         1          7         STANDBY +DATA/dell/stbyredo07.log        NO
         1          8         STANDBY +DATA/dell/stbyredo08.log        NO
         2          2         ONLINE  +DATA/dell/redo02.log            NO
         2          1         ONLINE  +DATA/dell/redo01.log            NO
         2          3         ONLINE  +DATA/dell/redo03.log            NO

   INST_ID     GROUP# STATUS  TYPE    MEMBER                           IS_
---------- ---------- ------- ------- -------------------------------- ---
         2          4         ONLINE  +DATA/dell/redo04.log            NO
         2          5         STANDBY +DATA/dell/stbyredo05.log        NO
         2          6         STANDBY +DATA/dell/stbyredo06.log        NO
         2          7         STANDBY +DATA/dell/stbyredo07.log        NO
         2          8         STANDBY +DATA/dell/stbyredo08.log        NO

16 rows selected.

SQL>
SQL> select INST_ID, GROUP#, THREAD#, BYTES  from gv$log;

   INST_ID     GROUP#    THREAD#      BYTES
---------- ---------- ---------- ----------
         2          1          1   52428800
         2          2          1   52428800
         2          3          2   52428800
         2          4          2   52428800
         1          1          1   52428800
         1          2          1   52428800
         1          3          2   52428800
         1          4          2   52428800

8 rows selected.

SQL>
SQL> select INST_ID, GROUP#, THREAD#, BYTES from gv$standby_log;

   INST_ID     GROUP#    THREAD#      BYTES
---------- ---------- ---------- ----------
         1          5          0   52428800
         1          6          0   52428800
         1          7          0   52428800
         1          8          0   52428800
         2          5          0   52428800
         2          6          0   52428800
         2          7          0   52428800
         2          8          0   52428800

8 rows selected.


SQL> show parameter back_

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
background_dump_dest                 string      /u01/app/oracle/diag/rdbms/del
                                                 lp/DELL1/trace

SQL>
SQL> select instance_name,status from gv$instance;

INSTANCE_NAME    STATUS
---------------- ------------
DELL2            MOUNTED
DELL1            MOUNTED



SQL>
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options
[oracle@rac1 dbs]$



Open new Window for Primary alert log
[root@rac1 ~]# 
[root@rac1 ~]# tail -f /u01/app/oracle/diag/rdbms/dellp/DELL1/trace/alert_DELL1.log



[oracle@rac1 dbs]$
[oracle@rac1 dbs]$ srvctl stop database -d DELL
[oracle@rac1 dbs]$
[oracle@rac1 dbs]$ srvctl start database -d DELL
[oracle@rac1 dbs]$
[oracle@rac1 dbs]$ srvctl status database -d DELL
Instance DELL1 is running on node rac1
Instance DELL2 is running on node rac2
[oracle@rac1 dbs]$
[oracle@rac1 dbs]$ lsnrctl status

LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 22-FEB-2018 09:51:55

Copyright (c) 1991, 2013, Oracle.  All rights reserved.

Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 11.2.0.4.0 - Production
Start Date                22-FEB-2018 08:19:53
Uptime                    0 days 1 hr. 32 min. 2 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/grid_home/network/admin/listener.ora
Listener Log File         /u01/app/grid/diag/tnslsnr/rac1/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.1.11)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.1.21)(PORT=1521)))
Services Summary...
Service "+ASM" has 1 instance(s).
  Instance "+ASM1", status READY, has 1 handler(s) for this service...
Service "DELLP" has 1 instance(s).
  Instance "DELL1", status READY, has 1 handler(s) for this service...
Service "DELLXDB" has 1 instance(s).
  Instance "DELL1", status READY, has 1 handler(s) for this service...
The command completed successfully
[oracle@rac1 dbs]$
[oracle@rac1 dbs]$ cd $TNS_ADMIN
[oracle@rac1 admin]$ 
[oracle@rac1 admin]$ cat tnsnames.ora
[oracle@rac2 admin]$ cat tnsnames.ora
[oracle@rac3 admin]$ cat tnsnames.ora
# tnsnames.ora Network Configuration File: /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.

DELL =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = dellc-scan)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = DELL)
    )
  )

DELLS =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = rac3.dell.com)(PORT = 1522))
    )
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = DELLS)
       (SID = DELL)
     (UR =A)
    )
  )

DELLP =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = dellc-scan)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = DELLP)
    )
  )

[oracle@rac1 admin]$
[oracle@rac1 admin]$


Creation of new Listener form oracle Home to avoid Error (ORA-19505):
[root@rac1 ~]# xhost +
access control disabled, clients can connect from any host
[root@rac1 ~]# su - oracle
[oracle@rac1 ~]$ . dell.env
[oracle@rac1 ~]$
[oracle@rac1 ~]$ cd $TNS_ADMIN
[oracle@rac1 admin]$ 
[oracle@rac1 admin]$ netca

Oracle Net Services Configuration:












Configuring Listener:DELL1
Listener configuration complete.
Oracle Net Listener Startup:
    Running Listener Control:
      /u01/app/oracle/product/11.2.0/dbhome_1/bin/lsnrctl start DELL1
    Listener Control complete.
    Listener started successfully.
Oracle Net Services configuration successful. The exit code is 0
[oracle@rac1 admin]$
[oracle@rac1 admin]$ cat listener.ora
# listener.ora Network Configuration File: /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
# Generated by Oracle configuration tools.

ENABLE_GLOBAL_DYNAMIC_ENDPOINT_DELL1 = ON

ADR_BASE_DELL1 = /u01/app/oracle

DELL1 =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = rac1.dell.com)(PORT = 1523))
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1523))
    )
  )

[oracle@rac1 admin]$

[oracle@rac1 admin]$ lsnrctl status DELL1

LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 22-FEB-2018 13:51:57

Copyright (c) 1991, 2013, Oracle.  All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=rac1.dell.com)(PORT=1523)))
STATUS of the LISTENER
------------------------
Alias                     DELL1
Version                   TNSLSNR for Linux: Version 11.2.0.4.0 - Production
Start Date                22-FEB-2018 13:48:53
Uptime                    0 days 0 hr. 3 min. 3 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Listener Log File         /u01/app/oracle/diag/tnslsnr/rac1/dell1/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=rac1.dell.com)(PORT=1523)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1523)))
The listener supports no services
The command completed successfully
[oracle@rac1 admin]$


If you are explicitly creating password file on standby site, it would give errors while shipping the logs. Only copying of password file from Primary (RAC-1) to Standby(RAC-3) and renaming it on Standby (RAC-3) would work.
NOTE: Copy orapwdDELL1 before performing RMAN Duplication to avoid any error, because orapwd also contains checkpoint number which should match with Primary while performing duplication.
[oracle@rac1 admin]$
[oracle@rac1 admin]$ cd $ORACLE_HOME/dbs
[oracle@rac1 dbs]$
[oracle@rac1 dbs]$ scp orapwDELL1 oracle@rac3:$ORACLE_HOME/dbs
The authenticity of host 'rac3 (192.168.1.13)' can't be established.
RSA key fingerprint is a7:48:c7:eb:59:97:56:0a:6c:2a:ac:56:27:be:d5:4e.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'rac3,192.168.1.13' (RSA) to the list of known hosts.
oracle@rac3's password:
orapwDELL1                                    100% 1536     1.5KB/s   00:00
[oracle@rac1 dbs]$


[oracle@rac2 admin]$ lsnrctl status

LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 22-FEB-2018 10:39:00

Copyright (c) 1991, 2013, Oracle.  All rights reserved.

Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 11.2.0.4.0 - Production
Start Date                22-FEB-2018 08:19:53
Uptime                    0 days 2 hr. 19 min. 7 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/grid_home/network/admin/listener.ora
Listener Log File         /u01/app/grid/diag/tnslsnr/rac2/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.1.12)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.1.22)(PORT=1521)))
Services Summary...
Service "+ASM" has 1 instance(s).
  Instance "+ASM2", status READY, has 1 handler(s) for this service...
Service "DELLP" has 1 instance(s).
  Instance "DELL2", status READY, has 1 handler(s) for this service...
Service "DELLXDB" has 1 instance(s).
  Instance "DELL2", status READY, has 1 handler(s) for this service...
The command completed successfully
[oracle@rac2 admin]$




STANDBY DB (192.168.1.13)
Preparation of Standby
[root@rac3 ~]#
[root@rac3 ~]# fdisk -l
[root@rac3 ~]#
[root@rac3 ~]# iscsiadm -m discovery -t st -p 192.168.1.40
192.168.1.40:3260,1 iqn.2006-01.com.openfiler:tsn.5cbf23534a21
[root@rac3 ~]#
[root@rac3 ~]# service iscsi restart
iscsiadm: No matching sessions found
Stopping iSCSI daemon:
iscsid is stopped                                          [  OK  ]
Starting iSCSI daemon: FATAL: Error inserting ib_iser (/lib/modules/2.6.32-200.13.1.el5uek/kernel/drivers/infiniband/ulp/iser/ib_iser.ko): Unknown symbol in module, or unknown parameter (see dmesg)
                                                           [  OK  ]
                                                           [  OK  ]
Setting up iSCSI targets: Logging in to [iface: default, target: iqn.2006-01.com.openfiler:tsn.5cbf23534a21, portal: 192.168.1.40,3260]
Login to [iface: default, target: iqn.2006-01.com.openfiler:tsn.5cbf23534a21, portal: 192.168.1.40,3260] successful.
                                                           [  OK  ]
[root@rac3 ~]# fdisk -l

Disk /dev/sda: 214.7 GB, 214748364800 bytes
255 heads, 63 sectors/track, 26108 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1        3824    30716248+  83  Linux
/dev/sda2            3825        5099    10241437+  82  Linux swap / Solaris
/dev/sda3            5100        6374    10241437+  83  Linux
/dev/sda4            6375       26108   158513355    5  Extended
/dev/sda5            6375       26108   158513323+  83  Linux

Disk /dev/sdb: 102.3 GB, 102374572032 bytes
255 heads, 63 sectors/track, 12446 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1       12446    99972463+  83  Linux
[root@rac3 ~]#
[root@rac3 ~]# chkconfig iscsi on
[root@rac3 ~]#
[root@rac3 ~]# chown –R oracle:oinstall /u01
[root@rac3 ~]#
[root@rac3 ~]# su - oracle
[oracle@rac3 ~]$
[oracle@rac3 ~]$ cat dell.env
export ORACLE_SID=DELL
export ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1
export PATH=$ORACLE_HOME/bin:$PATH
export TNS_ADMIN=$ORACLE_HOME/network/admin
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib/usr/lib; export LD_LIBRARY_PATH
[oracle@rac3 ~]$
[oracle@rac3 ~]$ mkdir -p /u01/app/oracle/admin/DELL/adump
[oracle@rac3 ~]$ mkdir -p /u01/app/oracle/flash_recovery_area
[oracle@rac3 ~]$
[oracle@rac3 ~]$ . dell.env
[oracle@rac3 ~]$
[oracle@rac3 ~]$ cd $ORACLE_HOME/dbs
[oracle@rac3 dbs]$
[oracle@rac3 dbs]$
[oracle@rac3 dbs]$ vi initDELL.ora
*.audit_file_dest='/u01/app/oracle/admin/DELL/adump'
*.compatible='11.2.0.4.0'
*.db_create_file_dest='/u01/app/oracle'
*.db_name='DELL'
*.db_recovery_file_dest='/u01/app/oracle/flash_recovery_area'
*.DB_RECOVERY_FILE_DEST_SIZE=20G
*.db_unique_name='DELLS'
*.fal_client='DELLS'
*.fal_server='DELL'
*.local_listener='(ADDRESS=(PROTOCOL=TCP)(HOST=rac3.dell.com)(PORT=1522))'
*.log_archive_config='dg_config=(DELLS,DELLP)'
*.log_archive_dest_1='location=use_db_recovery_file_dest valid_for=(all_logfiles,all_roles) db_unique_name=DELLS'
*.log_archive_dest_2='service=DELLP LGWR ASYNC NOAFFIRM max_failure=10 max_connections=5 reopen=180 valid_for=(online_logfiles,primary_role) db_unique_name=DELLP'
*.log_archive_dest_state_1='enable'
*.log_archive_dest_state_2='enable'
*.log_archive_max_processes=20
*.remote_listener='dellc-scan:1521'
*.sga_target=2G
*.standby_file_management='AUTO'


[oracle@rac3 dbs]$
[oracle@rac3 dbs]$ cd $TNS_ADMIN
[oracle@rac3 admin]$
[oracle@rac3 admin]$ vi tnsnames.ora
[oracle@rac3 admin]$
[oracle@rac3 admin]$ vi listener.ora
# listener.ora Network Configuration File: /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
# Generated by Oracle configuration tools.

DELLS =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = rac3.dell.com)(PORT = 1522))
    )
  )

SID_LIST_DELLS =
  (SID_LIST =
    (SID_DESC =
      (ORACLE_HOME= /u01/app/oracle/product/11.2.0/dbhome_1)
      (SID_NAME = DELL)
      (GLOBAL_DBNAME = DELLS)
    )
)

ADR_BASE_DELLS = /u01/app/oracle


[oracle@rac3 admin]$
[oracle@rac3 admin]$
[oracle@rac3 admin]$
[oracle@rac3 admin]$ lsnrctl start DELLS

LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 20-FEB-2018 16:16:27

Copyright (c) 1991, 2013, Oracle.  All rights reserved.

Starting /u01/app/oracle/product/11.2.0/dbhome_1/bin/tnslsnr: please wait...

TNSLSNR for Linux: Version 11.2.0.4.0 - Production
System parameter file is /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Log messages written to /u01/app/oracle/product/11.2.0/dbhome_1/log/diag/tnslsnr/rac3/dells/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=rac3.dell.com)(PORT=1522)))

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=rac3.dell.com)(PORT=1522)))
STATUS of the LISTENER
------------------------
Alias                     DELLS
Version                   TNSLSNR for Linux: Version 11.2.0.4.0 - Production
Start Date                20-FEB-2018 16:16:28
Uptime                    0 days 0 hr. 0 min. 0 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Listener Log File         /u01/app/oracle/product/11.2.0/dbhome_1/log/diag/tnslsnr/rac3/dells/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=rac3.dell.com)(PORT=1522)))
Services Summary...
Service "DELLS" has 1 instance(s).
  Instance "DELL", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
[oracle@rac3 admin]$

[oracle@rac3 admin]$ lsnrctl status DELLS

LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 20-FEB-2018 16:16:39

Copyright (c) 1991, 2013, Oracle.  All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=rac3.dell.com)(PORT=1522)))
STATUS of the LISTENER
------------------------
Alias                     DELLS
Version                   TNSLSNR for Linux: Version 11.2.0.4.0 - Production
Start Date                20-FEB-2018 16:16:28
Uptime                    0 days 0 hr. 0 min. 11 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Listener Log File         /u01/app/oracle/product/11.2.0/dbhome_1/log/diag/tnslsnr/rac3/dells/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=rac3.dell.com)(PORT=1522)))
Services Summary...
Service "DELLS" has 1 instance(s).
  Instance "DELL", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
[oracle@rac3 admin]$

[oracle@rac3 admin]$ cd $ORACLE_HOME/dbs
[oracle@rac3 dbs]$
[oracle@rac3 dbs]$
[oracle@rac3 dbs]$ ls
initDELL.ora  init.ora  orapwDELL1
[oracle@rac3 dbs]$
[oracle@rac3 dbs]$ mv orapwDELL1 orapwDELL
[oracle@rac3 dbs]$
[oracle@rac3 dbs]$ echo $ORACLE_SID
DELL
[oracle@rac3 dbs]$

[oracle@rac3 dbs]$
[oracle@rac3 dbs]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.4.0 Production on Thu Feb 22 14:00:33 2018

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

Connected to an idle instance.

SQL> create spfile from pfile;

File created.

SQL> startup nomount;
ORACLE instance started.

Total System Global Area 2137886720 bytes
Fixed Size                  2254952 bytes
Variable Size             503318424 bytes
Database Buffers         1627389952 bytes
Redo Buffers                4923392 bytes
SQL> alter system register;

System altered.

SQL> show parameter back_

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
background_dump_dest                 string      /u01/app/oracle/product/11.2.0
                                                 /dbhome_1/log/diag/rdbms/dells
                                                 /DELL/trace
SQL>
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle@rac3 dbs]$


Open new Window for Standby alert log
[root@rac3 ~]# 
[root@rac3 ~]# tail -f /u01/app/oracle/product/11.2.0/dbhome_1/log/diag/rdbms/dells/DELL/trace/alert_DELL.log

[oracle@rac3 dbs]$
[oracle@rac3 dbs]$ lsnrctl status DELLS


LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 22-FEB-2018 14:01:53

Copyright (c) 1991, 2013, Oracle.  All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=rac3.dell.com)(PORT=1522)))
STATUS of the LISTENER
------------------------
Alias                     DELLS
Version                   TNSLSNR for Linux: Version 11.2.0.4.0 - Production
Start Date                22-FEB-2018 13:57:35
Uptime                    0 days 0 hr. 4 min. 18 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Listener Log File         /u01/app/oracle/diag/tnslsnr/rac3/dells/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=rac3.dell.com)(PORT=1522)))
Services Summary...
Service "DELLS" has 2 instance(s).
  Instance "DELL", status UNKNOWN, has 1 handler(s) for this service...
  Instance "DELL", status BLOCKED, has 1 handler(s) for this service...
The command completed successfully
[oracle@rac3 dbs]$
[oracle@rac3 admin]$
[oracle@rac3 admin]$
[oracle@rac3 admin]$ tnsping dell


TNS Ping Utility for Linux: Version 11.2.0.4.0 - Production on 25-FEB-2018 07:50:41

Copyright (c) 1997, 2013, Oracle.  All rights reserved.

Used parameter files:


Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = dellc-scan)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = DELL)))
OK (10 msec)
[oracle@rac3 admin]$
[oracle@rac3 admin]$
[oracle@rac3 admin]$
[oracle@rac3 admin]$ tnsping dells

TNS Ping Utility for Linux: Version 11.2.0.4.0 - Production on 22-FEB-2018 14:24:50

Copyright (c) 1997, 2013, Oracle.  All rights reserved.

Used parameter files:


Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = rac3.dell.com)(PORT = 1522))) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = DELLS) (SID = DELL) (UR =A)))
OK (0 msec)
[oracle@rac3 admin]$
[oracle@rac3 admin]$
[oracle@rac3 admin]$
[oracle@rac3 admin]$ tnsping dellp

TNS Ping Utility for Linux: Version 11.2.0.4.0 - Production on 25-FEB-2018 07:52:18

Copyright (c) 1997, 2013, Oracle.  All rights reserved.

Used parameter files:


Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = dellc-scan)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = DELLP)))
OK (10 msec)
[oracle@rac3 admin]$
[oracle@rac3 admin]$
[oracle@rac3 admin]$ rman target sys/oracle@DELLP auxiliary sys/oracle@DELLS

Recovery Manager: Release 11.2.0.4.0 - Production on Sun Feb 25 08:19:49 2018

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

connected to target database: DELL (DBID=3939503436)
connected to auxiliary database: DELL (not mounted)

RMAN> duplicate target database for standby from active database nofilenamecheck;

Starting Duplicate Db at 25-FEB-18
using target database control file instead of recovery catalog
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=1 device type=DISK

contents of Memory Script:
{
   backup as copy reuse
   targetfile  '/u01/app/oracle/product/11.2.0/dbhome_1/dbs/orapwDELL2' auxiliary format
 '/u01/app/oracle/product/11.2.0/dbhome_1/dbs/orapwDELL'   ;
}
executing Memory Script

Starting backup at 25-FEB-18
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=79 instance=DELL1 device type=DISK
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 02/25/2018 09:46:56
RMAN-05501: aborting duplication of target database
RMAN-03015: error occurred in stored script Memory Script
RMAN-03009: failure of backup command on ORA_DISK_1 channel at 02/25/2018 09:46:56
ORA-19505: failed to identify file "/u01/app/oracle/product/11.2.0/dbhome_1/dbs/orapwDELL2"
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3

RMAN>

If Duplication failed with error ORA-19505 again, then copy the latest orapwdDELL1 to Standby Server and Retry Duplication:
[oracle@rac1 dbs]$ 
[oracle@rac1 dbs]$ scp orapwDELL1 oracle@rac3:$ORACLE_HOME/dbs
oracle@rac3's password:
orapwDELL1                                    100% 1536     1.5KB/s   00:00
[oracle@rac1 dbs]$

And at Standby server rename the file
[oracle@rac3 dbs]$ 
[oracle@rac3 dbs]$ rm –rf orapwDELL
[oracle@rac3 dbs]$ mv orapwDELL1 orapwDELL

[oracle@rac3 dbs]$

[oracle@rac3 dbs]$
[oracle@rac3 dbs]$ rman target sys/oracle@DELLP auxiliary sys/oracle@DELLS

Recovery Manager: Release 11.2.0.4.0 - Production on Sun Feb 25 08:19:49 2018

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

connected to target database: DELL (DBID=3939503436)
connected to auxiliary database: DELL (not mounted)

RMAN>



RMAN> duplicate target database for standby from active database nofilenamecheck;

Starting Duplicate Db at 25-FEB-18
using target database control file instead of recovery catalog
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=18 device type=DISK

contents of Memory Script:
{
   backup as copy reuse
   targetfile  '/u01/app/oracle/product/11.2.0/dbhome_1/dbs/orapwDELL2' auxiliary format
 '/u01/app/oracle/product/11.2.0/dbhome_1/dbs/orapwDELL'   ;
}
executing Memory Script

Starting backup at 25-FEB-18
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=100 instance=DELL2 device type=DISK
Finished backup at 25-FEB-18

contents of Memory Script:
{
   sql clone "alter system set  control_files =
  ''/u01/app/oracle/DELLS/controlfile/o1_mf_f94kw533_.ctl'', ''/u01/app/oracle/flash_recovery_area/DELLS/controlfile/o1_mf_f94kw535_.ctl'' comment=
 ''Set by RMAN'' scope=spfile";
   backup as copy current controlfile for standby auxiliary format  '/u01/app/oracle/DELLS/controlfile/o1_mf_f94kw55y_.ctl';
   restore clone controlfile to  '/u01/app/oracle/flash_recovery_area/DELLS/controlfile/o1_mf_f94kw560_.ctl' from
 '/u01/app/oracle/DELLS/controlfile/o1_mf_f94kw55y_.ctl';
   sql clone "alter system set  control_files =
  ''/u01/app/oracle/DELLS/controlfile/o1_mf_f94kw55y_.ctl'', ''/u01/app/oracle/flash_recovery_area/DELLS/controlfile/o1_mf_f94kw560_.ctl'' comment=
 ''Set by RMAN'' scope=spfile";
   shutdown clone immediate;
   startup clone nomount;
}
executing Memory Script

sql statement: alter system set  control_files =   ''/u01/app/oracle/DELLS/controlfile/o1_mf_f94kw533_.ctl'', ''/u01/app/oracle/flash_recovery_area/DELLS/controlfile/o1_mf_f94kw535_.ctl'' comment= ''Set by RMAN'' scope=spfile

Starting backup at 25-FEB-18
using channel ORA_DISK_1
channel ORA_DISK_1: starting datafile copy
copying standby control file
output file name=/u01/app/oracle/product/11.2.0/dbhome_1/dbs/snapcf_DELL2.f tag=TAG20180225T082005 RECID=1 STAMP=969006006
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:01
Finished backup at 25-FEB-18

Starting restore at 25-FEB-18
using channel ORA_AUX_DISK_1

channel ORA_AUX_DISK_1: copied control file copy
Finished restore at 25-FEB-18

sql statement: alter system set  control_files =   ''/u01/app/oracle/DELLS/controlfile/o1_mf_f94kw55y_.ctl'', ''/u01/app/oracle/flash_recovery_area/DELLS/controlfile/o1_mf_f94kw560_.ctl'' comment= ''Set by RMAN'' scope=spfile

Oracle instance shut down

connected to auxiliary database (not started)
Oracle instance started

Total System Global Area    2137886720 bytes

Fixed Size                     2254952 bytes
Variable Size                503318424 bytes
Database Buffers            1627389952 bytes
Redo Buffers                   4923392 bytes

contents of Memory Script:
{
   sql clone 'alter database mount standby database';
}
executing Memory Script

sql statement: alter database mount standby database

contents of Memory Script:
{
   set newname for clone tempfile  1 to new;
   switch clone tempfile all;
   set newname for clone datafile  1 to new;
   set newname for clone datafile  2 to new;
   set newname for clone datafile  3 to new;
   set newname for clone datafile  4 to new;
   set newname for clone datafile  5 to new;
   backup as copy reuse
   datafile  1 auxiliary format new
   datafile  2 auxiliary format new
   datafile  3 auxiliary format new
   datafile  4 auxiliary format new
   datafile  5 auxiliary format new
   ;
   sql 'alter system archive log current';
}
executing Memory Script

executing command: SET NEWNAME

renamed tempfile 1 to /u01/app/oracle/DELLS/datafile/o1_mf_temp_%u_.tmp in control file

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

Starting backup at 25-FEB-18
using channel ORA_DISK_1
channel ORA_DISK_1: starting datafile copy
input datafile file number=00001 name=+DATA/dell/system01.dbf
output file name=/u01/app/oracle/DELLS/datafile/o1_mf_system_02ss3mu3_.dbf tag=TAG20180225T082019
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:35
channel ORA_DISK_1: starting datafile copy
input datafile file number=00002 name=+DATA/dell/sysaux01.dbf
output file name=/u01/app/oracle/DELLS/datafile/o1_mf_sysaux_03ss3mv6_.dbf tag=TAG20180225T082019
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:25
channel ORA_DISK_1: starting datafile copy
input datafile file number=00003 name=+DATA/dell/undotbs01.dbf
output file name=/u01/app/oracle/DELLS/datafile/o1_mf_undotbs1_04ss3n00_.dbf tag=TAG20180225T082019
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:07
channel ORA_DISK_1: starting datafile copy
input datafile file number=00005 name=+DATA/dell/undotbs02.dbf
output file name=/u01/app/oracle/DELLS/datafile/o1_mf_undotbs2_05ss3n08_.dbf tag=TAG20180225T082019
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:01
channel ORA_DISK_1: starting datafile copy
input datafile file number=00004 name=+DATA/dell/users01.dbf
output file name=/u01/app/oracle/DELLS/datafile/o1_mf_users_06ss3n09_.dbf tag=TAG20180225T082019
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:01
Finished backup at 25-FEB-18

sql statement: alter system archive log current

contents of Memory Script:
{
   switch clone datafile all;
}
executing Memory Script

datafile 1 switched to datafile copy
input datafile copy RECID=1 STAMP=969006095 file name=/u01/app/oracle/DELLS/datafile/o1_mf_system_02ss3mu3_.dbf
datafile 2 switched to datafile copy
input datafile copy RECID=2 STAMP=969006095 file name=/u01/app/oracle/DELLS/datafile/o1_mf_sysaux_03ss3mv6_.dbf
datafile 3 switched to datafile copy
input datafile copy RECID=3 STAMP=969006095 file name=/u01/app/oracle/DELLS/datafile/o1_mf_undotbs1_04ss3n00_.dbf
datafile 4 switched to datafile copy
input datafile copy RECID=4 STAMP=969006095 file name=/u01/app/oracle/DELLS/datafile/o1_mf_users_06ss3n09_.dbf
datafile 5 switched to datafile copy
input datafile copy RECID=5 STAMP=969006095 file name=/u01/app/oracle/DELLS/datafile/o1_mf_undotbs2_05ss3n08_.dbf
Finished Duplicate Db at 25-FEB-18

RMAN>

RMAN> exit



Recovery Manager complete.
[oracle@rac3 admin]$
[oracle@rac3 admin]$
[oracle@rac3 admin]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.4.0 Production on Thu Feb 22 15:39:45 2018

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


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL>
SQL> select NAME,CONTROLFILE_TYPE,OPEN_MODE from v$database;

NAME      CONTROL OPEN_MODE
--------- ------- --------------------
DELL      STANDBY MOUNTED

SQL>

SQL> archive log list;
Database log mode              Archive Mode
Automatic archival             Enabled
Archive destination            USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence     3
Next log sequence to archive   0
Current log sequence           4
SQL>
SQL> SELECT SEQUENCE#, APPLIED FROM V$ARCHIVED_LOG;

 SEQUENCE# APPLIED
---------- ---------
         5 NO
         6 NO
         3 NO
         4 NO

SQL>
SQL> SELECT RECOVERY_MODE FROM V$ARCHIVE_DEST_STATUS;

RECOVERY_MODE
-----------------------
IDLE

SQL>
SQL>


To Enable MRP (Managed Standby Recovery process)
Without Real Time Apply  ---> Monitor Alert file
SQL> alter database recover managed standby database disconnect from session;

Database altered.

SQL>
SQL> SELECT RECOVERY_MODE FROM V$ARCHIVE_DEST_STATUS;

RECOVERY_MODE
-----------------------
MANAGED

SQL>
SQL> 

SQL> SELECT SEQUENCE#, APPLIED FROM V$ARCHIVED_LOG;

 SEQUENCE# APPLIED
---------- ---------
         5 YES
         YES
         YES
         4 NO

SQL>
SQL>

SQL> alter database recover managed standby database cancel;

Database altered.

SQL>


To Enable MRP (Managed Standby Recovery process)
With Real Time Apply  ---> Monitor Alert file
SQL>
SQL> alter database recover managed standby database using current logfile disconnect from session;

Database altered.

SQL> SELECT RECOVERY_MODE FROM V$ARCHIVE_DEST_STATUS;

RECOVERY_MODE
-----------------------
MANAGED REAL TIME APPLY

SQL> SELECT SEQUENCE#,APPLIED FROM V$ARCHIVED_LOG ORDER BY SEQUENCE#;

 SEQUENCE# APPLIED
---------- ---------
         3 YES
         4 YES
         5 YES
         6 YES
         7 YES
         8 IN-MEMORY

6 rows selected.

SQL>

================================================================================================================
Redo Transport Compression in a Data Guard Environment (Doc ID 729551.1)

Oracle Database has the ability to compress redo as it is transmitted over a network by Data Guard Redo Transport Services.

By setting this parameter "compression=enable" in datagaurd configuration, it allows to compress archive log on air and send to Standby Database server

SQL> show parameter dest_2

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
log_archive_dest_2                   string      service="ahcstby1", ASYNC NOAF
                                                 FIRM delay=0 optional compress
                                                 ion=enable max_failure=0 max_c
                                                 onnections=1 reopen=30 db_uniq
                                                 ue_name="ahcstby1" net_timeout
                                                 =300, valid_for=(online_logfil
                                                 es,all_roles)

OR



DGMGRL> edit database 'STDBY' set property 'RedoCompression' = enable;




This document helps those who would like to Configure Datagaurd for  their RAC Environments.



No comments:

Post a Comment