Information in this document applies to any platform.
Oracle ServerEnterprise Edition - Version: 10.2.0.1 to 10.2.0.4
Oracle Server
The following note describes step-by-step procedure to create physical standby by using RMAN duplicate without shutting down the primary (Production) database. Database Name :- prim
Primary db_unique_name :- prim
standby db_unique_name :- stdby
Primary Hostname :- raca.idc.oracle.com
standby Hostname :- core1.idc.oracle.com
Primary db_unique_name :- prim
standby db_unique_name :- stdby
Primary Hostname :- raca.idc.oracle.com
standby Hostname :- core1.idc.oracle.com
STEP: 1
Enable Force Logging on primary,
Enable Force Logging on primary,
SQL> ALTER DATABASE FORCE LOGGING;
Database altered.
NOTE: Create password file if not present, also check if archiving enabled. STEP: 2
Configure a Standby Redo Log on primary,
Configure a Standby Redo Log on primary,
SQL> ALTER DATABASE ADD STANDBY LOGFILE GROUP 3 '/u01/app/oracle/databases/prim/redo/log3a.log' size 50m; Database altered. SQL> ALTER DATABASE ADD STANDBY LOGFILE GROUP 4 '/u01/app/oracle/databases/prim/redo/log4a.log' size 50m; Database altered. SQL> ALTER DATABASE ADD STANDBY LOGFILE GROUP 5 '/u01/app/oracle/databases/prim/redo/log5a.log' size 50m; Database altered. SQL> ALTER DATABASE ADD STANDBY LOGFILE GROUP 6 '/u01/app/oracle/databases/prim/redo/log6a.log' size 50m; Database altered. NOTE: To check the number of SRL,
(maximum number of logfiles for each thread + 1) * maximum number of threads
For example, if the primary database has 3 log files for each thread and 2 threads, then 8 standbys redo log file groups are needed on the standby database.
Verify the standby redo log file groups were created.
SQL> SELECT GROUP#,ThREAD#,SEQUENCE#,ARCHIVED,STATUS FROM V$STANDBY_LOG;
(maximum number of logfiles for each thread + 1) * maximum number of threads
For example, if the primary database has 3 log files for each thread and 2 threads, then 8 standbys redo log file groups are needed on the standby database.
Verify the standby redo log file groups were created.
SQL> SELECT GROUP#,ThREAD#,SEQUENCE#,ARCHIVED,STATUS FROM V$STANDBY_LOG;
STEP :3
Modify the primary initialization parameter for dataguard on primary,
SQL>alter system set LOG_ARCHIVE_CONFIG='DG_CONFIG=(prim,stdby)';
System altered.
SQL> alter system set LOG_ARCHIVE_DEST_1='LOCATION=/u01/app/oracle/databases/prim/redo/ VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=prim';
System altered.
SQL>alter system set LOG_ARCHIVE_DEST_2='SERVICE=stdby LGWR ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=stdby';
System altered.
SQL> alter system set LOG_ARCHIVE_DEST_STATE_1=ENABLE;
System altered.
SQL>alter system set FAL_SERVER=stdby;
System altered.
SQL>alter system set FAL_CLIENT=prim;
System altered.
SQL>alter system set DB_FILE_NAME_CONVERT='/u01/app/oracle/databases/stdby/data/','/u01/app/oracle/databases/prim/data' scope=spfile;
System altered.
SQL>alter system set LOG_FILE_NAME_CONVERT='/u01/app/oracle/databases/stdby/redo/','/u01/app/oracle/databases/prim/redo' scope=spfile;
System altered.
STEP:4
Run the backup job at the primary by connecting to target and catalog DB(if any)
Run the backup job at the primary by connecting to target and catalog DB(if any)
RMAN> backup as compress backupset database include current controlfile for standby;
On Sql Prompt
SQL> alter system archive log current;
run { allocate channel c1 type disk; allocate channel c2 type disk; backup as compressed backupset database format '/u01/app/oracle/databases/stage/%U'; backup current controlfile for standby format '/u01/app/oracle/databases/stage/%U';sql ‘alter system archive log current’ backup archivelog all format '/u01/app/oracle/databases/stage/%U'; } using target database control file instead of recovery catalog allocated channel: c1 channel c1: sid=22 devtype=DISK allocated channel: c2 channel c2: sid=32 devtype=DISK Starting backup at 05-MAR-09 channel c1: starting full datafile backupset channel c1: specifying datafile(s) in backupset input datafile fno=00001 name=/u01/app/oracle/databases/prim/data/system01.dbf input datafile fno=00002 name=/u01/app/oracle/databases/prim/data/undotbs01.dbf channel c1: starting piece 1 at 05-MAR-09 channel c2: starting full datafile backupset channel c2: specifying datafile(s) in backupset input datafile fno=00003 name=/u01/app/oracle/databases/prim/data/sysaux01.dbf channel c2: starting piece 1 at 05-MAR-09 channel c1: finished piece 1 at 05-MAR-09 piece handle=/u01/app/oracle/databases/stage/0tk95ldn_1_1 tag=TAG20090305T143325 comment=NONE channel c1: backup set complete, elapsed time: 00:01:56 channel c1: starting full datafile backupset channel c1: specifying datafile(s) in backupset including current control file in backupset channel c1: starting piece 1 at 05-MAR-09 channel c2: finished piece 1 at 05-MAR-09 piece handle=/u01/app/oracle/databases/stage/0uk95ldn_1_1 tag=TAG20090305T143325 comment=NONE channel c2: backup set complete, elapsed time: 00:01:58 channel c2: starting full datafile backupset channel c2: specifying datafile(s) in backupset channel c1: finished piece 1 at 05-MAR-09 piece handle=/u01/app/oracle/databases/stage/0vk95lhb_1_1 tag=TAG20090305T143325 comment=NONE channel c1: backup set complete, elapsed time: 00:00:03 including current SPFILE in backupset channel c2: starting piece 1 at 05-MAR-09 channel c2: finished piece 1 at 05-MAR-09 piece handle=/u01/app/oracle/databases/stage/10k95lhd_1_1 tag=TAG20090305T143325 comment=NONE channel c2: backup set complete, elapsed time: 00:00:02 Finished backup at 05-MAR-09 Starting backup at 05-MAR-09 current log archived channel c1: starting archive log backupset channel c1: specifying archive log(s) in backup set input archive log thread=1 sequence=5 recid=1 stamp=679686819 input archive log thread=1 sequence=6 recid=2 stamp=679686958 input archive log thread=1 sequence=7 recid=3 stamp=679687040 input archive log thread=1 sequence=8 recid=4 stamp=679743155 input archive log thread=1 sequence=9 recid=5 stamp=680047441 input archive log thread=1 sequence=10 recid=6 stamp=680621993 channel c1: starting piece 1 at 05-MAR-09 channel c2: starting archive log backupset channel c2: specifying archive log(s) in backup set input archive log thread=1 sequence=11 recid=7 stamp=680636808 input archive log thread=1 sequence=12 recid=22 stamp=680703332 input archive log thread=1 sequence=13 recid=32 stamp=680704306 input archive log thread=1 sequence=14 recid=34 stamp=680704331 input archive log thread=1 sequence=15 recid=36 stamp=680704336 input archive log thread=1 sequence=16 recid=38 stamp=680705571 input archive log thread=1 sequence=17 recid=51 stamp=680711731 channel c2: starting piece 1 at 05-MAR-09 channel c2: finished piece 1 at 05-MAR-09 piece handle=/u01/app/oracle/databases/stage/12k95lhl_1_1 tag=TAG20090305T143531 comment=NONE channel c2: backup set complete, elapsed time: 00:00:26 channel c1: finished piece 1 at 05-MAR-09 piece handle=/u01/app/oracle/databases/stage/11k95lhl_1_1 tag=TAG20090305T143531 comment=NONE channel c1: backup set complete, elapsed time: 00:01:01 Finished backup at 05-MAR-09 Starting backup at 05-MAR-09 channel c1: starting full datafile backupset channel c1: specifying datafile(s) in backupset including standby control file in backupset channel c1: starting piece 1 at 05-MAR-09 channel c1: finished piece 1 at 05-MAR-09 piece handle=/u01/app/oracle/databases/stage/13k95lji_1_1 tag=TAG20090305T143634 comment=NONE channel c1: backup set complete, elapsed time: 00:00:02 Finished backup at 05-MAR-09 released channel: c1 released channel: c2 Create parameter file on primary copy this & password file it to standby and make the necessary changes,
SQL>create pfile='/u01/app/oracle/databases/prim/stage/initstdby.ora' from spfile; File created.oracle@raca prim]$ scp –p /u01/app/oracle/dbs/initstdby.ora standbyhost:/u01/app/oracle/dbs/ oracle@raca prim]$ scp –p /u01/app/oracle/dbs/Pwdorcl standbyhost:/u01/app/oracle/dbs/ STEP :6
Copy the listener.ora,tnsname.ora and sqlnet.ora files into staging directory.
Copy the listener.ora,tnsname.ora and sqlnet.ora files into staging directory.
[oracle@raca prim]$ scp –p /u01/app/oracle/network/admin/*.ora standbyhost:/u01/app/oracle/network/admin Copy the redo logs also to standby to avoid size mismatch,
[oracle@raca prim]$ scp –p /u01/app/oracle/databases/prim/redo/*.log standbyhost:/u01/app/oracle/databases/prim/redo/ Move the files to standby server,
a. Create the same directory on standby server and copy the backups. os standby,
$mkdir -p /u01/app/oracle/databases/stage/
[oracle@raca prim]$ scp /u01/app/oracle/databases/stage/* core1.idc.oracle.com:/u01/app/oracle/databases/stage/ b. Alternatively we can copy the backups to standby different directory. On standby server connect to RMAN target as primary and auxiliary instance or if your primary is having catalog database then connect to target as primary, catalog database and auxiliary instance. Catalog those backup pieces to let the controlfile of primary or catalog database to know the backup information.
For details on how to catalog backup piece refer,
NOTE 470463.1 - How To Catalog Backups / Archivelogs / Datafile Copies / Controlfile Copies
STEP: 8
Make the necessary changes on the copied initstdby.ora file on standby.
Make the necessary changes on the copied initstdby.ora file on standby.
db_name=prim db_unique_name=stdby log_archive_config='DG_CONFIG=(prim,stdby)' log_archive_dest_1='LOCATION=/u01/app/oracle/databases/stdby/redo/ VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=stdby' log_archive_dest_2='SERVICE=prim LGWR ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=prim' log_archive_dest_state_1=ENABLE db_file_name_convert='/u01/app/oracle/databases/prim/data/','/u01/app/oracle/databases/stdby/data/' log_file_name_convert='/u01/app/oracle/databases/prim/redo/','/u01/app/oracle/databases/stdby/redo/' REMOTE_LOGIN_PASSWORDFILE=EXCLUSIVE standby_archive_dest='/u01/app/oracle/databases/stdby/arch/'standby_file_management=AUTO fal_client=stdby fal_server=prim Create standby instance,
create the same password as that of primary. Alternatively we can copy the password file from primary and rename it on standby.
For example from primary copry the password file,
scp /u01/app/oracle/dbs/opapwprim core1.idc.oracle.com:/u01/app/oracle/dbs/
on standby,
$mv orapwprim orapwstdby
or create new password same as primary as mentioned below,
a. in UNIX,
$export ORACLE_SID $orapwd file='$ORACLE_HOME/dbs/orapwstdby' password=sys entries=10; d:>set ORACLE_SID=stdby d:>oradim -new -sid stdby -intpwd sys b Create necessary directories and start the auxiliary instance on standby
[oracle@core1 stdby]$ pwd
/u01/app/oracle/databases/stdby
[oracle@core1 stdby]$mkdir data redo oradata stage udump bdump cdump
SQL>create spfile from pfile='/u01/app/oracle/databases/stage/initstdby.ora';
/u01/app/oracle/databases/stdby
[oracle@core1 stdby]$mkdir data redo oradata stage udump bdump cdump
SQL>create spfile from pfile='/u01/app/oracle/databases/stage/initstdby.ora';
File created.
SQL>start nomount;
ORACLE instance started.
Total System Global Area 612368384 bytes
Fixed Size 1220844 bytes
Variable Size 167776020 bytes
Database Buffers 436207616 bytes
Redo Buffers 7163904 bytes
SQL>exit
SQL>start nomount;
ORACLE instance started.
Total System Global Area 612368384 bytes
Fixed Size 1220844 bytes
Variable Size 167776020 bytes
Database Buffers 436207616 bytes
Redo Buffers 7163904 bytes
SQL>exit
STEP :10
Create net services on both primary and standby,
At prim server,
prim =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST =raca.idc.oracle.com )(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = prim)
)
)
stdby =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST =core1.idc.oracle.com )(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = stdby)
)
)
At standby server,
prim =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST =raca.idc.oracle.com )(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = prim)
)
)
stdby =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST =core1.idc.oracle.com )(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = stdby)
)
)
STEP : 11 Use RMAN duplicate for standby on standby,
When 'dorecover' is specified in the duplicate for stanby command then do a archivelog switch on the target database and run the duplicate.
Example : on primary,
sql> alter system archive log current;
on standby,
Connect to target(i.e. prim via connect string) and catalog database(if any) and this auxiliary database by, $RMAN target sys/oracle@prim catalog RMAN/RMAN@catdb auxiliary / if no catalog database, $RMAN target sys/<password>@prim auxiliary / Recovery Manager: Release 10.2.0.1.0 - Production on Thu Mar 5 12:30:56 2009 Copyright (c) 1982, 2005, Oracle. All rights reserved. connected to target database: PRIM (DBID=3971986030) connected to auxiliary database: PRIM (DBID=3971986030, not open) RMAN> duplicate target database for standby dorecover; Starting Duplicate Db at 05-MAR-09 using target database control file instead of recovery catalog allocated channel: ORA_AUX_DISK_1 channel ORA_AUX_DISK_1: sid=36 devtype=DISK contents of Memory Script: { set until scn 503194; restore clone standby controlfile; sql clone 'alter database mount standby database'; } executing Memory Script executing command: SET until clause Starting restore at 05-MAR-09 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/app/oracle/databases/prim/stage/0pk86cs2_1_1 channel ORA_AUX_DISK_1: restored backup piece 1 piece handle=/u01/app/oracle/databases/prim/stage/0pk86cs2_1_1 tag=TAG20090224T175722 channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:01 output filename=/u01/app/oracle/databases/stdby/oradata/control01.ctl Finished restore at 05-MAR-09 sql statement: alter database mount standby database released channel: ORA_AUX_DISK_1 contents of Memory Script: { set until scn 503194; set newname for datafile 1 to "/u01/app/oracle/databases/stdby/data/system01.dbf"; set newname for datafile 2 to "/u01/app/oracle/databases/stdby/data/undotbs01.dbf"; set newname for datafile 3 to "/u01/app/oracle/databases/stdby/data/sysaux01.dbf"; restore check readonly clone database ; } executing Memory Script executing command: SET until clause executing command: SET NEWNAME executing command: SET NEWNAME executing command: SET NEWNAME Starting restore at 05-MAR-09 allocated channel: ORA_AUX_DISK_1 channel ORA_AUX_DISK_1: sid=36 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 00003 to /u01/app/oracle/databases/stdby/data/sysaux01.dbf channel ORA_AUX_DISK_1: reading from backup piece /u01/app/oracle/databases/stage/0uk95ldn_1_1 channel ORA_AUX_DISK_1: restored backup piece 1 piece handle=/u01/app/oracle/databases/stage/0uk95ldn_1_1 tag=TAG20090305T143325 channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:07 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/app/oracle/databases/stdby/data/system01.dbf restoring datafile 00002 to /u01/app/oracle/databases/stdby/data/undotbs01.dbf channel ORA_AUX_DISK_1: reading from backup piece /u01/app/oracle/databases/stage/0tk95ldn_1_1 channel ORA_AUX_DISK_1: restored backup piece 1 piece handle=/u01/app/oracle/databases/stage/0tk95ldn_1_1 tag=TAG20090305T143325 channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:15 Finished restore at 05-MAR-09 contents of Memory Script: { switch clone datafile all; } executing Memory Script datafile 1 switched to datafile copy input datafile copy recid=4 stamp=680711065 filename=/u01/app/oracle/databases/stdby/data/system01.dbf datafile 2 switched to datafile copy input datafile copy recid=5 stamp=680711065 filename=/u01/app/oracle/databases/stdby/data/undotbs01.dbf datafile 3 switched to datafile copy input datafile copy recid=6 stamp=680711065 filename=/u01/app/oracle/databases/stdby/data/sysaux01.dbf contents of Memory Script: { set until scn 503194; recover standby clone database delete archivelog ; } executing Memory Script executing command: SET until clause Starting recover at 05-MAR-09 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=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/app/oracle/databases/stage/12k95lhl_1_1 channel ORA_AUX_DISK_1: restored backup piece 1 piece handle=/u01/app/oracle/databases/stage/12k95lhl_1_1 tag=TAG20090305T143531 channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:03 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=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: reading from backup piece /u01/app/oracle/databases/stage/11k95lhl_1_1 channel ORA_AUX_DISK_1: restored backup piece 1 piece handle=/u01/app/oracle/databases/stage/11k95lhl_1_1 tag=TAG20090305T143531 channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:15 archive log filename=/u01/app/oracle/databases/stdby/redo/1_8_679684398.dbf thread=1 sequence=8 channel clone_default: deleting archive log(s) archive log filename=/u01/app/oracle/databases/stdby/redo/1_8_679684398.dbf recid=8 stamp=680711072 archive log filename=/u01/app/oracle/databases/stdby/redo/1_9_679684398.dbf thread=1 sequence=9 channel clone_default: deleting archive log(s) archive log filename=/u01/app/oracle/databases/stdby/redo/1_9_679684398.dbf recid=10 stamp=680711078 archive log filename=/u01/app/oracle/databases/stdby/redo/1_10_679684398.dbf thread=1 sequence=10 channel clone_default: deleting archive log(s) archive log filename=/u01/app/oracle/databases/stdby/redo/1_10_679684398.dbf recid=9 stamp=680711078 archive log filename=/u01/app/oracle/databases/stdby/redo/1_11_679684398.dbf thread=1 sequence=11 channel clone_default: deleting archive log(s) archive log filename=/u01/app/oracle/databases/stdby/redo/1_11_679684398.dbf recid=6 stamp=680711066 archive log filename=/u01/app/oracle/databases/stdby/redo/1_12_679684398.dbf thread=1 sequence=12 channel clone_default: deleting archive log(s) archive log filename=/u01/app/oracle/databases/stdby/redo/1_12_679684398.dbf recid=7 stamp=680711067 archive log filename=/u01/app/oracle/databases/stdby/redo/1_13_679684398.dbf thread=1 sequence=13 channel clone_default: deleting archive log(s) archive log filename=/u01/app/oracle/databases/stdby/redo/1_13_679684398.dbf recid=4 stamp=680711066 archive log filename=/u01/app/oracle/databases/stdby/redo/1_14_679684398.dbf thread=1 sequence=14 channel clone_default: deleting archive log(s) archive log filename=/u01/app/oracle/databases/stdby/redo/1_14_679684398.dbf recid=1 stamp=680711066 archive log filename=/u01/app/oracle/databases/stdby/redo/1_15_679684398.dbf thread=1 sequence=15 channel clone_default: deleting archive log(s) archive log filename=/u01/app/oracle/databases/stdby/redo/1_15_679684398.dbf recid=3 stamp=680711066 archive log filename=/u01/app/oracle/databases/stdby/redo/1_16_679684398.dbf thread=1 sequence=16 channel clone_default: deleting archive log(s) archive log filename=/u01/app/oracle/databases/stdby/redo/1_16_679684398.dbf recid=2 stamp=680711066 archive log filename=/u01/app/oracle/databases/stdby/redo/1_17_679684398.dbf thread=1 sequence=17 channel clone_default: deleting archive log(s) archive log filename=/u01/app/oracle/databases/stdby/redo/1_17_679684398.dbf recid=5 stamp=680711066 media recovery complete, elapsed time: 00:00:01 Finished recover at 05-MAR-09 Finished Duplicate Db at 05-MAR-09 RMAN>exit NOTE: We can use without dorecover clause also,
Example,
RMAN>duplicate target database for standby;
OR, this is for when standby database have same directory structure
RMAN>duplicate target database for standby nofilenamecheck dorecover;
STEP : 12 Start the MRP(managed recovery process) on standby,
SQL> select name,db_unique_name,database_role, from v$database; NAME DB_UNIQUE_NAME DATABASE_ROLE --------- ---------------- -------------- PRIM STDBY PHYSICAL STANDBY SQL> alter database recover managed standby database disconnect; Database altered.Enable the log_archive_dest_2 on primary, which is to send the logs to standby server.
SQL>alter system set log_archive_dest_state_2=enable; System altered. STEP :14
Check the standby whether it is in SYNC with primary,
A. Check the v$archived view on standby,
SQL> SELECT SEQUENCE#, FIRST_TIME, NEXT_TIME FROM V$ARCHIVED_LOG ORDER BY SEQUENCE#; SEQUENCE# FIRST_TIM NEXT_TIME ---------- --------- --------- 29 06-MAR-09 06-MAR-09 30 06-MAR-09 06-MAR-09 31 06-MAR-09 06-MAR-09 32 06-MAR-09 06-MAR-09 33 06-MAR-09 06-MAR-09 34 06-MAR-09 06-MAR-09 35 06-MAR-09 06-MAR-09 36 06-MAR-09 06-MAR-09 37 06-MAR-09 06-MAR-09 38 06-MAR-09 06-MAR-09 39 06-MAR-09 06-MAR-09 B. Do the log switch on primary,
SQL> ALTER SYSTEM SWITCH LOGFILE; System altered. SQL> SELECT SEQUENCE#, FIRST_TIME, NEXT_TIME FROM V$ARCHIVED_LOG ORDER BY SEQUENCE#; SEQUENCE# FIRST_TIM NEXT_TIME ---------- --------- --------- 29 06-MAR-09 06-MAR-09 30 06-MAR-09 06-MAR-09 31 06-MAR-09 06-MAR-09 32 06-MAR-09 06-MAR-09 33 06-MAR-09 06-MAR-09 34 06-MAR-09 06-MAR-09 35 06-MAR-09 06-MAR-09 36 06-MAR-09 06-MAR-09 37 06-MAR-09 06-MAR-09 38 06-MAR-09 06-MAR-09 39 06-MAR-09 06-MAR-09 SEQUENCE# FIRST_TIM NEXT_TIME ---------- --------- --------- 40 06-MAR-09 07-MAR-09 SQL> select sequence#,applied from v$archived_log order by sequence#; SEQUENCE# APP ---------- --- 29 YES 30 YES 31 YES 32 YES 33 YES 34 YES 35 YES 36 YES 37 YES 38 YES 39 YES SEQUENCE# APP ---------- --- 40 YES
No comments:
Post a Comment