| [oracle@rac1 ~]$ sqlplus sys/123456@rac as sysdba SQL*Plus: Release 10.2.0.5.0 - Production on Thu Jan 12 15:21:46 2012 Copyright (c) 1982, 2010, Oracle. All Rights Reserved. Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production With the Partitioning, Real Application Clusters, OLAP, Data Mining and Real Application Testing options SQL> create tablespace maa datafile size 100M; Tablespace created. SQL> create table hr.maa_test tablespace maa as select * from dba_source; Table created. SQL> alter system archive log current; System altered. SQL> alter system set log_archive_dest_state_2=enable; System altered. SQL> alter system archive log current; System altered. SQL> select first_time,next_time,sequence#,applied,thread# from v$archived_log where sequence# >10 order by 5,3; FIRST_TIME NEXT_TIME SEQUENCE# APP THREAD# ------------------- ------------------- ---------- --- ---------- 2012-01-12:14:07:46 2012-01-12:14:07:46 11 YES 1 2012-01-12:14:17:59 2012-01-12:14:18:04 12 YES 1 2012-01-12:14:18:04 2012-01-12:15:23:28 13 YES 1 2012-01-12:15:23:28 2012-01-12:15:24:14 14 YES 1 2012-01-12:15:24:14 2012-01-12:15:25:30 15 YES 1 2012-01-12:14:25:54 2012-01-12:15:24:13 11 YES 2 2012-01-12:15:24:13 2012-01-12:15:25:36 12 YES 2 节点1: SQL> archive log list; Database log mode Archive Mode Automatic archival Enabled Archive destination USE_DB_RECOVERY_FILE_DEST Oldest online log sequence 15 Next log sequence to archive 16 Current log sequence 16 节点2: SQL> conn /as sysdba Connected. SQL> archive log list; Database log mode Archive Mode Automatic archival Enabled Archive destination USE_DB_RECOVERY_FILE_DEST Oldest online log sequence 12 Next log sequence to archive 13 Current log sequence 13. SQL> alter database recover managed standby database cancel; Database altered. SQL> alter database open read only; Database altered. SQL> select tablespace_name from dba_tablespaces; TABLESPACE_NAME ------------------------------ SYSTEM UNDOTBS1 SYSAUX TEMP USERS UNDOTBS2 EXAMPLE MAA SQL> select count(*) from hr.maa_test; COUNT(*) ---------- 295528 SQL> alter database recover managed standby database using current logfile disconnect from session; Database altered. SQL> select * from v$archive_gap; no rows selected SQL> select process, client_process, sequence#, status from v$managed_standby; PROCESS CLIENT_P SEQUENCE# STATUS --------- -------- ---------- ------------ ARCH ARCH 17 CLOSING ARCH ARCH 14 CLOSING ARCH ARCH 0 CONNECTED ARCH ARCH 0 CONNECTED ARCH ARCH 0 CONNECTED RFS UNKNOWN 0 IDLE RFS UNKNOWN 0 IDLE RFS UNKNOWN 0 IDLE RFS UNKNOWN 0 IDLE RFS UNKNOWN 0 IDLE RFS UNKNOWN 0 IDLE PROCESS CLIENT_P SEQUENCE# STATUS --------- -------- ---------- ------------ RFS UNKNOWN 0 IDLE RFS UNKNOWN 0 IDLE MRP0 N/A 15 APPLYING_LOG RFS LGWR 18 IDLE RFS LGWR 15 IDLE SQL> select thread#, max (sequence#) from v$log_history group by thread#; THREAD# MAX(SEQUENCE#) ---------- -------------- 1 17 2 14 备库上相关的文件如下: [oracle@server49 ~]$ ls /u01/app/oracle/flash_recovery_area/ORCL/standbylog/ 1_10_772367339.dbf 1_14_772367339.dbf 2_10_772367339.dbf 2_14_772367339.dbf 1_11_772367339.dbf 1_15_772367339.dbf 2_11_772367339.dbf 2_8_772367339.dbf 1_12_772367339.dbf 1_16_772367339.dbf 2_12_772367339.dbf 2_9_772367339.dbf 1_13_772367339.dbf 1_17_772367339.dbf 2_13_772367339.dbf [oracle@server49 ~]$ ls /u01/app/oracle/flash_recovery_area/ORCL/archivelog/2012_01_12/ o1_mf_1_3_7jxs4g18_.arc o1_mf_1_8_7jxs4cxn_.arc o1_mf_2_4_7jxs4k77_.arc o1_mf_1_4_7jxs4d5z_.arc o1_mf_1_9_7jxs4of6_.arc o1_mf_2_5_7jxs4k43_.arc o1_mf_1_5_7jxs4c3h_.arc o1_mf_2_1_7jxs4bpl_.arc o1_mf_2_6_7jxs4l0r_.arc o1_mf_1_6_7jxs4cnh_.arc o1_mf_2_2_7jxs4km1_.arc o1_mf_2_7_7jxs4nbr_.arc o1_mf_1_7_7jxs4csf_.arc o1_mf_2_3_7jxs4kds_.arc [oracle@server49 ~]$ ls /u01/app/oracle/oradata/ORCL/controlfile/ control01.ctl [oracle@server49 ~]$ ls /u01/app/oracle/oradata/ORCL/datafile/ example.289.772367357 sysaux.265.772367249 undotbs1.258.772367251 users.309.772367251 o1_mf_maa_7jxt3t7d_.dbf system.264.772367249 undotbs2.259.772367523 [oracle@server49 ~]$ ls /u01/app/oracle/oradata/ORCL/onlinelog/ group_11.303.772371907 group_14.300.772371979 group_3.305.772367577 group_12.302.772371907 group_15.299.772371979 group_4.304.772367577 group_1.307.772367339 group_16.298.772371981 group_13.301.772371915 group_2.306.772367347 [oracle@server49 ~]$ ls /u01/app/oracle/oradata/ORCL/tempfile/ temp.285.772367353 |