[20160202]crosscheck archivelog all.txt
[20160202]crosscheck archivelog all.txt
--當使用crosscheck archivelog all檢查時注意一個細節,透過例子來說明:
1.環境:
SCOTT@book> @ &r/ver1
PORT_STRING VERSION BANNER
------------------------------ -------------- --------------------------------------------------------------------------------
x86_64/Linux 2.4.xx 11.2.0.4.0 Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
RMAN> list archivelog all;
List of Archived Log Copies for database with db_unique_name BOOK
=====================================================================
Key Thrd Seq S Low Time
------- ---- ------- - -------------------
294 1 309 A 2016-02-01 05:00:22
Name: /u01/app/oracle/archivelog/book/1_309_896605872.dbf
295 1 310 A 2016-02-01 22:00:15
Name: /u01/app/oracle/archivelog/book/1_310_896605872.dbf
$ cd /u01/app/oracle/archivelog/book/
$ ll
total 89164
-rw-r----- 1 oracle oinstall 44703744 2016-02-01 22:00:16 1_309_896605872.dbf
-rw-r----- 1 oracle oinstall 46494208 2016-02-01 22:13:55 1_310_896605872.dbf
--僅僅存在2個備份,改名1個archive log:
$ mv 1_309_896605872.dbf 1_309_896605872.dbf_xxx
2.測試:
--備份archive log:
RMAN> backup archivelog all format '/home/oracle/backup/archive_%u' ;
Starting backup at 2016-02-02 15:37:53
current log archived
using channel ORA_DISK_1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of backup command at 02/02/2016 15:37:54
RMAN-06059: expected archived log not found, loss of archived log compromises recoverability
ORA-19625: error identifying file /u01/app/oracle/archivelog/book/1_309_896605872.dbf
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
RMAN> crosscheck archivelog all ;
released channel: ORA_DISK_1
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=123 device type=DISK
validation failed for archived log
archived log file name=/u01/app/oracle/archivelog/book/1_309_896605872.dbf RECID=294 STAMP=902700016
validation succeeded for archived log
archived log file name=/u01/app/oracle/archivelog/book/1_310_896605872.dbf RECID=295 STAMP=902700835
validation succeeded for archived log
archived log file name=/u01/app/oracle/archivelog/book/1_311_896605872.dbf RECID=296 STAMP=902763474
Crosschecked 3 objects
--可以發現校驗/u01/app/oracle/archivelog/book/1_309_896605872.dbf RECID=294失敗。而這個時候接著執行:
RMAN> backup archivelog all format '/home/oracle/backup/archive_%u' ;
Starting backup at 2016-02-02 15:39:48
current log archived
using channel ORA_DISK_1
channel ORA_DISK_1: starting archived log backup set
channel ORA_DISK_1: specifying archived log(s) in backup set
input archived log thread=1 sequence=310 RECID=295 STAMP=902700835
input archived log thread=1 sequence=311 RECID=296 STAMP=902763474
input archived log thread=1 sequence=312 RECID=297 STAMP=902763588
channel ORA_DISK_1: starting piece 1 at 2016-02-02 15:39:49
channel ORA_DISK_1: finished piece 1 at 2016-02-02 15:39:50
piece handle=/home/oracle/backup/archive_25qsu525 tag=TAG20160202T153948 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 2016-02-02 15:39:50
--可以發現這個時候備份成功,但是漏掉了1_309_896605872.dbf.也就是講當做了crosscheck archivelog all 後,已經表示那些檔案不存在,這樣才解決
--問題前已經漏掉了一些備份。
3.改名回來:
$ mv 1_309_896605872.dbf_xxx 1_309_896605872.dbf
RMAN> list archivelog all;
List of Archived Log Copies for database with db_unique_name BOOK
=====================================================================
Key Thrd Seq S Low Time
------- ---- ------- - -------------------
294 1 309 X 2016-02-01 05:00:22
Name: /u01/app/oracle/archivelog/book/1_309_896605872.dbf
295 1 310 A 2016-02-01 22:00:15
Name: /u01/app/oracle/archivelog/book/1_310_896605872.dbf
296 1 311 A 2016-02-01 22:13:55
Name: /u01/app/oracle/archivelog/book/1_311_896605872.dbf
297 1 312 A 2016-02-02 15:37:53
Name: /u01/app/oracle/archivelog/book/1_312_896605872.dbf
--注意: S=X.
RMAN> crosscheck archivelog all ;
released channel: ORA_DISK_1
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=123 device type=DISK
validation succeeded for archived log
archived log file name=/u01/app/oracle/archivelog/book/1_309_896605872.dbf RECID=294 STAMP=902700016
validation succeeded for archived log
archived log file name=/u01/app/oracle/archivelog/book/1_310_896605872.dbf RECID=295 STAMP=902700835
validation succeeded for archived log
archived log file name=/u01/app/oracle/archivelog/book/1_311_896605872.dbf RECID=296 STAMP=902763474
validation succeeded for archived log
archived log file name=/u01/app/oracle/archivelog/book/1_312_896605872.dbf RECID=297 STAMP=902763588
Crosschecked 4 objects
RMAN> list archivelog all;
List of Archived Log Copies for database with db_unique_name BOOK
=====================================================================
Key Thrd Seq S Low Time
------- ---- ------- - -------------------
294 1 309 A 2016-02-01 05:00:22
Name: /u01/app/oracle/archivelog/book/1_309_896605872.dbf
295 1 310 A 2016-02-01 22:00:15
Name: /u01/app/oracle/archivelog/book/1_310_896605872.dbf
296 1 311 A 2016-02-01 22:13:55
Name: /u01/app/oracle/archivelog/book/1_311_896605872.dbf
297 1 312 A 2016-02-02 15:37:53
Name: /u01/app/oracle/archivelog/book/1_312_896605872.dbf
--這樣才恢復正常。
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/267265/viewspace-1985656/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- crosscheck archivelog all;crosscheck backup of區別ROSHive
- [zt] crosscheck archivelog allROSHive
- crosscheck archivelog all error ORA-19587ROSHiveError
- 備份歸檔日誌報錯ORA-19625: crosscheck archivelog allROSHive
- rman crosscheck作用ROS
- CROSSCHECK命令使用ROS
- 正確使用rman crosscheckROS
- Restore ArchivelogRESTHive
- crosscheck backup ORA-19554ROS
- rman report list crosscheck deleteROSdelete
- RMAN CROSSCHECK命令小bug(轉)ROS
- 轉:正確使用rman crosscheckROS
- rman 的crosscheck命令問題!ROS
- Delete Dataguard ArchivelogdeleteHive
- 配置ARCHIVELOG 模式Hive模式
- Oracle RMAN的show,list,crosscheck,deleteOracleROSdelete
- Rman Crosscheck刪除失效歸檔ROS
- RMAN - backup archivelog all 與 backup database plus archivelog 區別HiveDatabase
- rman restore archivelog logRESTHive
- 轉至archivelog模式Hive模式
- RMAN的crosscheck和obsolete的用法ROS
- 轉載-RMAN下CROSSCHECK命令詳解ROS
- 使用RMAN CROSSCHECK 更新檔案狀態ROS
- Oracle RMAN 的 show,list,crosscheck,delete命令整理OracleROSdelete
- Oracle OCP(58):ARCHIVELOG 管理OracleHive
- Archivelog & Noarchivelog mode in RMANHive
- RMAN Crosscheck 和 Delete 命令的 2 個例項ROSdelete
- RMAN Crosscheck 和 Delete 命令的2個例項ROSdelete
- 20160202.CCPP體系詳解(0012天)
- restore archivelog 的各種用法RESTHive
- restore archivelog 的各種用法RESTHive
- Rman Crosscheck刪除失效歸檔-備份恢復ROS
- Oracle OCP IZ0-053 Q682(Rman Crosscheck)OracleROS
- 都是crosscheck惹的禍,備份歸檔失敗ROS
- BACKUP ARCHIVELOG with DELETE INPUT or DELET all..Hivedelete
- rman中關於archivelog的操作Hive
- Catalog archivelog from file system to Asmdg;HiveASM
- 理解RMAN backup database plus archivelog命令DatabaseHive