/*
|| Oracle 11g Data Guard Listing 1
||
|| Demonstrates Oracle Database 11g's latest Data Guard features, including:
|| - Setup of primary database for Data Guard use
|| - Standby database creation via DUPLICATE DATABASE FROM ACTIVE DATABASE
|| - Validation of proper primary - standby configuration
|
|| Author: Jim Czuprynski
||
|| Usage Notes:
|| These examples are provided to demonstrate various features of Oracle 11gR1
|| Data Guard features, and they should be carefully proofread before being executed 
|| against any existing Oracle database to avoid potential damage!
*/

/* 
|| Listing 1.1:
|| Switching primary database to run in ARCHIVELOG mode
*/

-----
-- Bring database into ARCHIVELOG mode. Note that the database must
-- be "bounced" for this to take effect - but otherwise it's impossible
-- to transmit change vectors to the standby database!
-----

-- Set an appropriate format for archived redo logs
ALTER SYSTEM SET log_archive_format = 'log_%s_%t_%r.arc' SCOPE=SPFILE;

-- Set the new DB_UNIQUE_NAME parameter (it can't be set dynamically)
ALTER SYSTEM SET db_unique_name = 'orcl' SCOPE=SPFILE;

-----
-- Now bounce the database and bring it into ARCHIVELOG mode. Note that
-- this is also a perfect time to activate "forced" logging of every 
-- transaction, regardless of the NOLOGGING setting for a table, index, 
-- or other dependent object, bu issuing the FORCE LOGGING directive. 
-- This ensures all online transaction processing (OLTP) activity is 
-- captured properly. (Note that while this is highly recommended for OLTP 
-- application environments, it is not mandatory for setting up primary - 
-- standby database interaction.)
-----

SHUTDOWN IMMEDIATE;
STARTUP MOUNT;
ALTER DATABASE FORCE LOGGING;
ALTER DATABASE ARCHIVELOG;
ALTER DATABASE OPEN;

/* 
|| Listing 1.2:
|| Setting up standby redo logs on the primary database
|| This ensures that the primary database can fill the standby
|| role as the result of a later switchover or exchange of roles.
*/

ALTER DATABASE
    ADD STANDBY LOGFILE
    '/u01/app/oracle/oradata/orcl/srl01.log'
    SIZE 50M 
    REUSE;

ALTER DATABASE
    ADD STANDBY LOGFILE
    '/u01/app/oracle/oradata/orcl/srl02.log'
    SIZE 50M 
    REUSE;

ALTER DATABASE
    ADD STANDBY LOGFILE
    '/u01/app/oracle/oradata/orcl/srl03.log'
    SIZE 50M 
    REUSE;

/* 
|| Listing 1.3:
|| Setting up appropriate initialization parameter values for primary database
*/

ALTER SYSTEM SET log_archive_dest_1 = 'LOCATION=/u01/app/oracle/flash_recovery_area/ORCL/ DB_UNIQUE_NAME=orcl VALID_FOR=(ALL_LOGFILES,ALL_ROLES)';
ALTER SYSTEM SET log_archive_dest_state_1 = 'ENABLE';

ALTER SYSTEM SET log_archive_dest_2 = 'SERVICE=stdby ASYNC DB_UNIQUE_NAME=stdby VALID_FOR=(ONLINE_LOGFILE,PRIMARY_ROLE)';
ALTER SYSTEM SET log_archive_dest_state_2 = 'ENABLE';

ALTER SYSTEM SET standby_file_management = 'AUTO';
ALTER SYSTEM SET log_archive_config = 'DG_CONFIG=(orcl,stdby)';


/* 
|| Listing 1.4:
|| Network configuration file changes
*/

# Add an entry for the standby database at the primary instance

STDBY =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 11gStdby)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = stdby)
    )
  )

# Set up the standby database's listener with a static reference
# to the standby database instance

SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (GLOBAL_DBNAME = stdby)
      (ORACLE_HOME = /u01/app/oracle/product/11.1.0/db_1)
      (SID_NAME = stdby)
    )
  )

LISTENER =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 11gStdby)(PORT = 1521))
  )

/* 
|| Listing 1.5:
|| "Temporary" initialization parameter file for standby database
*/

######
# File:    initstdby.ora
# Purpose:  "Dummy" PFILE to enable startup of standby database
#           instance during DUPLICATE DATABASE over the network
#####
DB_NAME=stdby

/* 
|| Listing 1.6:
|| RMAN DUPLICATE DATABASE command script to clone primary database
|| to its standby counterpart
*/

RUN {
ALLOCATE CHANNEL d1 TYPE DISK;
ALLOCATE CHANNEL d2 TYPE DISK;
ALLOCATE AUXILIARY CHANNEL cnv1 TYPE DISK;
ALLOCATE AUXILIARY CHANNEL cnv2 TYPE DISK;
DUPLICATE TARGET DATABASE
    FOR STANDBY
    FROM ACTIVE DATABASE
    DORECOVER
    SPFILE
        SET db_unique_name='stdby' 
        SET control_files='/u01/app/oracle/oradata/orcl/control01.ctl'
        SET log_file_name_convert='/u01/app/oracle/oradata/orcl/','/u01/app/oracle/oradata/stdby/'
        SET log_archive_dest_1='location=/u01/app/oracle/flash_recovery_area/STDBY/ valid_for=(ALL_LOGFILES,ALL_ROLES) db_unique_name=stdby'
        SET log_archive_dest_2='service=orcl ASYNC valid_for=(ONLINE_LOGFILE,PRIMARY_ROLE) db_unique_name=orcl'
        SET fal_client='stdby'
        SET fal_server='orcl'
        SET standby_file_management='AUTO'
        SET log_archive_config='dg_config=(orcl,stdby)'
    NOFILENAMECHECK;
}

/* 
|| Listing 1.7:
|| RMAN output from a successful standby database cloning operation
*/

[oracle@training ~]$ rman target / auxiliary sys/oracle@stdby

Recovery Manager: Release 11.1.0.6.0 - Production on Sat Apr 18 06:25:07 2009

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

connected to target database: ORCL (DBID=1210321736)
connected to auxiliary database: STDBY (not mounted)

RMAN> RUN {
ALLOCATE CHANNEL d1 TYPE DISK;
ALLOCATE CHANNEL d2 TYPE DISK;
ALLOCATE AUXILIARY CHANNEL cnv1 TYPE DISK;
ALLOCATE AUXILIARY CHANNEL cnv2 TYPE DISK;
DUPLICATE TARGET DATABASE
    FOR STANDBY
    FROM ACTIVE DATABASE
    DORECOVER
    SPFILE
        SET db_unique_name='stdby'
        SET control_files='/u01/app/oracle/oradata/orcl/control01.ctl'
        SET log_file_name_convert='/u01/app/oracle/oradata/orcl/','/u01/app/oracle/oradata/stdby/'
        SET log_archive_dest_1='location=/u01/app/oracle/flash_recovery_area/STDBY/ valid_for=(ALL_LOGFILES,ALL_ROLES) db_unique_name=stdby'
        SET log_archive_dest_2='service=orcl ASYNC valid_for=(ONLINE_LOGFILE,PRIMARY_ROLE) db_unique_name=orcl'
        SET fal_client='stdby'
        SET fal_server='orcl'
        SET standby_file_management='AUTO'
        SET log_archive_config='dg_config=(orcl,stdby)'
    NOFILENAMECHECK;
}
2> 3> 4> 5> 6> 7> 8> 9> 10> 11> 12> 13> 14> 15> 16> 17> 18> 19> 20> 21>
using target database control file instead of recovery catalog
allocated channel: d1
channel d1: SID=126 device type=DISK

allocated channel: d2
channel d2: SID=120 device type=DISK

allocated channel: cnv1
channel cnv1: SID=97 device type=DISK

allocated channel: cnv2
channel cnv2: SID=96 device type=DISK

Starting Duplicate Db at 18-APR-09

contents of Memory Script:
{
   backup as copy reuse
   file  '/u01/app/oracle/product/11.1.0/db_1/dbs/orapworcl' auxiliary format
 '/u01/app/oracle/product/11.1.0/db_1/dbs/orapwstdby'   file
 '/u01/app/oracle/product/11.1.0/db_1/dbs/spfileorcl.ora' auxiliary format
 '/u01/app/oracle/product/11.1.0/db_1/dbs/spfilestdby.ora'   ;
   sql clone "alter system set spfile= ''/u01/app/oracle/product/11.1.0/db_1/dbs/spfilestdby.ora''";
}
executing Memory Script

Starting backup at 18-APR-09
Finished backup at 18-APR-09

sql statement: alter system set spfile= ''/u01/app/oracle/product/11.1.0/db_1/dbs/spfilestdby.ora''

contents of Memory Script:
{
   sql clone "alter system set  db_unique_name =
 ''stdby'' comment=
 '''' scope=spfile";
   sql clone "alter system set  control_files =
 ''/u01/app/oracle/oradata/orcl/control01.ctl'' comment=
 '''' scope=spfile";
   sql clone "alter system set  log_file_name_convert =
 ''/u01/app/oracle/oradata/orcl/'', ''/u01/app/oracle/oradata/stdby/'' comment=
 '''' scope=spfile";
   sql clone "alter system set  log_archive_dest_1 =
 ''location=/u01/app/oracle/flash_recovery_area/STDBY/ valid_for=(ALL_LOGFILES,ALL_ROLES) db_unique_name=stdby'' comment=
 '''' scope=spfile";
   sql clone "alter system set  log_archive_dest_2 =
 ''service=orcl ASYNC valid_for=(ONLINE_LOGFILE,PRIMARY_ROLE) db_unique_name=orcl'' comment=
 '''' scope=spfile";
   sql clone "alter system set  fal_client =
 ''stdby'' comment=
 '''' scope=spfile";
   sql clone "alter system set  fal_server =
 ''orcl'' comment=
 '''' scope=spfile";
   sql clone "alter system set  standby_file_management =
 ''AUTO'' comment=
 '''' scope=spfile";
   sql clone "alter system set  log_archive_config =
 ''dg_config=(orcl,stdby)'' comment=
 '''' scope=spfile";
   shutdown clone immediate;
   startup clone nomount ;
}
executing Memory Script

sql statement: alter system set  db_unique_name =  ''stdby'' comment= '''' scope=spfile

sql statement: alter system set  control_files =  ''/u01/app/oracle/oradata/orcl/control01.ctl'' comment= '''' scope=spfile

sql statement: alter system set  log_file_name_convert =  ''/u01/app/oracle/oradata/orcl/'', ''/u01/app/oracle/oradata/stdby/'' comment= '''' scope=spfile

sql statement: alter system set  log_archive_dest_1 =  ''location=/u01/app/oracle/flash_recovery_area/STDBY/ valid_for=(ALL_LOGFILES,ALL_ROLES) db_unique_name=stdby'' comment= '''' scope=spfile

sql statement: alter system set  log_archive_dest_2 =  ''service=orcl ASYNC valid_for=(ONLINE_LOGFILE,PRIMARY_ROLE) db_unique_name=orcl'' comment= '''' scope=spfile

sql statement: alter system set  fal_client =  ''stdby'' comment= '''' scope=spfile

sql statement: alter system set  fal_server =  ''orcl'' comment= '''' scope=spfile

sql statement: alter system set  standby_file_management =  ''AUTO'' comment= '''' scope=spfile

sql statement: alter system set  log_archive_config =  ''dg_config=(orcl,stdby)'' comment= '''' scope=spfile

Oracle instance shut down

connected to auxiliary database (not started)
Oracle instance started

Total System Global Area     422678528 bytes

Fixed Size                     1300324 bytes
Variable Size                121637020 bytes
Database Buffers             293601280 bytes
Redo Buffers                   6139904 bytes

contents of Memory Script:
{
   backup as copy current controlfile for standby auxiliary format  '/u01/app/oracle/oradata/orcl/control01.ctl';
   sql clone 'alter database mount standby database';
}
executing Memory Script

Starting backup at 18-APR-09
channel d1: starting datafile copy
copying standby control file
output file name=/home/oracle/snapcf_orcl.f tag=TAG20090418T062548 RECID=36 STAMP=684483962
channel d1: datafile copy complete, elapsed time: 00:00:03
Finished backup at 18-APR-09

sql statement: alter database mount standby database

contents of Memory Script:
{
   set newname for tempfile  1 to
 "/u01/app/oracle/oradata/orcl/temp01.dbf";
   switch clone tempfile all;
   set newname for datafile  1 to
 "/u01/app/oracle/oradata/orcl/system01.dbf";
   set newname for datafile  2 to
 "/u01/app/oracle/oradata/orcl/sysaux01.dbf";
   set newname for datafile  3 to
 "/u01/app/oracle/oradata/orcl/undotbs01.dbf";
   set newname for datafile  4 to
 "/u01/app/oracle/oradata/orcl/users01.dbf";
   set newname for datafile  5 to
 "/u01/app/oracle/oradata/orcl/example01.dbf";
   backup as copy reuse
   datafile  1 auxiliary format
 "/u01/app/oracle/oradata/orcl/system01.dbf"   datafile
 2 auxiliary format
 "/u01/app/oracle/oradata/orcl/sysaux01.dbf"   datafile
 3 auxiliary format
 "/u01/app/oracle/oradata/orcl/undotbs01.dbf"   datafile
 4 auxiliary format
 "/u01/app/oracle/oradata/orcl/users01.dbf"   datafile
 5 auxiliary format
 "/u01/app/oracle/oradata/orcl/example01.dbf"   ;
   sql 'alter system archive log current';
}
executing Memory Script

executing command: SET NEWNAME

renamed tempfile 1 to /u01/app/oracle/oradata/orcl/temp01.dbf 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 18-APR-09
channel d1: starting datafile copy
input datafile file number=00002 name=/u01/app/oracle/oradata/orcl/sysaux01.dbf
channel d2: starting datafile copy
input datafile file number=00001 name=/u01/app/oracle/oradata/orcl/system01.dbf
output file name=/u01/app/oracle/oradata/orcl/system01.dbf tag=TAG20090418T062611 RECID=0 STAMP=0
channel d2: datafile copy complete, elapsed time: 00:01:15
channel d2: starting datafile copy
input datafile file number=00003 name=/u01/app/oracle/oradata/orcl/undotbs01.dbf
output file name=/u01/app/oracle/oradata/orcl/sysaux01.dbf tag=TAG20090418T062611 RECID=0 STAMP=0
channel d1: datafile copy complete, elapsed time: 00:01:54
channel d1: starting datafile copy
input datafile file number=00005 name=/u01/app/oracle/oradata/orcl/example01.dbf
output file name=/u01/app/oracle/oradata/orcl/example01.dbf tag=TAG20090418T062611 RECID=0 STAMP=0
channel d1: datafile copy complete, elapsed time: 00:00:15
channel d1: starting datafile copy
input datafile file number=00004 name=/u01/app/oracle/oradata/orcl/users01.dbf
output file name=/u01/app/oracle/oradata/orcl/undotbs01.dbf tag=TAG20090418T062611 RECID=0 STAMP=0
channel d2: datafile copy complete, elapsed time: 00:01:01
output file name=/u01/app/oracle/oradata/orcl/users01.dbf tag=TAG20090418T062611 RECID=0 STAMP=0
channel d1: datafile copy complete, elapsed time: 00:00:01
Finished backup at 18-APR-09

sql statement: alter system archive log current

contents of Memory Script:
{
   backup as copy reuse
   archivelog like  "/u01/app/oracle/flash_recovery_area/ORCL/log_109_1_682541003.arc" auxiliary format
 "/u01/app/oracle/flash_recovery_area/STDBY/log_109_1_682541003.arc"   ;
   catalog clone archivelog  "/u01/app/oracle/flash_recovery_area/STDBY/log_109_1_682541003.arc";
   switch clone datafile all;
}
executing Memory Script

Starting backup at 18-APR-09
channel d1: starting archived log copy
input archived log thread=1 sequence=109 RECID=110 STAMP=684484146
output file name=/u01/app/oracle/flash_recovery_area/STDBY/log_109_1_682541003.arc RECID=0 STAMP=0
channel d1: archived log copy complete, elapsed time: 00:00:01
Finished backup at 18-APR-09

cataloged archived log
archived log file name=/u01/app/oracle/flash_recovery_area/STDBY/log_109_1_682541003.arc RECID=1 STAMP=684484135

datafile 1 switched to datafile copy
input datafile copy RECID=36 STAMP=684484136 file name=/u01/app/oracle/oradata/orcl/system01.dbf
datafile 2 switched to datafile copy
input datafile copy RECID=37 STAMP=684484136 file name=/u01/app/oracle/oradata/orcl/sysaux01.dbf
datafile 3 switched to datafile copy
input datafile copy RECID=38 STAMP=684484136 file name=/u01/app/oracle/oradata/orcl/undotbs01.dbf
datafile 4 switched to datafile copy
input datafile copy RECID=39 STAMP=684484136 file name=/u01/app/oracle/oradata/orcl/users01.dbf
datafile 5 switched to datafile copy
input datafile copy RECID=40 STAMP=684484136 file name=/u01/app/oracle/oradata/orcl/example01.dbf

contents of Memory Script:
{
   set until scn  4021704;
   recover
   standby
   clone database
    delete archivelog
   ;
}
executing Memory Script

executing command: SET until clause

Starting recover at 18-APR-09

starting media recovery

archived log for thread 1 with sequence 109 is already on disk as file /u01/app/oracle/flash_recovery_area/STDBY/log_109_1_682541003.arc
archived log file name=/u01/app/oracle/flash_recovery_area/STDBY/log_109_1_682541003.arc thread=1 sequence=109
media recovery complete, elapsed time: 00:00:01
Finished recover at 18-APR-09
Finished Duplicate Db at 18-APR-09
released channel: d1
released channel: d2

/* 
|| Listing 1.8:
|| Standby database alert log entries from a successful standby database cloning operation
*/

Sat Apr 18 06:24:23 2009
Starting ORACLE instance (normal)
LICENSE_MAX_SESSION = 0
LICENSE_SESSIONS_WARNING = 0
Picked latch-free SCN scheme 2
Using LOG_ARCHIVE_DEST_1 parameter default value as /u01/app/oracle/product/11.1.0/db_1/dbs/arch
Autotune of undo retention is turned on. 
IMODE=BR
ILAT =12
LICENSE_MAX_USERS = 0
SYS auditing is disabled
Starting up ORACLE RDBMS Version: 11.1.0.6.0.
Using parameter settings in client-side pfile /home/oracle/initstdby.ora on machine 11gStdby
System parameters with non-default values:
  db_name                  = "stdby"
Sat Apr 18 06:24:25 2009
PMON started with pid=2, OS id=8334 
Sat Apr 18 06:24:25 2009
...
<edited for brevity>
...
Sat Apr 18 06:24:29 2009
MMON started with pid=14, OS id=8362 
ORACLE_BASE from environment = /u01/app/oracle
Sat Apr 18 06:24:29 2009
MMNL started with pid=15, OS id=8364 
Sat Apr 18 06:24:52 2009
Using STANDBY_ARCHIVE_DEST parameter default value as /u01/app/oracle/product/11.1.0/db_1/dbs/arch
destination database instance is 'started' not 'mounted'
Sat Apr 18 06:25:09 2009
ALTER SYSTEM SET spfile='/u01/app/oracle/product/11.1.0/db_1/dbs/spfilestdby.ora' SCOPE=MEMORY;
ALTER SYSTEM SET db_unique_name='stdby' SCOPE=SPFILE;
ALTER SYSTEM SET control_files='/u01/app/oracle/oradata/orcl/control01.ctl' SCOPE=SPFILE;
ALTER SYSTEM SET log_file_name_convert='/u01/app/oracle/oradata/orcl/','/u01/app/oracle/oradata/stdby/' SCOPE=SPFILE;
ALTER SYSTEM SET log_archive_dest_1='location=/u01/app/oracle/flash_recovery_area/STDBY/ valid_for=(ALL_LOGFILES,ALL_ROLES) db_unique_name=stdby' SCOPE=SPFILE;
ALTER SYSTEM SET log_archive_dest_2='service=orcl ASYNC valid_for=(ONLINE_LOGFILE,PRIMARY_ROLE) db_unique_name=orcl' SCOPE=SPFILE;
ALTER SYSTEM SET fal_client='stdby' SCOPE=SPFILE;
ALTER SYSTEM SET fal_server='orcl' SCOPE=SPFILE;
ALTER SYSTEM SET standby_file_management='AUTO' SCOPE=SPFILE;
ALTER SYSTEM SET log_archive_config='dg_config=(orcl,stdby)' SCOPE=SPFILE;
Shutting down instance: further logons disabled
Stopping background process MMNL
Stopping background process MMON
Shutting down instance (immediate)
License high water mark = 7
alter database close
ORA-1507 signalled during: alter database close...
alter database dismount
ORA-1507 signalled during: alter database dismount...
ARCH: Archival disabled due to shutdown: 1089
Shutting down archive processes
Archiving is disabled
Archive process shutdown avoided: 0 active
Sat Apr 18 06:25:13 2009
Stopping background process VKTM: 
ARCH: Archival disabled due to shutdown: 1089
Shutting down archive processes
Archiving is disabled
Archive process shutdown avoided: 0 active
Sat Apr 18 06:25:16 2009
Instance shutdown complete
Sat Apr 18 06:25:16 2009
Starting ORACLE instance (normal)
LICENSE_MAX_SESSION = 0
LICENSE_SESSIONS_WARNING = 0
Picked latch-free SCN scheme 2
Autotune of undo retention is turned on. 
IMODE=BR
ILAT =18
LICENSE_MAX_USERS = 0
SYS auditing is disabled
Starting up ORACLE RDBMS Version: 11.1.0.6.0.
Using parameter settings in server-side spfile /u01/app/oracle/product/11.1.0/db_1/dbs/spfilestdby.ora
System parameters with non-default values:
  processes                = 150
  sga_target               = 400M
  control_files            = "/u01/app/oracle/oradata/orcl/control01.ctl"
  log_file_name_convert    = "/u01/app/oracle/oradata/orcl/"
  log_file_name_convert    = "/u01/app/oracle/oradata/stdby/"
  db_block_size            = 8192
  compatible               = "11.1.0.0.0"
  log_archive_config       = "dg_config=(orcl,stdby)"
  log_archive_dest_1       = "location=/u01/app/oracle/flash_recovery_area/STDBY/ valid_for=(ALL_LOGFILES,ALL_ROLES) db_unique_name=stdby"
  log_archive_dest_2       = "service=orcl ASYNC valid_for=(ONLINE_LOGFILE,PRIMARY_ROLE) db_unique_name=orcl"
  log_archive_dest_state_1 = "ENABLE"
  log_archive_dest_state_2 = "ENABLE"
  log_archive_max_processes= 4
  log_archive_format       = "log_%s_%t_%r.arc"
  fal_client               = "stdby"
  fal_server               = "orcl"
  db_recovery_file_dest    = "/u01/app/oracle/flash_recovery_area"
  db_recovery_file_dest_size= 8G
  standby_file_management  = "AUTO"
  undo_tablespace          = "UNDOTBS1"
  remote_login_passwordfile= "EXCLUSIVE"
  db_domain                = ""
  dispatchers              = "(PROTOCOL=TCP) (SERVICE=orclXDB)"
  audit_file_dest          = "/u01/app/oracle/admin/orcl/adump"
  audit_trail              = "DB"
  db_name                  = "orcl"
  db_unique_name           = "stdby"
  open_cursors             = 300
  pga_aggregate_target     = 150M
  diagnostic_dest          = "/u01/app/oracle"
Sat Apr 18 06:25:19 2009
PMON started with pid=2, OS id=8395 
Sat Apr 18 06:25:19 2009
...
<edited for brevity>
...
ORACLE_BASE from environment = /u01/app/oracle
Sat Apr 18 06:25:25 2009
RFS connections have been disallowed
alter database mount standby database
Sat Apr 18 06:25:38 2009
Set as converted control file due to db_unique_name mismatch
Changing di2dbun from orcl to stdby
Setting recovery target incarnation to 2
ARCH: STARTING ARCH PROCESSES
Sat Apr 18 06:25:38 2009
ARC1 started with pid=21, OS id=8445 
Sat Apr 18 06:25:38 2009
ARC0 started with pid=20, OS id=8443 
ARC0: Archival started
ARC1: Archival started
ARC2: Archival started
ARC3: Archival started
ARCH: STARTING ARCH PROCESSES COMPLETE
ARC0: Becoming the 'no FAL' ARCH
ARC0: Becoming the 'no SRL' ARCH
ARC0: Thread not mounted
ARC1: Becoming the heartbeat ARCH
Sat Apr 18 06:25:38 2009
ARC3 started with pid=23, OS id=8449 
ARC3: Thread not mounted
Sat Apr 18 06:25:38 2009
ARC2 started with pid=22, OS id=8447 
ARC2: Thread not mounted
ARC1: Thread not mounted
Sat Apr 18 06:25:39 2009
Successful mount of redo thread 1, with mount id 1212288222
Physical Standby Database mounted.
Lost write protection disabled
Completed: alter database mount standby database
Sat Apr 18 06:28:56 2009
Switch of datafile 1 complete to datafile copy 
  checkpoint is 4021609
Switch of datafile 2 complete to datafile copy 
  checkpoint is 4021608
Switch of datafile 3 complete to datafile copy 
  checkpoint is 4021656
Switch of datafile 4 complete to datafile copy 
  checkpoint is 4021701
Switch of datafile 5 complete to datafile copy 
  checkpoint is 4021679
Using STANDBY_ARCHIVE_DEST parameter default value as /u01/app/oracle/flash_recovery_area/STDBY/
alter database recover datafile list clear
Completed: alter database recover datafile list clear
alter database recover datafile list
 1 , 2 , 3 , 4 , 5
Completed: alter database recover datafile list
 1 , 2 , 3 , 4 , 5
alter database recover if needed
 standby start until change 4021704
Media Recovery Start
Fast Parallel Media Recovery NOT enabled
Managed Standby Recovery not using Real Time Apply
ORA-279 signalled during: alter database recover if needed
 standby start until change 4021704
...
alter database recover logfile '/u01/app/oracle/flash_recovery_area/STDBY/log_109_1_682541003.arc'
Media Recovery Log /u01/app/oracle/flash_recovery_area/STDBY/log_109_1_682541003.arc
Incomplete Recovery applied until change 4021704 time 04/18/2009 06:29:05
Media Recovery Complete (stdby)
Completed: alter database recover logfile '/u01/app/oracle/flash_recovery_area/STDBY/log_109_1_682541003.arc'