練習使用list failure,advise failure; repair failure;
1 首先備份測試資料檔案
RMAN> backup datafile 5;
Starting backup at 06-NOV-14
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=43 device type=DISK
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00005 name=/data/oracle/oradata/aaron/example01.dbf
channel ORA_DISK_1: starting piece 1 at 06-NOV-14
channel ORA_DISK_1: finished piece 1 at 06-NOV-14
piece handle=/data/oracle/flash_recovery_area/AARON/backupset/2014_11_06/o1_mf_nnndf_TAG20141106T001531_b5pck41v_.bkp tag=TAG20141106T001531 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:16
Finished backup at 06-NOV-14
Starting Control File and SPFILE Autobackup at 06-NOV-14
piece handle=/data/oracle/flash_recovery_area/AARON/autobackup/2014_11_06/o1_mf_s_862877747_b5pcknj2_.bkp comment=NONE
Finished Control File and SPFILE Autobackup at 06-NOV-14
2 刪除測試資料檔案
SYS@aaron> !rm /data/oracle/oradata/aaron/example01.dbf
3 重新啟動資料庫檢視錯誤資訊
SYS@aaron> shutdown abort
ORACLE instance shut down.
SYS@aaron> startup
ORACLE instance started.
Total System Global Area 422670336 bytes
Fixed Size 1336960 bytes
Variable Size 314575232 bytes
Database Buffers 100663296 bytes
Redo Buffers 6094848 bytes
Database mounted.
ORA-01157: cannot identify/lock data file 5 - see DBWR trace file
ORA-01110: data file 5: '/data/oracle/oradata/aaron/example01.dbf'
4 重新連線RMAN 並執行 List Failure
RMAN> list failure;
using target database control file instead of recovery catalog
List of Database Failures
=========================
Failure ID Priority Status Time Detected Summary
---------- -------- --------- ------------- -------
522 HIGH OPEN 06-NOV-14 One or more non-system datafiles are missing
using target database control file instead of recovery catalog
List of Database Failures
=========================
Failure ID Priority Status Time Detected Summary
---------- -------- --------- ------------- -------
522 HIGH OPEN 06-NOV-14 One or more non-system datafiles are missing
5 檢視建議指令碼
RMAN> advise failure;
List of Database Failures
=========================
Failure ID Priority Status Time Detected Summary
---------- -------- --------- ------------- -------
522 HIGH OPEN 06-NOV-14 One or more non-system datafiles are missing
analyzing automatic repair options; this may take some time
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=17 device type=DISK
analyzing automatic repair options complete
Mandatory Manual Actions
========================
no manual actions available
Optional Manual Actions
=======================
1. If file /data/oracle/oradata/aaron/example01.dbf was unintentionally renamed or moved, restore it
Automated Repair Options
========================
Option Repair Description
------ ------------------
1 Restore and recover datafile 5
Strategy: The repair includes complete media recovery with no data loss
Repair script: /data/oracle/diag/rdbms/aaron/aaron/hm/reco_780979516.hm
[oracle@localhost alert]$ more /data/oracle/diag/rdbms/aaron/aaron/hm/reco_780979516.hm
# restore and recover datafile
restore datafile 5;
recover datafile 5;
6 執行恢復操作
RMAN> restore datafile 5;
Starting restore at 06-NOV-14
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=18 device type=DISK
channel ORA_DISK_1: starting datafile backup set restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_DISK_1: restoring datafile 00005 to /data/oracle/oradata/aaron/example01.dbf
channel ORA_DISK_1: reading from backup piece /data/oracle/flash_recovery_area/AARON/backupset/2014_11_06/o1_mf_nnndf_TAG20141106T001531_b5pck41v_.bkp
channel ORA_DISK_1: piece handle=/data/oracle/flash_recovery_area/AARON/backupset/2014_11_06/o1_mf_nnndf_TAG20141106T001531_b5pck41v_.bkp tag=TAG20141106T001531
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:07
Finished restore at 06-NOV-14
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/28719055/viewspace-1324389/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- design for failureAI
- Error: Debug Failure at typeToStringErrorAI
- Preferred Read Failure GroupsAI
- DRIVER_POWER_STATE_FAILUREAI
- Vagrant:NS_ERROR_FAILUREErrorAI
- [virtualbox] temporary failure in name resolutionAI
- mysql 報錯 Communications link failureMySqlAI
- 轉:Assertion failure in -[UITableView _configureCellForDisplay:forIndexPath:]AIUIViewIndex
- Temporary failure resolving ‘archive.ubuntu.com‘AIHiveUbuntu
- Agent admitted failure to sign using the key解決MITAI
- Resolving archive.cloudera.com... failed: Temporary failure in nameHiveCloudAI
- Http failure response 0 Unknown error 錯誤分析HTTPAIError
- [20180613]子游標不共享BIND_EQUIV_FAILUREUIAI
- Maven:Non-resolvable parent POM: Failure to find錯誤MavenAI
- Linux 出現 su: Authentication failure 解決辦法LinuxAI
- Fault-Tolerance, Fast and Slow: Exploiting Failure Asynchrony in Distributed SystemsASTAI
- RPC: Port mapper failure - Unable to receive: errno 113 (No route to host)RPCAPPAI
- Compilation failure 不再支援源選項 5。請使用 6 或更高版本。AI
- Maven - Non-resolvable parent POM: Failure to find xx:xx:pomMavenAI
- [20200129]子游標不共享BIND_EQUIV_FAILURE.txtUIAI
- 【MySQL】ERROR 1878 (HY000): Temporary file write failure.MySqlErrorAI
- RMAN-03009: failure of backup command on ORA_DISK_1 channelAI
- 頻繁GC (Allocation Failure)及young gc時間過長分析GCAI
- Android Studio Run專案出現Failure [INSTALL_FAILED_TEST_ONLY]AndroidAI
- 應用端連線MySQL資料庫報Communications link failureMySql資料庫AI
- [InnoDB] Assertion failure: ut0ut.cc:553 thread 140235111884544【筆記】AIthread筆記
- Authentication failure 以及xxx is not in the sudoers file 問題的解決辦法AI
- python3.10呼叫郵件SMTP報錯: ssl.SSLError: [SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:997)解決PythonErrorAI
- tar解壓報錯——Not found in archive tar: Exiting with failure status due to previous errorsHiveAIError
- win10頻繁藍屏kernel security check failure修復方法Win10AI
- GC(Allocation Failure)引發的一些JVM知識點梳理GCAIJVM
- [20221101]如何減少BIND_EQUIV_FAILURE引起的子游標.txtUIAI
- Anbox安裝apk失敗(提示Failure res=-113等)的解決方法APKAI
- ORACLE opatch 打補丁fuser command output for /u01/.../crsctl.bin is FailureOracleAI
- win10頻繁藍色畫面kernel security check failure修復方法Win10AI
- win10電腦啟動出現disk boot failure怎麼解決Win10bootAI
- idea執行java專案main方法報build failure錯誤的解決方法IdeaJavaAIUI
- win10電腦開啟QQ提示Initialization failure:0x0000000C如何解決Win10AI
- win10系統出現藍屏並提示DRIVER POWER STATE FAILURE錯誤如何解決Win10AI