SQL*Plus: Release 11.2.0.3.0 Production on Thu Nov 8 14:26:42 2012
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> SELECT sequence# "MAX SEQUENCE#"
2 FROM v$archived_log
3 WHERE first_time = (SELECT MAX (first_time) FROM v$archived_log)
4 AND ROWNUM = 1;
MAX SEQUENCE#
-------------
135
SQL> SELECT NAME, creator, sequence#, applied
2 FROM v$archived_log
3 WHERE applied = 'NO';
NAME
--------------------------------------------------------------------------------
CREATOR SEQUENCE# APPLIED
-------------- ---------- ------------------
/arch/archivelog/1_131_797418914.dbf
ARCH 131 NO
/arch/archivelog/1_132_797418914.dbf
ARCH 132 NO
/arch/archivelog/1_133_797418914.dbf
ARCH 133 NO
NAME
--------------------------------------------------------------------------------
CREATOR SEQUENCE# APPLIED
-------------- ---------- ------------------
/arch/archivelog/1_134_797418914.dbf
ARCH 134 NO
/arch/archivelog/1_135_797418914.dbf
ARCH 135 NO
SQL> select recovery_mode from v$archive_dest_status where dest_id=1;
RECOVERY_MODE
----------------------------------------------
IDLE
SQL> recover managed standby database using current logfile disconnect from session;
Media recovery complete.
SQL> select recovery_mode from v$archive_dest_status where dest_id=1;
RECOVERY_MODE
----------------------------------------------
IDLE
SQL> recover standby database;
ORA-00283: recovery session canceled due to errors
ORA-01111: name for data file 19 is unknown - rename to correct file
ORA-01110: data file 19: '/opt/app/oracle/product/11.2.0/db_1/dbs/UNNAMED00019'
ORA-01157: cannot identify/lock data file 19 - see DBWR trace file
ORA-01111: name for data file 19 is unknown - rename to correct file
ORA-01110: data file 19: '/opt/app/oracle/product/11.2.0/db_1/dbs/UNNAMED00019'
Thu Nov 08 14:32:58 2012
Managed Standby Recovery starting Real Time Apply
MRP0: Background Media Recovery terminated with error 1111
Errors in file /opt/app/oracle/diag/rdbms/dissfcdbbak/dissfcdbbak/trace/dissfcdbbak_pr00_18031.trc:
ORA-01111: name for data file 18 is unknown - rename to correct file
ORA-01110: data file 18: '/opt/app/oracle/product/11.2.0/db_1/dbs/UNNAMED00018'
ORA-01157: cannot identify/lock data file 18 - see DBWR trace file
ORA-01111: name for data file 18 is unknown - rename to correct file
ORA-01110: data file 18: '/opt/app/oracle/product/11.2.0/db_1/dbs/UNNAMED00018'
Managed Standby Recovery not using Real Time Apply
Slave exiting with ORA-1111 exception
Errors in file /opt/app/oracle/diag/rdbms/dissfcdbbak/dissfcdbbak/trace/dissfcdbbak_pr00_18031.trc:
SQL> show parameter standby
NAME TYPE
------------------------------------ ----------------------
VALUE
------------------------------
standby_archive_dest string
?/dbs/arch
standby_file_management string
MANUAL
SQL> alter database create datafile '/opt/app/oracle/product/11.2.0/db_1/dbs/UNNAMED00019' as '/data/oradata/PARTITION_DATA03.dbf';
Database altered.
SQL> recover standby database;
ORA-00283: recovery session canceled due to errors
ORA-01111: name for data file 20 is unknown - rename to correct file
ORA-01110: data file 20: '/opt/app/oracle/product/11.2.0/db_1/dbs/UNNAMED00020'
ORA-01157: cannot identify/lock data file 20 - see DBWR trace file
ORA-01111: name for data file 20 is unknown - rename to correct file
ORA-01110: data file 20: '/opt/app/oracle/product/11.2.0/db_1/dbs/UNNAMED00020'
SQL> alter database create datafile '/opt/app/oracle/product/11.2.0/db_1/dbs/UNNAMED00020' as '/index/oradata/PARTITION_INDEX01.dbf';
Database altered.
SQL> recover standby database;
ORA-00283: recovery session canceled due to errors
ORA-01111: name for data file 21 is unknown - rename to correct file
ORA-01110: data file 21: '/opt/app/oracle/product/11.2.0/db_1/dbs/UNNAMED00021'
ORA-01157: cannot identify/lock data file 21 - see DBWR trace file
ORA-01111: name for data file 21 is unknown - rename to correct file
ORA-01110: data file 21: '/opt/app/oracle/product/11.2.0/db_1/dbs/UNNAMED00021'
SQL> alter database create datafile '/opt/app/oracle/product/11.2.0/db_1/dbs/UNNAMED00021' as '/index/oradata/PARTITION_INDEX03.dbf';
Database altered.
SQL> recover standby database;
ORA-00279: change 11976849796373 generated at 11/07/2012 16:17:39 needed for
thread 1
ORA-00289: suggestion : /arch/archivelog/1_131_797418914.dbf
ORA-00280: change 11976849796373 for thread 1 is in sequence #131
Specify log: {=suggested | filename | AUTO | CANCEL}
auto
ORA-00279: change 11977191321050 generated at 11/08/2012 09:08:11 needed for
thread 1
ORA-00289: suggestion : /arch/archivelog/1_132_797418914.dbf
ORA-00280: change 11977191321050 for thread 1 is in sequence #132
ORA-00278: log file '/arch/archivelog/1_131_797418914.dbf' no longer needed for
this recovery
ORA-00279: change 11977191420229 generated at 11/08/2012 09:28:21 needed for
thread 1
ORA-00289: suggestion : /arch/archivelog/1_133_797418914.dbf
ORA-00280: change 11977191420229 for thread 1 is in sequence #133
ORA-00278: log file '/arch/archivelog/1_132_797418914.dbf' no longer needed for
this recovery
ORA-00279: change 11977418154395 generated at 11/08/2012 09:31:18 needed for
thread 1
ORA-00289: suggestion : /arch/archivelog/1_134_797418914.dbf
ORA-00280: change 11977418154395 for thread 1 is in sequence #134
ORA-00278: log file '/arch/archivelog/1_133_797418914.dbf' no longer needed for
this recovery
ORA-00279: change 11977428276255 generated at 11/08/2012 14:19:50 needed for
thread 1
ORA-00289: suggestion : /arch/archivelog/1_135_797418914.dbf
ORA-00280: change 11977428276255 for thread 1 is in sequence #135
ORA-00278: log file '/arch/archivelog/1_134_797418914.dbf' no longer needed for
this recovery
ORA-00279: change 11977428276896 generated at 11/08/2012 14:25:53 needed for
thread 1
ORA-00289: suggestion : /arch/archivelog/1_136_797418914.dbf
ORA-00280: change 11977428276896 for thread 1 is in sequence #136
ORA-00278: log file '/arch/archivelog/1_135_797418914.dbf' no longer needed for
this recovery
ORA-16145: archival for thread# 1 sequence# 136 in progress
SQL> recover managed standby database using current logfile disconnect from session;
Media recovery complete.
SQL> select recovery_mode from v$archive_dest_status where dest_id=1;
RECOVERY_MODE
----------------------------------------------
MANAGED REAL TIME APPLY
SQL> SELECT sequence# "MAX SEQUENCE#"
2 FROM v$archived_log
3 WHERE first_time = (SELECT MAX (first_time) FROM v$archived_log)
4 AND ROWNUM = 1;
MAX SEQUENCE#
-------------
136
SQL> SELECT process,status,sequence#, block#, blocks
2 FROM v$managed_standby;
PROCESS STATUS SEQUENCE# BLOCK# BLOCKS
------------------ ------------------------ ---------- ---------- ----------
ARCH CONNECTED 0 0 0
ARCH CONNECTED 0 0 0
ARCH CLOSING 136 14336 657
ARCH CLOSING 135 1 1494
RFS IDLE 0 0 0
RFS IDLE 0 0 0
RFS IDLE 137 40 1
MRP0 APPLYING_LOG 137 40 1024000
SQL> show parameter standby
NAME TYPE
------------------------------------ ----------------------
VALUE
------------------------------
standby_archive_dest string
?/dbs/arch
standby_file_management string
MANUAL
SQL> alter system set standby_file_management=auto;
System altered.
SQL> show parameter standby
NAME TYPE
------------------------------------ ----------------------
VALUE
------------------------------
standby_archive_dest string
?/dbs/arch
standby_file_management string
AUTO
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/25574072/viewspace-772211/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/25574072/viewspace-772211/