Showing posts with label Dataguard. Show all posts
Showing posts with label Dataguard. Show all posts

29 December 2012

FAL[client, USER]: Error 16191 connecting to PRODNY for fetching gap sequence Error 1017 received logging on to the standby

SQL> select * from v$archive_gap;

   THREAD# LOW_SEQUENCE# HIGH_SEQUENCE#
---------- ------------- --------------
         1          2192           2212

SQL>

Stand by Alert log error:-

FAL[client, USER]: Error 16191 connecting to PRODNY for fetching gap sequence
Sat Dec 29 10:12:21 2012
Fetching gap sequence in thread 1, gap sequence 2192-2212
Error 1017 received logging on to the standby
------------------------------------------------------------
Check that the primary and standby are using a password file
and remote_login_passwordfile is set to SHARED or EXCLUSIVE,
and that the SYS password is same in the password files.
      returning error ORA-16191
------------------------------------------------------------
FAL[client, USER]: Error 16191 connecting to PRODNY for fetching gap sequence
Sat Dec 29 10:12:31 2012
Fetching gap sequence in thread 1, gap sequence 2192-2212
Error 1017 received logging on to the standby

Solution :-

We have to recover Archive log from catalog database.

[orprod@muthu]$ rman target / catalog rman/muth123@RMAN

Recovery Manager: Release 11.2.0.2.0 - Production on Sat Dec 29 09:44:53 2012

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

connected to target database: PROD (DBID=2808283451)
connected to recovery catalog database

RMAN> run {
set archivelog destination to '/oracle/PROD/db/apps_st/archive';
restore archivelog from logseq=2192  until logseq=2212  thread=1;
 }2> 3> 4>

executing command: SET ARCHIVELOG DESTINATION

Starting restore at 29-DEC-12
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=512 device type=DISK

archived log for thread 1 with sequence 2211 is already on disk as file /oracle/PROD/db/apps_st/archive/1_2211_785817078.dbf
archived log for thread 1 with sequence 2212 is already on disk as file /oracle/PROD/db/apps_st/archive/1_2212_785817078.dbf
channel ORA_DISK_1: starting archived log restore to user-specified destination
archived log destination=/oracle/PROD/db/apps_st/archive
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=2192
channel ORA_DISK_1: reading from backup piece /backup_pip/Prod_EBS/rman/PROD_ARCH_20121228_31041
channel ORA_DISK_1: piece handle=/backup_pip/Prod_EBS/rman/PROD_ARCH_20121228_31041 tag=PROD ARCLOG BKP
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
channel ORA_DISK_1: starting archived log restore to user-specified destination
archived log destination=/oracle/PROD/db/apps_st/archive
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=2193
channel ORA_DISK_1: reading from backup piece /backup_pip/Prod_EBS/rman/PROD_ARCH_20121228_31042
channel ORA_DISK_1: piece handle=/backup_pip/Prod_EBS/rman/PROD_ARCH_20121228_31042 tag=PROD ARCLOG BKP
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
channel ORA_DISK_1: starting archived log restore to user-specified destination
archived log destination=/oracle/PROD/db/apps_st/archive
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=2194
channel ORA_DISK_1: reading from backup piece /backup_pip/Prod_EBS/rman/PROD_ARCH_20121228_31043
channel ORA_DISK_1: piece handle=/backup_pip/Prod_EBS/rman/PROD_ARCH_20121228_31043 tag=PROD ARCLOG BKP
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
channel ORA_DISK_1: starting archived log restore to user-specified destination
archived log destination=/oracle/PROD/db/apps_st/archive
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=2195
channel ORA_DISK_1: reading from backup piece /backup_pip/Prod_EBS/rman/PROD_ARCH_20121228_31044
channel ORA_DISK_1: piece handle=/backup_pip/Prod_EBS/rman/PROD_ARCH_20121228_31044 tag=PROD ARCLOG BKP
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
channel ORA_DISK_1: starting archived log restore to user-specified destination
archived log destination=/oracle/PROD/db/apps_st/archive
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=2196
channel ORA_DISK_1: reading from backup piece /backup_pip/Prod_EBS/rman/PROD_ARCH_20121228_31045
channel ORA_DISK_1: piece handle=/backup_pip/Prod_EBS/rman/PROD_ARCH_20121228_31045 tag=PROD ARCLOG BKP
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
channel ORA_DISK_1: starting archived log restore to user-specified destination
archived log destination=/oracle/PROD/db/apps_st/archive
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=2197
channel ORA_DISK_1: reading from backup piece /backup_pip/Prod_EBS/rman/PROD_ARCH_20121228_31046
channel ORA_DISK_1: piece handle=/backup_pip/Prod_EBS/rman/PROD_ARCH_20121228_31046 tag=PROD ARCLOG BKP
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
channel ORA_DISK_1: starting archived log restore to user-specified destination
archived log destination=/oracle/PROD/db/apps_st/archive
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=2199
channel ORA_DISK_1: reading from backup piece /backup_pip/Prod_EBS/rman/PROD_ARCH_20121228_31048
channel ORA_DISK_1: piece handle=/backup_pip/Prod_EBS/rman/PROD_ARCH_20121228_31048 tag=PROD ARCLOG BKP
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
channel ORA_DISK_1: starting archived log restore to user-specified destination
archived log destination=/oracle/PROD/db/apps_st/archive
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=2198
channel ORA_DISK_1: reading from backup piece /backup_pip/Prod_EBS/rman/PROD_ARCH_20121228_31047
channel ORA_DISK_1: piece handle=/backup_pip/Prod_EBS/rman/PROD_ARCH_20121228_31047 tag=PROD ARCLOG BKP
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
channel ORA_DISK_1: starting archived log restore to user-specified destination
archived log destination=/oracle/PROD/db/apps_st/archive
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=2201
channel ORA_DISK_1: reading from backup piece /backup_pip/Prod_EBS/rman/PROD_ARCH_20121228_31050
channel ORA_DISK_1: piece handle=/backup_pip/Prod_EBS/rman/PROD_ARCH_20121228_31050 tag=PROD ARCLOG BKP
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
channel ORA_DISK_1: starting archived log restore to user-specified destination
archived log destination=/oracle/PROD/db/apps_st/archive
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=2200
channel ORA_DISK_1: reading from backup piece /backup_pip/Prod_EBS/rman/PROD_ARCH_20121228_31049
channel ORA_DISK_1: piece handle=/backup_pip/Prod_EBS/rman/PROD_ARCH_20121228_31049 tag=PROD ARCLOG BKP
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:03
channel ORA_DISK_1: starting archived log restore to user-specified destination
archived log destination=/oracle/PROD/db/apps_st/archive
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=2203
channel ORA_DISK_1: reading from backup piece /backup_pip/Prod_EBS/rman/PROD_ARCH_20121228_31052
channel ORA_DISK_1: piece handle=/backup_pip/Prod_EBS/rman/PROD_ARCH_20121228_31052 tag=PROD ARCLOG BKP
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
channel ORA_DISK_1: starting archived log restore to user-specified destination
archived log destination=/oracle/PROD/db/apps_st/archive
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=2202
channel ORA_DISK_1: reading from backup piece /backup_pip/Prod_EBS/rman/PROD_ARCH_20121228_31051
channel ORA_DISK_1: piece handle=/backup_pip/Prod_EBS/rman/PROD_ARCH_20121228_31051 tag=PROD ARCLOG BKP
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:03
channel ORA_DISK_1: starting archived log restore to user-specified destination
archived log destination=/oracle/PROD/db/apps_st/archive
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=2206
channel ORA_DISK_1: reading from backup piece /backup_pip/Prod_EBS/rman/PROD_ARCH_20121229_31069
channel ORA_DISK_1: piece handle=/backup_pip/Prod_EBS/rman/PROD_ARCH_20121229_31069 tag=TAG20121229T000928
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
channel ORA_DISK_1: starting archived log restore to user-specified destination
archived log destination=/oracle/PROD/db/apps_st/archive
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=2205
channel ORA_DISK_1: reading from backup piece /backup_pip/Prod_EBS/rman/PROD_ARCH_20121229_31068
channel ORA_DISK_1: piece handle=/backup_pip/Prod_EBS/rman/PROD_ARCH_20121229_31068 tag=TAG20121229T000928
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
channel ORA_DISK_1: starting archived log restore to user-specified destination
archived log destination=/oracle/PROD/db/apps_st/archive
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=2204
channel ORA_DISK_1: reading from backup piece /backup_pip/Prod_EBS/rman/PROD_ARCH_20121229_31067
channel ORA_DISK_1: piece handle=/backup_pip/Prod_EBS/rman/PROD_ARCH_20121229_31067 tag=TAG20121229T000928
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:03
channel ORA_DISK_1: starting archived log restore to user-specified destination
archived log destination=/oracle/PROD/db/apps_st/archive
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=2208
channel ORA_DISK_1: reading from backup piece /backup_pip/Prod_EBS/rman/PROD_ARCH_20121229_31074
channel ORA_DISK_1: piece handle=/backup_pip/Prod_EBS/rman/PROD_ARCH_20121229_31074 tag=PROD ARCLOG BKP
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
channel ORA_DISK_1: starting archived log restore to user-specified destination
archived log destination=/oracle/PROD/db/apps_st/archive
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=2207
channel ORA_DISK_1: reading from backup piece /backup_pip/Prod_EBS/rman/PROD_ARCH_20121229_31073
channel ORA_DISK_1: piece handle=/backup_pip/Prod_EBS/rman/PROD_ARCH_20121229_31073 tag=PROD ARCLOG BKP
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:07
channel ORA_DISK_1: starting archived log restore to user-specified destination
archived log destination=/oracle/PROD/db/apps_st/archive
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=2210
channel ORA_DISK_1: reading from backup piece /backup_pip/Prod_EBS/rman/PROD_ARCH_20121229_31076
channel ORA_DISK_1: piece handle=/backup_pip/Prod_EBS/rman/PROD_ARCH_20121229_31076 tag=PROD ARCLOG BKP
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
channel ORA_DISK_1: starting archived log restore to user-specified destination
archived log destination=/oracle/PROD/db/apps_st/archive
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=2209
channel ORA_DISK_1: reading from backup piece /backup_pip/Prod_EBS/rman/PROD_ARCH_20121229_31075
channel ORA_DISK_1: piece handle=/backup_pip/Prod_EBS/rman/PROD_ARCH_20121229_31075 tag=PROD ARCLOG BKP
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:03
Finished restore at 29-DEC-12

RMAN> exit

Login to stand by server stop and start the mrp services:-

SQL> alter database recover managed standby database cancel;

Database altered.

SQL> alter database recover managed standby database disconnect from session;

Database altered.

SQL>

Stand by alert log detail:-

Archived Log entry 350 added for thread 1 sequence 2211 rlc 785817078 ID 0xbc84a3b dest 2:
RFS[3]: Opened log for thread 1 sequence 2212 dbid -1486683845 branch 785817078
Sat Dec 29 10:23:01 2012
Media Recovery Log /oracle/PROD/db/apps_st/archive/1_2202_785817078.dbf
Media Recovery Log /oracle/PROD/db/apps_st/archive/1_2203_785817078.dbf
Media Recovery Log /oracle/PROD/db/apps_st/archive/1_2204_785817078.dbf
Media Recovery Log /oracle/PROD/db/apps_st/archive/1_2205_785817078.dbf
Media Recovery Log /oracle/PROD/db/apps_st/archive/1_2206_785817078.dbf
Media Recovery Waiting for thread 1 sequence 2207 (in transit)
Archived Log entry 351 added for thread 1 sequence 2212 rlc 785817078 ID 0xbc84a3b dest 2:
Sat Dec 29 10:23:10 2012
Archived Log entry 352 added for thread 1 sequence 2207 rlc 785817078 ID 0x0 dest 2:
Sat Dec 29 10:23:11 2012
RFS[2]: Opened log for thread 1 sequence 2215 dbid -1486683845 branch 785817078
RFS[1]: Opened log for thread 1 sequence 2216 dbid -1486683845 branch 785817078
Sat Dec 29 10:23:11 2012
RFS[3]: Opened log for thread 1 sequence 2217 dbid -1486683845 branch 785817078
Archived Log entry 353 added for thread 1 sequence 2216 rlc 785817078 ID 0xbc84a3b dest 2:
Archived Log entry 354 added for thread 1 sequence 2217 rlc 785817078 ID 0xbc84a3b dest 2:
Sat Dec 29 10:23:12 2012
Media Recovery Log /oracle/PROD/db/apps_st/archive/1_2207_785817078.dbf
Media Recovery Log /oracle/PROD/db/apps_st/archive/1_2208_785817078.dbf
Media Recovery Log /oracle/PROD/db/apps_st/archive/1_2209_785817078.dbf
Media Recovery Log /oracle/PROD/db/apps_st/archive/1_2210_785817078.dbf
Media Recovery Log /oracle/PROD/db/apps_st/archive/1_2211_785817078.dbf
Media Recovery Log /oracle/PROD/db/apps_st/archive/1_2212_785817078.dbf
Media Recovery Log /oracle/PROD/db/apps_st/archive/1_2213_785817078.dbf
Media Recovery Log /oracle/PROD/db/apps_st/archive/1_2214_785817078.dbf
Media Recovery Waiting for thread 1 sequence 2215 (in transit)
RFS[1]: Opened log for thread 1 sequence 2218 dbid -1486683845 branch 785817078
Sat Dec 29 10:23:17 2012
Primary database is in MAXIMUM PERFORMANCE mode
RFS[4]: Assigned to RFS process 24407
RFS[4]: No standby redo logfiles created for thread 1
RFS[4]: Opened log for thread 1 sequence 2219 dbid -1486683845 branch 785817078
Archived Log entry 355 added for thread 1 sequence 2218 rlc 785817078 ID 0xbc84a3b dest 2:
Sat Dec 29 10:23:25 2012
Archived Log entry 356 added for thread 1 sequence 2215 rlc 785817078 ID 0xbc84a3b dest 2:
Sat Dec 29 10:23:30 2012
Media Recovery Log /oracle/PROD/db/apps_st/archive/1_2215_785817078.dbf
Media Recovery Log /oracle/PROD/db/apps_st/archive/1_2216_785817078.dbf
Media Recovery Log /oracle/PROD/db/apps_st/archive/1_2217_785817078.dbf
Media Recovery Log /oracle/PROD/db/apps_st/archive/1_2218_785817078.dbf
Media Recovery Waiting for thread 1 sequence 2219 (in transit)
Sat Dec 29 10:26:04 2012
Archived Log entry 357 added for thread 1 sequence 2219 rlc 785817078 ID 0xbc84a3b dest 2:
RFS[4]: No standby redo logfiles created for thread 1
RFS[4]: Opened log for thread 1 sequence 2220 dbid -1486683845 branch 785817078
Sat Dec 29 10:26:06 2012
Media Recovery Log /oracle/PROD/db/apps_st/archive/1_2219_785817078.dbf
Media Recovery Waiting for thread 1 sequence 2220 (in transit)


verify the archive log gap:-

SQL> select * from v$archive_gap;

no rows selected

SQL>

Error 16191 PING[ARC2]: Heartbeat failed to connect to standby ORA-16191 ORA-01017 ORA-01031

Stand by Server alert log error:-


FAL[client, USER]: Error 16191 connecting to PRODNY for fetching gap sequence
Sat Dec 29 10:12:00 2012
Fetching gap sequence in thread 1, gap sequence 2192-2212
Error 1017 received logging on to the standby
------------------------------------------------------------
Check that the primary and standby are using a password file
and remote_login_passwordfile is set to SHARED or EXCLUSIVE,
and that the SYS password is same in the password files.
      returning error ORA-16191
   
     

Primary Server Alert log error:-


PING[ARC2]: Heartbeat failed to connect to standby 'PRODVA'. Error is 16191.
Error 1017 received logging on to the standby
      returning error ORA-16191
PING[ARC2]: Heartbeat failed to connect to standby 'PRODVA'. Error is 16191.

Primary Server Trace file detail;-


OCISessionBegin failed -1
.. Detailed OCI error val is 1017 and errmsg is 'ORA-01017: invalid username/password; logon denied
'
OCISessionBegin failed. Error -1
.. Detailed OCI error val is 1031 and errmsg is 'ORA-01031: insufficient privileges
'

*** 2012-12-29 08:00:10.260
OCISessionBegin failed. Error -1
.. Detailed OCI error val is 1031 and errmsg is 'ORA-01031: insufficient privileges
'
*** 2012-12-29 08:00:10.261 4265 krsh.c
Error 1031 received logging on to the standby
*** 2012-12-29 08:00:10.261 912 krsu.c
Error 1031 connecting to destination LOG_ARCHIVE_DEST_2 standby host 'PRODVA'
Error 1031 attaching to destination LOG_ARCHIVE_DEST_2 standby host 'PRODVA'
*** 2012-12-29 08:00:10.261 4265 krsh.c
Error 1031 for archive log file 1 to 'PRODVA'
*** 2012-12-29 08:00:10.261 2864 krsi.c
krsi_dst_fail: dest:2 err:1031 force:0 blast:1
ORA-01031: insufficient privileges

Cause:-


Password file got correpted or Password changes in Primary and standby servers or we have to check sec_case_sensitive_logon parameter on primary and standby.

SQL> show parameter sec_case_sensitive_logon;

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
sec_case_sensitive_logon             boolean     FALSE
SQL>

Solution:-


We have to recreate the passwd file or copy Primary server to Standby server.

Example:-


In cause sec_case_sensitive_logon parameter value is true, we have to use below orapwd command.

orapwd file=$ORACLE_HOME/dbs/orapwPROD password=muthu123 entries=10 ignorecase=y

In cause sec_case_sensitive_logon parameter value is false, we have to use below orapwd command.

orapwd file=$ORACLE_HOME/dbs/orapwPROD password=muthu123 entries=10

07 August 2012

Step by Step Create Business Continuity Oracle E-Business Release 12 Using Oracle 11g Physical Standby Database Part -4

Business Continuity Oracle E-Business Release 12 Using Oracle 11g Physical Standby Database Part -4

On Stand by server :-

SQL> startup nomount
ORACLE instance started.

Total System Global Area 2137886720 bytes
Fixed Size 2155464 bytes
Variable Size 452987960 bytes
Database Buffers 1660944384 bytes
Redo Buffers 21798912 bytes
SQL> alter database mount standby database;

Database altered.

SQL> alter database open read only;

Database altered.

SQL> alter database register physical logfile '/xprodarch/xprodarch/XPROD/archive/XPROD_1_152_789237530.arch';

Switch over to Primary as a Standby

SQL> startup
ORACLE instance started.

Total System Global Area 2137886720 bytes
Fixed Size 2155464 bytes
Variable Size 452987960 bytes
Database Buffers 1660944384 bytes
Redo Buffers 21798912 bytes
Database mounted.
Database opened.
SQL> alter database commit to switchover to primary with session shutdown;

Database altered.

SQL> select open_mode from v$database;

OPEN_MODE
----------
READ WRITE

SQL> archive log list;
Database log mode Archive Mode
Automatic archival Enabled
Archive destination /xprodarch/xprodarch/XPROD/archive
Oldest online log sequence 180
Next log sequence to archive 181
Current log sequence 181
SQL> alter system switch logfile;

System altered.

SQL> select switchover_status from v$database;

SWITCHOVER_STATUS
--------------------
TO STANDBY

SQL> shut immediate
ORA-01109: database not open

Database dismounted.
ORACLE instance shut down.
SQL> startup nomount
ORACLE instance started.

Total System Global Area 2137886720 bytes
Fixed Size 2155464 bytes
Variable Size 452987960 bytes
Database Buffers 1660944384 bytes
Redo Buffers 21798912 bytes
SQL> alter database mount;

Database altered.

SQL> alter database open;

Database altered.

SQL> alter database recover managed standby database disconnect from session;

Database altered.

SQL> select open_mode from v$database;

OPEN_MODE
----------
MOUNTED

SQL> show parameter;

NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
log_archive_dest_state_2 string enable

SQL> alter system set log_archive_dest_state_2=defer;

System altered.

SQL> select switchover_status from v$database;

SWITCHOVER_STATUS
--------------------
SESSIONS ACTIVE

SQL> select database_role, open_mode from v$database;

DATABASE_ROLE OPEN_MODE
---------------- ----------
PHYSICAL STANDBY MOUNTED

SQL>

Switching Standby as a Primary :-

SQL> archive log list;
Database log mode Archive Mode
Automatic archival Enabled
Archive destination /xprodarch/xprodarch/XPROD/archive
Oldest online log sequence 178
Next log sequence to archive 0
Current log sequence 182

SQL> alter database recover managed standby database disconnect from session;

Database altered.

SQL> select open_mode from v$database;

OPEN_MODE
----------
MOUNTED

SQL> alter database open;

Database altered.

SQL> select open_mode from v$database;

OPEN_MODE
----------
READ ONLY

SQL> alter database commit to switchover to primary with session shutdown;

Database altered.

SQL> shutdown immediate
ORA-01109: database not open
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.

Total System Global Area 2137886720 bytes
Fixed Size 2155464 bytes
Variable Size 452987960 bytes
Database Buffers 1660944384 bytes
Redo Buffers 21798912 bytes
Database mounted.
Database opened.
SQL> show parameter;

NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
log_archive_dest_state_2 string defer

SQL> alter system set log_archive_dest_state_2=enable;

System altered.

SQL> select database_role, open_mode from v$database;

DATABASE_ROLE OPEN_MODE
---------------- ----------
PRIMARY READ WRITE

SQL>

Preparing Standby application :-

$ sqlplus apps/apps

SQL> exec fnd_conc_clone.setup_clean

Run auto Config on Database tier

$ adclonectx.pl /xprodfm/xprodfm/XPROD/inst/apps/XPROD_bcibms22/appl/admin/XPROD_bcibms22.xml

Copyright (c) 2002 Oracle Corporation
Redwood Shores, California, USA

Oracle Applications Rapid Clone

Version 12.0.0

adclonectx Version 120.23.12010000.1

Running:
/xprodfm/xprodfm/XPROD/apps/apps_st/comn/clone/bin/../jre/bin/java -Xmx600M -classpath /xprodfm/xprodfm/XPROD/apps/apps_st/comn/clone/bin/../jlib/ojdbc14.jar:/xprodfm/xprodfm/XPROD/apps/apps_st/comn/clone/bin/../jlib/xmlparserv2.jar:/xprodfm/xprodfm/XPROD/apps/apps_st/comn/clone/bin/../jlib/java oracle.apps.ad.context.CloneContext -e /xprodfm/xprodfm/XPROD/inst/apps/XPROD_bcibms22/appl/admin/XPROD_bcibms22.xml
Enter the APPS password : apps

Log file located at /xprodfm/xprodfm/XPROD/apps/apps_st/comn/clone/bin/CloneContext_0728123328.log

Provide the values required for creation of the new APPL_TOP Context file.

Target System Hostname (virtual or normal) [bcibmp15] :

It is recommended that your inputs are validated by the program.
However you might choose not to validate them under following circumstances:

-If cloning a context on source system for a remote system.
-If cloning a context on a machine where the ports are taken and
you do not want to shutdown the services at this point.
-If cloning a context but the database it needs to connect is not available.

Do you want the inputs to be validated (y/n) [n] ? :
Target System Database SID : XPROD
Target System Database Server Node [bcibmp15] :
Target System Base Directory : /xprodfm/xprodfm/XPROD
Target System Tools ORACLE_HOME Directory [/xprodfm/xprodfm/XPROD/apps/tech_st/10.1.2] :
Target System Web ORACLE_HOME Directory [/xprodfm/xprodfm/XPROD/apps/tech_st/10.1.3] :
Target System APPL_TOP Directory [/xprodfm/xprodfm/XPROD/apps/apps_st/appl] :
Target System COMMON_TOP Directory [/xprodfm/xprodfm/XPROD/apps/apps_st/comn] :
Target System Instance Home Directory [/xprodfm/xprodfm/XPROD/inst] :
Username for the Applications File System Owner [xappl] :
Group for the Applications File System Owner [dba] :
Target System Root Service [enabled] :
Target System Web Entry Point Services [enabled] :
Target System Web Application Services [enabled] :
Target System Batch Processing Services [enabled] :
Target System Other Services [disabled] :
Do you want to preserve the Display [bcibms22:0.0] (y/n) ? : n
Target System Display [bcibmp15:0.0] :
Do you want the the target system to have the same port values as the source system (y/n) [y] ? : n
Target System Port Pool [0-99] : 50
Checking the port pool 50
done: Port Pool 50 is free
Report file located at /xprodfm/xprodfm/XPROD/inst/apps/XPROD_bcibmp15/admin/out/portpool.lst
Complete port information available at /xprodfm/xprodfm/XPROD/inst/apps/XPROD_bcibmp15/admin/out/portpool.lst

UTL_FILE_DIR on database tier consists of the following directories.

1. /usr/tmp
2. /xprodtmp
3. /xproddb/xproddb/XPROD/db/tech_st/11.1.0/appsutil/outbound/XPROD_bcibmp15
4. /usr/tmp
Choose a value which will be set as APPLPTMP value on the target node [1] : 2

Creating the new APPL_TOP Context file from :
/xprodfm/xprodfm/XPROD/apps/apps_st/appl/ad/12.0.0/admin/template/adxmlctx.tmp

The new APPL_TOP context file has been created :
/xprodfm/xprodfm/XPROD/inst/apps/XPROD_bcibmp15/appl/admin/XPROD_bcibmp15.xml

Log file located at /xprodfm/xprodfm/XPROD/apps/apps_st/comn/clone/bin/CloneContext_0728123328.log
contextfile=/xprodfm/xprodfm/XPROD/inst/apps/XPROD_bcibmp15/appl/admin/XPROD_bcibmp15.xml
Check Clone Context logfile /xprodfm/xprodfm/XPROD/apps/apps_st/comn/clone/bin/CloneContext_0728123328.log for details.
$ pwd
/xprodfm/xprodfm/XPROD/apps/apps_st/comn/clone/bin

Run adconfig on Application Tier using new Context file .

Failover testing on DbTier:-

xdb@pbcibms55(/home/xdb)# sqlplus "/as sysdba"

SQL*Plus: Release 11.1.0.7.0 - Production on Sun Jul 29 14:25:52 2012

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

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

SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE FINISH;
Database altered.
SQL> ALTER DATABASE ACTIVATE STANDBY DATABASE;
Database altered.
SQL> shut immediate
ORA-01109: database not open

Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.

Total System Global Area 2137886720 bytes
Fixed Size 2155464 bytes
Variable Size 452987960 bytes
Database Buffers 1660944384 bytes
Redo Buffers 21798912 bytes
Database mounted.
Database opened.
SQL> conn apps/apps
Connected.
SQL> select REQUEST_DATE,REQUEST_ID,LAST_UPDATE_DATE from fnd_concurrent_requests where REQUEST_ID='11272536';
REQUEST_D REQUEST_ID LAST_UPDA
--------- ---------- ---------
29-JUL-12 11272536 29-JUL-12

SQL> select name,DATABASE_ROLE,OPEN_MODE from v$database;

NAME DATABASE_ROLE OPEN_MODE
--------- ---------------- ----------
XPROD PRIMARY READ WRITE
SQL>