Skip navigation.

Standby database using RMAN duplicate

Steps to create standby database using RMAN:

primary database name:taurus
host name:sony
db_unique_name=production

standby database name:taurus
hostname:sonydr
db_unique_name=standby

Oracle 10.2.0.1.0
RHEL 4
-force logging is enabled on the primary database.
-password file is created for primary database
-primary database is in archivelog mode

SQL> select name,open_mode,log_mode
  2  from v$database;

NAME      OPEN_MODE  LOG_MODE
--------- ---------- ------------
TAURUS    READ WRITE ARCHIVELOG

SQL>


SQL> select instance_name,host_name
  2  from v$instance;

INSTANCE_NAME    HOST_NAME
---------------- ----------------------------------------------------------------
taurus           sony

SQL>

create the pfile to add dataguard related parameters:

SQL> create pfile='/u01/backup/pfile.ora' from spfile;

File created.

SQL>


SQL> !
[oracle@sony ~]$ vi /u01/backup/pfile.ora


taurus.__db_cache_size=243269632
taurus.__java_pool_size=4194304
taurus.__large_pool_size=4194304
taurus.__shared_pool_size=92274688
taurus.__streams_pool_size=0
*.audit_file_dest='/u01/app/oracle/admin/taurus/adump'
*.background_dump_dest='/u01/app/oracle/admin/taurus/bdump'
*.compatible='10.2.0.1.0'
*.control_files='/u01/app/oracle/TAURUS/controlfile/o1_mf_6r25p3f5_.ctl','/u01/app/oracle/flash_recovery_area/TAURUS/controlfile/o1_mf_6r25p3j0_.ctl'
*.core_dump_dest='/u01/app/oracle/admin/taurus/cdump'
*.db_block_size=8192
*.db_create_file_dest='/u01/app/oracle'
*.db_domain=''
*.db_file_multiblock_read_count=16
*.db_name='taurus'
*.db_recovery_file_dest='/u01/app/oracle/flash_recovery_area'
*.db_recovery_file_dest_size=2147483648
*.dispatchers='(PROTOCOL=TCP) (SERVICE=taurusXDB)'
*.job_queue_processes=10
*.log_archive_format='%t_%s_%r.dbf'
*.open_cursors=300
*.pga_aggregate_target=115343360
*.processes=150
*.remote_login_passwordfile='EXCLUSIVE'
*.sga_target=347078656
*.undo_management='AUTO'
*.undo_tablespace='UNDOTBS1'
*.user_dump_dest='/u01/app/oracle/admin/taurus/udump'
####dataguard####
service_names=taurus
FAL_SERVER='TAURUSSTDBY'
FAL_CLIENT='TAURUS'
log_archive_dest_1='service=taurusstdby valid_for=(online_logfiles,primary_role) db_unique_name=standby'
db_unique_name=production
log_archive_dest_state_1=enable
log_archive_config='dg_config=(production,standby)'
standby_file_management=auto
db_file_name_convert='/u01/taurusstandby/','/u01/app/oracle/TAURUS/datafile/'
log_file_name_convert='/u01/taurusstandby/','/u01/app/oracle/TAURUS/onlinelog/'


modify the tnsnames.ora file to add entry for primary and standby database:


[oracle@sony ~]$ cd /u01/app/oracle/product/10.2.0/db_1/network/admin/
[oracle@sony admin]$ cat tnsnames.ora

# tnsnames.ora Network Configuration File: /u01/app/oracle/product/10.2.0/db_1/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.

UNICORN =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = sony)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = unicorn)
    )
  )

TAURUS =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = sony)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = taurus)
    )
  )

EXTPROC_CONNECTION_DATA =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
    )
    (CONNECT_DATA =
      (SID = PLSExtProc)
      (PRESENTATION = RO)
    )
  )

TAURUSSTDBY =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = sonydr)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = taurusstdby)
    )
  )

copy the pfile and password file to standby server.
modify the parameter file for standby database


[oracle@sony admin]$ scp /u01/backup/pfile.ora oracle@sonydr:/u01/backup/pfile.ora
The authenticity of host 'sonydr (192.168.2.21)' can't be established.
RSA key fingerprint is 14:07:8b:fb:c3:ef:65:20:e3:bf:62:ce:d3:08:29:77.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'sonydr,192.168.2.21' (RSA) to the list of known hosts.
oracle@sonydr's password:
pfile.ora                                                                                                  100% 1576     1.5KB/s   00:00
[oracle@sony admin]$


[oracle@sony dbs]$ scp /u01/app/oracle/product/10.2.0/db_1/dbs/orapwtaurus oracle@sonydr:/u01/app/oracle/product/10.2.0/db_1/dbs/orapwtaurusstdby
oracle@sonydr's password:
orapwtaurus                                                                                                100% 1536     1.5KB/s   00:00
[oracle@sony dbs]$

modified parameter file for standby:

db_cache_size=243269632
java_pool_size=4194304
large_pool_size=4194304
shared_pool_size=92274688
streams_pool_size=0
*.audit_file_dest='/u01/app/oracle/admin/taurusstdby/adump'
*.background_dump_dest='/u01/app/oracle/admin/taurusstdby/bdump'
*.compatible='10.2.0.1.0'
#*.control_files='/u01/app/oracle/TAURUS/controlfile/o1_mf_6r25p3f5_.ctl','/u01/app/oracle/flash_recovery_area/TAURUS/controlfile/o1_mf_6r25p3j0_.ctl'
*.core_dump_dest='/u01/app/oracle/admin/taurusstdby/cdump'
*.db_block_size=8192
*.db_create_file_dest='/u01/taurusstandby/'
*.db_domain=''
*.db_file_multiblock_read_count=16
*.db_name='taurus'
*.db_recovery_file_dest='/u01/app/oracle/flash_recovery_area'
*.db_recovery_file_dest_size=2147483648
*.dispatchers='(PROTOCOL=TCP) (SERVICE=taurusstdbyXDB)'
*.job_queue_processes=10
*.log_archive_format='%t_%s_%r.dbf'
*.open_cursors=300
*.pga_aggregate_target=115343360
*.processes=150
*.remote_login_passwordfile='EXCLUSIVE'
*.sga_target=347078656
*.undo_management='AUTO'
*.undo_tablespace='UNDOTBS1'
*.user_dump_dest='/u01/app/oracle/admin/taurusstdby/udump'
####dataguard####
service_names=taurusstdby
FAL_SERVER='TAURUS'
FAL_CLIENT='TAURUSSTDBY'
log_archive_dest_1='service=taurus valid_for=(online_logfiles,primary_role) db_unique_name=production'
db_unique_name=standby
log_archive_dest_state_1=enable
log_archive_config='dg_config=(production,standby)'
standby_file_management=auto
db_file_name_convert='/u01/app/oracle/TAURUS/datafile/','/u01/taurusstandby/'
log_file_name_convert='/u01/app/oracle/TAURUS/onlinelog/','/u01/taurusstandby/'

check for connectivity between the two databases:


[oracle@sonydr admin]$ tnsping taurus

TNS Ping Utility for Linux: Version 10.2.0.1.0 - Production on 18-MAR-2011 01:54:47

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

Used parameter files:


Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = sony)(PORT = 1521))) (CONNECT_DATA = (SERVICE_NAME = taurus)))
OK (0 msec)
[oracle@sonydr admin]$


[oracle@sony admin]$ tnsping taurusstdby

TNS Ping Utility for Linux: Version 10.2.0.1.0 - Production on 18-MAR-2011 01:55:06

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

Used parameter files:


Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = sonydr)(PORT = 1521))) (CONNECT_DATA = (SERVICE_NAME = taurusstdby)))
OK (0 msec)
[oracle@sony admin]$

backup the controlfile for standby

[oracle@sony dbs]$ echo $ORACLE_SID
taurus
[oracle@sony dbs]$ rman target /

Recovery Manager: Release 10.2.0.1.0 - Production on Fri Mar 18 02:02:03 2011

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

connected to target database: TAURUS (DBID=1293056731)

RMAN> backup current controlfile for standby format '/u01/backup/standbycontrol.ctl';

Starting backup at 18-MAR-11
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=158 devtype=DISK
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
including standby control file in backupset
channel ORA_DISK_1: starting piece 1 at 18-MAR-11
channel ORA_DISK_1: finished piece 1 at 18-MAR-11
piece handle=/u01/backup/standbycontrol.ctl tag=TAG20110318T020241 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:02
Finished backup at 18-MAR-11

RMAN>

backup the primary database and copy the standby controlfile and backup pieces to standby host


[oracle@sony backup]$ rman target /

Recovery Manager: Release 10.2.0.1.0 - Production on Fri Mar 18 02:24:13 2011

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

connected to target database: TAURUS (DBID=1293056731)

RMAN> run
2> {
3> allocate channel c2 device type disk format '/u01/backup/%u';
4> backup database plus archivelog;
5> }

using target database control file instead of recovery catalog
allocated channel: c2
channel c2: sid=143 devtype=DISK


Starting backup at 18-MAR-11
current log archived
channel c2: starting archive log backupset
channel c2: specifying archive log(s) in backup set
input archive log thread=1 sequence=1 recid=1 stamp=745983457
input archive log thread=1 sequence=2 recid=2 stamp=745983516
input archive log thread=1 sequence=3 recid=3 stamp=746017820
input archive log thread=1 sequence=4 recid=4 stamp=746018243
input archive log thread=1 sequence=5 recid=5 stamp=746018295
input archive log thread=1 sequence=6 recid=6 stamp=746065687
input archive log thread=1 sequence=7 recid=8 stamp=746071594
input archive log thread=1 sequence=8 recid=7 stamp=746071593
input archive log thread=1 sequence=9 recid=9 stamp=746071597
input archive log thread=1 sequence=10 recid=10 stamp=746071597
input archive log thread=1 sequence=11 recid=11 stamp=746071660
input archive log thread=1 sequence=12 recid=12 stamp=746072191
input archive log thread=1 sequence=13 recid=13 stamp=746072191
input archive log thread=1 sequence=14 recid=14 stamp=746072196
input archive log thread=1 sequence=15 recid=29 stamp=746072508
input archive log thread=1 sequence=16 recid=31 stamp=746072561
input archive log thread=1 sequence=17 recid=33 stamp=746072701
channel c2: starting piece 1 at 18-MAR-11
channel c2: finished piece 1 at 18-MAR-11
piece handle=/u01/backup/0bm7gaju tag=TAG20110318T022501 comment=NONE
channel c2: backup set complete, elapsed time: 00:00:04
Finished backup at 18-MAR-11

Starting backup at 18-MAR-11
channel c2: starting full datafile backupset
channel c2: specifying datafile(s) in backupset
input datafile fno=00001 name=/u01/app/oracle/TAURUS/datafile/o1_mf_system_6r25o651_.dbf
input datafile fno=00003 name=/u01/app/oracle/TAURUS/datafile/o1_mf_sysaux_6r25o65c_.dbf
input datafile fno=00002 name=/u01/app/oracle/TAURUS/datafile/o1_mf_undotbs1_6r25o674_.dbf
input datafile fno=00005 name=/u01/app/oracle/TAURUS/datafile/o1_mf_mandar_6r37s0yl_.dbf
input datafile fno=00004 name=/u01/app/oracle/TAURUS/datafile/o1_mf_users_6r25o67k_.dbf
channel c2: starting piece 1 at 18-MAR-11
channel c2: finished piece 1 at 18-MAR-11
piece handle=/u01/backup/0cm7gak2 tag=TAG20110318T022506 comment=NONE
channel c2: backup set complete, elapsed time: 00:00:45
channel c2: starting full datafile backupset
channel c2: specifying datafile(s) in backupset
including current control file in backupset
including current SPFILE in backupset
channel c2: starting piece 1 at 18-MAR-11
channel c2: finished piece 1 at 18-MAR-11
piece handle=/u01/backup/0dm7galf tag=TAG20110318T022506 comment=NONE
channel c2: backup set complete, elapsed time: 00:00:02
Finished backup at 18-MAR-11

Starting backup at 18-MAR-11
current log archived
channel c2: starting archive log backupset
channel c2: specifying archive log(s) in backup set
input archive log thread=1 sequence=18 recid=35 stamp=746072754
channel c2: starting piece 1 at 18-MAR-11
channel c2: finished piece 1 at 18-MAR-11
piece handle=/u01/backup/0em7gali tag=TAG20110318T022554 comment=NONE
channel c2: backup set complete, elapsed time: 00:00:02
Finished backup at 18-MAR-11
released channel: c2

RMAN>


[oracle@sony backup]$ scp standbycontrol.ctl oracle@sonydr:/u01/backup/
oracle@sonydr's password:
standbycontrol.ctl                                                                                         100% 6944KB   6.8MB/s   00:01




[oracle@sony backup]$ pwd
/u01/backup
[oracle@sony backup]$ ls -lrth
total 577M
-rw-r--r--  1 oracle oinstall 1.6K Mar 18 01:37 pfile.ora
-rw-r-----  1 oracle oinstall 6.8M Mar 18 02:02 standbycontrol.ctl
-rw-r-----  1 oracle oinstall  56M Mar 18 02:25 0bm7gaju
-rw-r-----  1 oracle oinstall 507M Mar 18 02:25 0cm7gak2
-rw-r-----  1 oracle oinstall 7.0M Mar 18 02:25 0dm7galf
-rw-r-----  1 oracle oinstall 3.0K Mar 18 02:25 0em7gali
[oracle@sony backup]$


[oracle@sony backup]$ scp 0* oracle@sonydr:/u01/backup/
oracle@sonydr's password:
0bm7gaju                                                                                                   100%   55MB  13.8MB/s   00:04
0cm7gak2                                                                                                   100%  507MB  12.7MB/s   00:40
0dm7galf                                                                                                   100% 7168KB   7.0MB/s   00:01
0em7gali                                                                                                   100% 3072     3.0KB/s   00:00
[oracle@sony backup]$

restart both instances with new parameter file:

[oracle@sony backup]$ sqlplus / as sysdba

SQL*Plus: Release 10.2.0.1.0 - Production on Fri Mar 18 02:10:44 2011

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


Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options

SQL>
SQL>
SQL> shut immediate;


Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> SQL> SQL>
SQL>
SQL> startup pfile='/u01/backup/pfile.ora';
ORACLE instance started.

Total System Global Area  348127232 bytes
Fixed Size                  1219352 bytes
Variable Size             100664552 bytes
Database Buffers          243269632 bytes
Redo Buffers                2973696 bytes
Database mounted.
Database opened.
SQL>
SQL> create spfile from pfile='/u01/backup/pfile.ora';

File created.

SQL> shut immediate;


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

Total System Global Area  348127232 bytes
Fixed Size                  1219352 bytes
Variable Size             100664552 bytes
Database Buffers          243269632 bytes
Redo Buffers                2973696 bytes
show parameter log_arDatabase mounted.
chive_dDatabase opened.
SQL> est_1

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
log_archive_dest_1                   string      service=taurusstdby valid_for=
                                                 (online_logfiles,primary_role)
                                                  db_unique_name=standby
log_archive_dest_10                  string
SQL>

standby:

[oracle@sonydr ~]$ echo $ORACLE_SID
taurusstdby
[oracle@sonydr ~]$ sqlplus / as sysdba

SQL*Plus: Release 10.2.0.1.0 - Production on Fri Mar 18 02:11:39 2011

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

Connected to an idle instance.

SQL> startup nomount pfile='/u01/backup/pfile.ora';
ORACLE instance started.

Total System Global Area  348127232 bytes
Fixed Size                  1219352 bytes
Variable Size             100664552 bytes
Database Buffers          243269632 bytes
Redo Buffers                2973696 bytes
SQL> create spfile from pfile='/u01/backup/pfile.ora';

File created.

SQL> show parameter log_archive_dest_1

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
log_archive_dest_1                   string      service=taurus valid_for=(onli
                                                 ne_logfiles,primary_role) db_u
                                                 nique_name=production
log_archive_dest_10                  string
SQL> shut immediate;

ORA-01507: database not mounted


ORACLE instance shut down.
SQL> SQL> startup nomount;
ORACLE instance started.

Total System Global Area  348127232 bytes
Fixed Size                  1219352 bytes
Variable Size             100664552 bytes
Database Buffers          243269632 bytes
Redo Buffers                2973696 bytes
SQL>

RMAN duplicate for standby:


[oracle@sony backup]$ rman target / auxiliary sys@taurusstdby

Recovery Manager: Release 10.2.0.1.0 - Production on Fri Mar 18 02:30:20 2011

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

connected to target database: TAURUS (DBID=1293056731)
auxiliary database Password:
connected to auxiliary database: TAURUS (not mounted)

RMAN> duplicate target database for standby dorecover;

Starting Duplicate Db at 18-MAR-11
using target database control file instead of recovery catalog
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: sid=155 devtype=DISK

contents of Memory Script:
{
   set until scn  500967;
   restore clone standby controlfile;
   sql clone 'alter database mount standby database';
}
executing Memory Script

executing command: SET until clause

Starting restore at 18-MAR-11
using channel ORA_AUX_DISK_1

channel ORA_AUX_DISK_1: starting datafile backupset restore
channel ORA_AUX_DISK_1: restoring control file
channel ORA_AUX_DISK_1: reading from backup piece /u01/backup/standbycontrol.ctl
channel ORA_AUX_DISK_1: restored backup piece 1
piece handle=/u01/backup/standbycontrol.ctl tag=TAG20110318T020241
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:01
output filename=/u01/taurusstandby/STANDBY/controlfile/o1_mf_6r4wvkxo_.ctl
output filename=/u01/app/oracle/flash_recovery_area/STANDBY/controlfile/o1_mf_6r4wvl4g_.ctl
Finished restore at 18-MAR-11

sql statement: alter database mount standby database
released channel: ORA_AUX_DISK_1

contents of Memory Script:
{
   set until scn  500967;
   set newname for tempfile  1 to
 "/u01/taurusstandby/o1_mf_temp_6r25pjy7_.tmp";
   switch clone tempfile all;
   set newname for datafile  1 to
 "/u01/taurusstandby/o1_mf_system_6r25o651_.dbf";
   set newname for datafile  2 to
 "/u01/taurusstandby/o1_mf_undotbs1_6r25o674_.dbf";
   set newname for datafile  3 to
 "/u01/taurusstandby/o1_mf_sysaux_6r25o65c_.dbf";
   set newname for datafile  4 to
 "/u01/taurusstandby/o1_mf_users_6r25o67k_.dbf";
   set newname for datafile  5 to
 "/u01/taurusstandby/o1_mf_mandar_6r37s0yl_.dbf";
   restore
   check readonly
   clone database
   ;
}
executing Memory Script

executing command: SET until clause

executing command: SET NEWNAME

renamed temporary file 1 to /u01/taurusstandby/o1_mf_temp_6r25pjy7_.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 restore at 18-MAR-11
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: sid=155 devtype=DISK

channel ORA_AUX_DISK_1: starting datafile backupset restore
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
restoring datafile 00001 to /u01/taurusstandby/o1_mf_system_6r25o651_.dbf
restoring datafile 00002 to /u01/taurusstandby/o1_mf_undotbs1_6r25o674_.dbf
restoring datafile 00003 to /u01/taurusstandby/o1_mf_sysaux_6r25o65c_.dbf
restoring datafile 00004 to /u01/taurusstandby/o1_mf_users_6r25o67k_.dbf
restoring datafile 00005 to /u01/taurusstandby/o1_mf_mandar_6r37s0yl_.dbf
channel ORA_AUX_DISK_1: reading from backup piece /u01/backup/0cm7gak2
channel ORA_AUX_DISK_1: restored backup piece 1
piece handle=/u01/backup/0cm7gak2 tag=TAG20110318T022506
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:30
Finished restore at 18-MAR-11

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

datafile 1 switched to datafile copy
input datafile copy recid=6 stamp=746073056 filename=/u01/taurusstandby/STANDBY/datafile/o1_mf_system_6r4xmbqp_.dbf
datafile 2 switched to datafile copy
input datafile copy recid=7 stamp=746073056 filename=/u01/taurusstandby/STANDBY/datafile/o1_mf_undotbs1_6r4xmbrl_.dbf
datafile 3 switched to datafile copy
input datafile copy recid=8 stamp=746073056 filename=/u01/taurusstandby/STANDBY/datafile/o1_mf_sysaux_6r4xmbrc_.dbf
datafile 4 switched to datafile copy
input datafile copy recid=9 stamp=746073056 filename=/u01/taurusstandby/STANDBY/datafile/o1_mf_users_6r4xmbt6_.dbf
datafile 5 switched to datafile copy
input datafile copy recid=10 stamp=746073056 filename=/u01/taurusstandby/STANDBY/datafile/o1_mf_mandar_6r4xmbrw_.dbf

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

executing command: SET until clause

Starting recover at 18-MAR-11
using channel ORA_AUX_DISK_1

starting media recovery

channel ORA_AUX_DISK_1: starting archive log restore to default destination
channel ORA_AUX_DISK_1: restoring archive log
archive log thread=1 sequence=7
channel ORA_AUX_DISK_1: restoring archive log
archive log thread=1 sequence=8
channel ORA_AUX_DISK_1: restoring archive log
archive log thread=1 sequence=9
channel ORA_AUX_DISK_1: restoring archive log
archive log thread=1 sequence=10
channel ORA_AUX_DISK_1: restoring archive log
archive log thread=1 sequence=11
channel ORA_AUX_DISK_1: restoring archive log
archive log thread=1 sequence=12
channel ORA_AUX_DISK_1: restoring archive log
archive log thread=1 sequence=13
channel ORA_AUX_DISK_1: restoring archive log
archive log thread=1 sequence=14
channel ORA_AUX_DISK_1: restoring archive log
archive log thread=1 sequence=15
channel ORA_AUX_DISK_1: restoring archive log
archive log thread=1 sequence=16
channel ORA_AUX_DISK_1: restoring archive log
archive log thread=1 sequence=17
channel ORA_AUX_DISK_1: reading from backup piece /u01/backup/0bm7gaju
channel ORA_AUX_DISK_1: restored backup piece 1
piece handle=/u01/backup/0bm7gaju tag=TAG20110318T022501
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:07
archive log filename=/u01/app/oracle/flash_recovery_area/STANDBY/archivelog/2011_03_18/o1_mf_1_7_6r4xncko_.arc thread=1 sequence=7
channel clone_default: deleting archive log(s)
archive log filename=/u01/app/oracle/flash_recovery_area/STANDBY/archivelog/2011_03_18/o1_mf_1_7_6r4xncko_.arc recid=11 stamp=746073061
archive log filename=/u01/app/oracle/flash_recovery_area/STANDBY/archivelog/2011_03_18/o1_mf_1_8_6r4xnd2f_.arc thread=1 sequence=8
channel clone_default: deleting archive log(s)
archive log filename=/u01/app/oracle/flash_recovery_area/STANDBY/archivelog/2011_03_18/o1_mf_1_8_6r4xnd2f_.arc recid=7 stamp=746073060
archive log filename=/u01/app/oracle/flash_recovery_area/STANDBY/archivelog/2011_03_18/o1_mf_1_9_6r4xncoy_.arc thread=1 sequence=9
channel clone_default: deleting archive log(s)
archive log filename=/u01/app/oracle/flash_recovery_area/STANDBY/archivelog/2011_03_18/o1_mf_1_9_6r4xncoy_.arc recid=4 stamp=746073059
archive log filename=/u01/app/oracle/flash_recovery_area/STANDBY/archivelog/2011_03_18/o1_mf_1_10_6r4xnd3o_.arc thread=1 sequence=10
channel clone_default: deleting archive log(s)
archive log filename=/u01/app/oracle/flash_recovery_area/STANDBY/archivelog/2011_03_18/o1_mf_1_10_6r4xnd3o_.arc recid=8 stamp=746073060
archive log filename=/u01/app/oracle/flash_recovery_area/STANDBY/archivelog/2011_03_18/o1_mf_1_11_6r4xnd4r_.arc thread=1 sequence=11
channel clone_default: deleting archive log(s)
archive log filename=/u01/app/oracle/flash_recovery_area/STANDBY/archivelog/2011_03_18/o1_mf_1_11_6r4xnd4r_.arc recid=9 stamp=746073060
archive log filename=/u01/app/oracle/flash_recovery_area/STANDBY/archivelog/2011_03_18/o1_mf_1_12_6r4xnclr_.arc thread=1 sequence=12
channel clone_default: deleting archive log(s)
archive log filename=/u01/app/oracle/flash_recovery_area/STANDBY/archivelog/2011_03_18/o1_mf_1_12_6r4xnclr_.arc recid=3 stamp=746073059
archive log filename=/u01/app/oracle/flash_recovery_area/STANDBY/archivelog/2011_03_18/o1_mf_1_13_6r4xnd5v_.arc thread=1 sequence=13
channel clone_default: deleting archive log(s)
archive log filename=/u01/app/oracle/flash_recovery_area/STANDBY/archivelog/2011_03_18/o1_mf_1_13_6r4xnd5v_.arc recid=10 stamp=746073060
archive log filename=/u01/app/oracle/flash_recovery_area/STANDBY/archivelog/2011_03_18/o1_mf_1_14_6r4xncs6_.arc thread=1 sequence=14
channel clone_default: deleting archive log(s)
archive log filename=/u01/app/oracle/flash_recovery_area/STANDBY/archivelog/2011_03_18/o1_mf_1_14_6r4xncs6_.arc recid=5 stamp=746073060
archive log filename=/u01/app/oracle/flash_recovery_area/STANDBY/archivelog/2011_03_18/o1_mf_1_15_6r4xncny_.arc thread=1 sequence=15
channel clone_default: deleting archive log(s)
archive log filename=/u01/app/oracle/flash_recovery_area/STANDBY/archivelog/2011_03_18/o1_mf_1_15_6r4xncny_.arc recid=2 stamp=746073059
archive log filename=/u01/app/oracle/flash_recovery_area/STANDBY/archivelog/2011_03_18/o1_mf_1_16_6r4xnct8_.arc thread=1 sequence=16
channel clone_default: deleting archive log(s)
archive log filename=/u01/app/oracle/flash_recovery_area/STANDBY/archivelog/2011_03_18/o1_mf_1_16_6r4xnct8_.arc recid=6 stamp=746073060
archive log filename=/u01/app/oracle/flash_recovery_area/STANDBY/archivelog/2011_03_18/o1_mf_1_17_6r4xncn4_.arc thread=1 sequence=17
channel clone_default: deleting archive log(s)
archive log filename=/u01/app/oracle/flash_recovery_area/STANDBY/archivelog/2011_03_18/o1_mf_1_17_6r4xncn4_.arc recid=1 stamp=746073059
channel ORA_AUX_DISK_1: starting archive log restore to default destination
channel ORA_AUX_DISK_1: restoring archive log
archive log thread=1 sequence=18
channel ORA_AUX_DISK_1: reading from backup piece /u01/backup/0em7gali
channel ORA_AUX_DISK_1: restored backup piece 1
piece handle=/u01/backup/0em7gali tag=TAG20110318T022554
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:02
archive log filename=/u01/app/oracle/flash_recovery_area/STANDBY/archivelog/2011_03_18/o1_mf_1_18_6r4xnml3_.arc thread=1 sequence=18
channel clone_default: deleting archive log(s)
archive log filename=/u01/app/oracle/flash_recovery_area/STANDBY/archivelog/2011_03_18/o1_mf_1_18_6r4xnml3_.arc recid=12 stamp=746073067
media recovery complete, elapsed time: 00:00:03
Finished recover at 18-MAR-11
Finished Duplicate Db at 18-MAR-11

RMAN>

switch logfiles on the primary database,put the standby database in managed recovery mode and check for sync
the logs from primary are shipped over to standby at fra destination
:

primary:

SQL> select max(sequence#) from v$archived_log;

MAX(SEQUENCE#)
--------------
            18

SQL> alter system switch logfile;

System altered.

SQL> /

System altered.

SQL>
SQL>
SQL>
SQL>
SQL> /

System altered.

SQL>
SQL>
SQL>
SQL> select max(sequence#) from v$archived_log;

MAX(SEQUENCE#)
--------------
            21

SQL>

standby:


SQL> select name,open_mode,log_mode
  2  from v$database;

NAME      OPEN_MODE  LOG_MODE
--------- ---------- ------------
TAURUS    MOUNTED    ARCHIVELOG

SQL> select recovery_mode
  2  from v$archive_dest_status;

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

11 rows selected.

SQL>


SQL> select max(sequence#) from v$log_history;

MAX(SEQUENCE#)
--------------
            18




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

Database altered.

SQL>  select recovery_mode
  2  from v$archive_dest_status;

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

11 rows selected.

SQL> select max(sequence#) from v$log_history;

MAX(SEQUENCE#)
--------------
            21

SQL>

/u01/app/oracle/flash_recovery_area/STANDBY/archivelog/2011_03_18
[oracle@sonydr 2011_03_18]$ ls -lrth
total 57M
-rw-r-----  1 oracle oinstall  32M Mar 18 02:19 o1_mf_1_1_6r4wyr5h_.arc
-rw-r-----  1 oracle oinstall 213K Mar 18 02:19 o1_mf_1_3_6r4wyvtf_.arc
-rw-r-----  1 oracle oinstall 1.0K Mar 18 02:19 o1_mf_1_2_6r4wyvqc_.arc
-rw-r-----  1 oracle oinstall 2.0M Mar 18 02:19 o1_mf_1_6_6r4wyw5c_.arc
-rw-r-----  1 oracle oinstall 2.0K Mar 18 02:19 o1_mf_1_5_6r4wyw2q_.arc
-rw-r-----  1 oracle oinstall 120K Mar 18 02:19 o1_mf_1_4_6r4wyw0h_.arc
-rw-r-----  1 oracle oinstall 2.0K Mar 18 02:19 o1_mf_1_9_6r4wyxoc_.arc
-rw-r-----  1 oracle oinstall 1.0K Mar 18 02:19 o1_mf_1_8_6r4wyxm8_.arc
-rw-r-----  1 oracle oinstall  21M Mar 18 02:19 o1_mf_1_7_6r4wywky_.arc
-rw-r-----  1 oracle oinstall 1.0K Mar 18 02:19 o1_mf_1_11_6r4wyxsw_.arc
-rw-r-----  1 oracle oinstall 1.0K Mar 18 02:19 o1_mf_1_10_6r4wyxqf_.arc
-rw-r-----  1 oracle oinstall 2.0K Mar 18 02:19 o1_mf_1_14_6r4wyy47_.arc
-rw-r-----  1 oracle oinstall 1.0K Mar 18 02:19 o1_mf_1_13_6r4wyy3g_.arc
-rw-r-----  1 oracle oinstall 557K Mar 18 02:19 o1_mf_1_12_6r4wyxtz_.arc
-rw-r-----  1 oracle oinstall 3.5K Mar 18 02:22 o1_mf_1_15_6r4x4f7b_.arc
-rw-r-----  1 oracle oinstall 1.5K Mar 18 02:23 o1_mf_1_16_6r4x5zrs_.arc
-rw-r-----  1 oracle oinstall  13K Mar 18 02:25 o1_mf_1_17_6r4x9xhz_.arc
-rw-r-----  1 oracle oinstall 1.5K Mar 18 02:25 o1_mf_1_18_6r4xbjrm_.arc
-rw-r-----  1 oracle oinstall 1.1M Mar 18 02:35 o1_mf_1_19_6r4xwxc6_.arc
-rw-r-----  1 oracle oinstall 1.0K Mar 18 02:35 o1_mf_1_20_6r4xwxgk_.arc
-rw-r-----  1 oracle oinstall 8.5K Mar 18 02:35 o1_mf_1_21_6r4xwxhp_.arc
[oracle@sonydr 2011_03_18]$