RMAN備份時出現RMAN-06056: could not access datafile 6 錯誤,解決方法!!
用rman備份資料庫時出現以下錯誤:
[oracle@mzl orcl]$ rman target/
Recovery Manager: Release 10.2.0.1.0 - Production on Wed Feb 13 15:36:06 2008
Copyright (c) 1982, 2005, Oracle. All rights reserved.
connected to target database: ORCL (DBID=1172558471)
RMAN> backup database;
Starting backup at 13-FEB-08
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=137 devtype=DISK
could not read file header for datafile 6 error reason 1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of backup command at 02/13/2008 15:36:14
RMAN-06056: could not access datafile 6
也就是說不能訪問資料6的檔案。
1 檢視資料6檔案是什麼
SQL> select file#,name from v$datafile;
FILE#
----------
NAME
--------------------------------------------------------------------------------
1
/u01/app/oracle/oradata/orcl/system01.dbf
2
/u01/app/oracle/oradata/orcl/undotbs01.dbf
3
/u01/app/oracle/oradata/orcl/sysaux01.dbf
FILE#
----------
NAME
--------------------------------------------------------------------------------
4
/u01/app/oracle/oradata/orcl/users01.dbf
5
/u01/app/oracle/oradata/orcl/example01.dbf
6
/u01/app/oracle/product/10.2.0/db_1/dbs/MISSING00006
6 rows selected.
看來是MISSING00006檔案,不是系統,也不是使用者的資料。
2 看MISSING00006基於那個表空間,然後刪除該表空間
SQL> select TS#,name from v$tablespace;
TS# NAME
---------- ------------------------------
0 SYSTEM
1 UNDOTBS1
2 SYSAUX
4 USERS
6 EXAMPLE
3 TEMP
7 TS_RMAN
7 rows selected.
SQL> drop tablespace TS_RMAN;
Tablespace dropped.
3 進行rman備份
RMAN> backup database;
Starting backup at 13-FEB-08
using channel ORA_DISK_1
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
input datafile fno=00001 name=/u01/app/oracle/oradata/orcl/system01.dbf
input datafile fno=00003 name=/u01/app/oracle/oradata/orcl/sysaux01.dbf
input datafile fno=00005 name=/u01/app/oracle/oradata/orcl/example01.dbf
input datafile fno=00002 name=/u01/app/oracle/oradata/orcl/undotbs01.dbf
input datafile fno=00004 name=/u01/app/oracle/oradata/orcl/users01.dbf
channel ORA_DISK_1: starting piece 1 at 13-FEB-08
channel ORA_DISK_1: finished piece 1 at 13-FEB-08
piece handle=/u01/app/oracle/flash_recovery_area/ORCL/backupset/2008_02_13/o1_mf_nnndf_TAG20080213T154843_3v586w6h_.bkp tag=TAG20080213T154843 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:55
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
including current control file in backupset
channel ORA_DISK_1: starting piece 1 at 13-FEB-08
channel ORA_DISK_1: finished piece 1 at 13-FEB-08
piece handle=/u01/app/oracle/flash_recovery_area/ORCL/backupset/2008_02_13/o1_mf_ncnnf_TAG20080213T154843_3v588n15_.bkp tag=TAG20080213T154843 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:02
Finished backup at 13-FEB-08
RMAN> list backup;
List of Backup Sets
===================
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
1 Full 581.19M DISK 00:00:52 13-FEB-08
BP Key: 1 Status: AVAILABLE Compressed: NO Tag: TAG20080213T154843
Piece Name: /u01/app/oracle/flash_recovery_area/ORCL/backupset/2008_02_13/o1_mf_nnndf_TAG20080213T154843_3v586w6h_.bkp
List of Datafiles in backup set 1
File LV Type Ckp SCN Ckp Time Name
---- -- ---- ---------- --------- ----
1 Full 726487 13-FEB-08 /u01/app/oracle/oradata/orcl/system01.dbf
2 Full 726487 13-FEB-08 /u01/app/oracle/oradata/orcl/undotbs01.dbf
3 Full 726487 13-FEB-08 /u01/app/oracle/oradata/orcl/sysaux01.dbf
4 Full 726487 13-FEB-08 /u01/app/oracle/oradata/orcl/users01.dbf
5 Full 726487 13-FEB-08 /u01/app/oracle/oradata/orcl/example01.dbf
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
2 Full 7.08M DISK 00:00:01 13-FEB-08
BP Key: 2 Status: AVAILABLE Compressed: NO Tag: TAG20080213T154843
Piece Name: /u01/app/oracle/flash_recovery_area/ORCL/backupset/2008_02_13/o1_mf_ncnnf_TAG20080213T154843_3v588n15_.bkp
Control File Included: Ckp SCN: 726506 Ckp time: 13-FEB-08
4 關閉資料庫,模擬丟失資料,刪除users資料檔案
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> !
[oracle@mzl orcl]$ ls
control01.ctl example01.dbf sqlnet.log undotbs01.dbf
control02.ctl redo01.log sysaux01.dbf users01.dbf
control03.ctl redo02.log system01.dbf
create.sql redo03.log temp01.dbf
[oracle@mzl orcl]$ rm users01.dbf
5 啟動資料庫到mount狀態
[oracle@mzl orcl]$ sqlplus "/as sysdba"
SQL*Plus: Release 10.2.0.1.0 - Production on Wed Feb 13 15:58:37 2008
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup mount;
ORACLE instance started.
Total System Global Area 268435456 bytes
Fixed Size 1218868 bytes
Variable Size 88082124 bytes
Database Buffers 171966464 bytes
Redo Buffers 7168000 bytes
Database mounted.
6 用rman恢復資料
SQL> !
[oracle@mzl orcl]$ rman target/
Recovery Manager: Release 10.2.0.1.0 - Production on Wed Feb 13 15:59:12 2008
Copyright (c) 1982, 2005, Oracle. All rights reserved.
connected to target database: ORCL (DBID=1172558471, not open)
RMAN> restore database;
Starting restore at 13-FEB-08
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=155 devtype=DISK
channel ORA_DISK_1: starting datafile backupset restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
restoring datafile 00001 to /u01/app/oracle/oradata/orcl/system01.dbf
restoring datafile 00002 to /u01/app/oracle/oradata/orcl/undotbs01.dbf
restoring datafile 00003 to /u01/app/oracle/oradata/orcl/sysaux01.dbf
restoring datafile 00004 to /u01/app/oracle/oradata/orcl/users01.dbf
restoring datafile 00005 to /u01/app/oracle/oradata/orcl/example01.dbf
channel ORA_DISK_1: reading from backup piece /u01/app/oracle/flash_recovery_area/ORCL/backupset/2008_02_13/o1_mf_nnndf_TAG20080213T154843_3v586w6h_.bkp
channel ORA_DISK_1: restored backup piece 1
piece handle=/u01/app/oracle/flash_recovery_area/ORCL/backupset/2008_02_13/o1_mf_nnndf_TAG20080213T154843_3v586w6h_.bkp tag=TAG20080213T154843
channel ORA_DISK_1: restore complete, elapsed time: 00:00:57
Finished restore at 13-FEB-08
7 需要recover database之後才能開啟資料庫
RMAN> recover database;
Starting recover at 13-FEB-08
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=154 devtype=DISK
starting media recovery
media recovery complete, elapsed time: 00:00:01
Finished recover at 13-FEB-08
RMAN> exit
Recovery Manager complete.
[oracle@mzl orcl]$ sqlplus "/as sysdba"
SQL*Plus: Release 10.2.0.1.0 - Production on Wed Feb 13 16:02:30 2008
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL> alter database open;
Database altered.
SQL> select * from test;
A
----------
1
2
5
3
4
8
6 rows selected.
用rman備份與恢復完畢!!
[oracle@mzl orcl]$ rman target/
Recovery Manager: Release 10.2.0.1.0 - Production on Wed Feb 13 15:36:06 2008
Copyright (c) 1982, 2005, Oracle. All rights reserved.
connected to target database: ORCL (DBID=1172558471)
RMAN> backup database;
Starting backup at 13-FEB-08
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=137 devtype=DISK
could not read file header for datafile 6 error reason 1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of backup command at 02/13/2008 15:36:14
RMAN-06056: could not access datafile 6
也就是說不能訪問資料6的檔案。
1 檢視資料6檔案是什麼
SQL> select file#,name from v$datafile;
FILE#
----------
NAME
--------------------------------------------------------------------------------
1
/u01/app/oracle/oradata/orcl/system01.dbf
2
/u01/app/oracle/oradata/orcl/undotbs01.dbf
3
/u01/app/oracle/oradata/orcl/sysaux01.dbf
FILE#
----------
NAME
--------------------------------------------------------------------------------
4
/u01/app/oracle/oradata/orcl/users01.dbf
5
/u01/app/oracle/oradata/orcl/example01.dbf
6
/u01/app/oracle/product/10.2.0/db_1/dbs/MISSING00006
6 rows selected.
看來是MISSING00006檔案,不是系統,也不是使用者的資料。
2 看MISSING00006基於那個表空間,然後刪除該表空間
SQL> select TS#,name from v$tablespace;
TS# NAME
---------- ------------------------------
0 SYSTEM
1 UNDOTBS1
2 SYSAUX
4 USERS
6 EXAMPLE
3 TEMP
7 TS_RMAN
7 rows selected.
SQL> drop tablespace TS_RMAN;
Tablespace dropped.
3 進行rman備份
RMAN> backup database;
Starting backup at 13-FEB-08
using channel ORA_DISK_1
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
input datafile fno=00001 name=/u01/app/oracle/oradata/orcl/system01.dbf
input datafile fno=00003 name=/u01/app/oracle/oradata/orcl/sysaux01.dbf
input datafile fno=00005 name=/u01/app/oracle/oradata/orcl/example01.dbf
input datafile fno=00002 name=/u01/app/oracle/oradata/orcl/undotbs01.dbf
input datafile fno=00004 name=/u01/app/oracle/oradata/orcl/users01.dbf
channel ORA_DISK_1: starting piece 1 at 13-FEB-08
channel ORA_DISK_1: finished piece 1 at 13-FEB-08
piece handle=/u01/app/oracle/flash_recovery_area/ORCL/backupset/2008_02_13/o1_mf_nnndf_TAG20080213T154843_3v586w6h_.bkp tag=TAG20080213T154843 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:55
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
including current control file in backupset
channel ORA_DISK_1: starting piece 1 at 13-FEB-08
channel ORA_DISK_1: finished piece 1 at 13-FEB-08
piece handle=/u01/app/oracle/flash_recovery_area/ORCL/backupset/2008_02_13/o1_mf_ncnnf_TAG20080213T154843_3v588n15_.bkp tag=TAG20080213T154843 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:02
Finished backup at 13-FEB-08
RMAN> list backup;
List of Backup Sets
===================
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
1 Full 581.19M DISK 00:00:52 13-FEB-08
BP Key: 1 Status: AVAILABLE Compressed: NO Tag: TAG20080213T154843
Piece Name: /u01/app/oracle/flash_recovery_area/ORCL/backupset/2008_02_13/o1_mf_nnndf_TAG20080213T154843_3v586w6h_.bkp
List of Datafiles in backup set 1
File LV Type Ckp SCN Ckp Time Name
---- -- ---- ---------- --------- ----
1 Full 726487 13-FEB-08 /u01/app/oracle/oradata/orcl/system01.dbf
2 Full 726487 13-FEB-08 /u01/app/oracle/oradata/orcl/undotbs01.dbf
3 Full 726487 13-FEB-08 /u01/app/oracle/oradata/orcl/sysaux01.dbf
4 Full 726487 13-FEB-08 /u01/app/oracle/oradata/orcl/users01.dbf
5 Full 726487 13-FEB-08 /u01/app/oracle/oradata/orcl/example01.dbf
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
2 Full 7.08M DISK 00:00:01 13-FEB-08
BP Key: 2 Status: AVAILABLE Compressed: NO Tag: TAG20080213T154843
Piece Name: /u01/app/oracle/flash_recovery_area/ORCL/backupset/2008_02_13/o1_mf_ncnnf_TAG20080213T154843_3v588n15_.bkp
Control File Included: Ckp SCN: 726506 Ckp time: 13-FEB-08
4 關閉資料庫,模擬丟失資料,刪除users資料檔案
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> !
[oracle@mzl orcl]$ ls
control01.ctl example01.dbf sqlnet.log undotbs01.dbf
control02.ctl redo01.log sysaux01.dbf users01.dbf
control03.ctl redo02.log system01.dbf
create.sql redo03.log temp01.dbf
[oracle@mzl orcl]$ rm users01.dbf
5 啟動資料庫到mount狀態
[oracle@mzl orcl]$ sqlplus "/as sysdba"
SQL*Plus: Release 10.2.0.1.0 - Production on Wed Feb 13 15:58:37 2008
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup mount;
ORACLE instance started.
Total System Global Area 268435456 bytes
Fixed Size 1218868 bytes
Variable Size 88082124 bytes
Database Buffers 171966464 bytes
Redo Buffers 7168000 bytes
Database mounted.
6 用rman恢復資料
SQL> !
[oracle@mzl orcl]$ rman target/
Recovery Manager: Release 10.2.0.1.0 - Production on Wed Feb 13 15:59:12 2008
Copyright (c) 1982, 2005, Oracle. All rights reserved.
connected to target database: ORCL (DBID=1172558471, not open)
RMAN> restore database;
Starting restore at 13-FEB-08
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=155 devtype=DISK
channel ORA_DISK_1: starting datafile backupset restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
restoring datafile 00001 to /u01/app/oracle/oradata/orcl/system01.dbf
restoring datafile 00002 to /u01/app/oracle/oradata/orcl/undotbs01.dbf
restoring datafile 00003 to /u01/app/oracle/oradata/orcl/sysaux01.dbf
restoring datafile 00004 to /u01/app/oracle/oradata/orcl/users01.dbf
restoring datafile 00005 to /u01/app/oracle/oradata/orcl/example01.dbf
channel ORA_DISK_1: reading from backup piece /u01/app/oracle/flash_recovery_area/ORCL/backupset/2008_02_13/o1_mf_nnndf_TAG20080213T154843_3v586w6h_.bkp
channel ORA_DISK_1: restored backup piece 1
piece handle=/u01/app/oracle/flash_recovery_area/ORCL/backupset/2008_02_13/o1_mf_nnndf_TAG20080213T154843_3v586w6h_.bkp tag=TAG20080213T154843
channel ORA_DISK_1: restore complete, elapsed time: 00:00:57
Finished restore at 13-FEB-08
7 需要recover database之後才能開啟資料庫
RMAN> recover database;
Starting recover at 13-FEB-08
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=154 devtype=DISK
starting media recovery
media recovery complete, elapsed time: 00:00:01
Finished recover at 13-FEB-08
RMAN> exit
Recovery Manager complete.
[oracle@mzl orcl]$ sqlplus "/as sysdba"
SQL*Plus: Release 10.2.0.1.0 - Production on Wed Feb 13 16:02:30 2008
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL> alter database open;
Database altered.
SQL> select * from test;
A
----------
1
2
5
3
4
8
6 rows selected.
用rman備份與恢復完畢!!
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/12778571/viewspace-170172/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 【RMAN】Oracle12c之後,rman備份Dataguard備端恢復可能出現邏輯錯誤Oracle
- RMAN備份出現ORA-01801: date format is too long for internal buffer錯誤ORM
- 解決Centos7 yum 出現could not retrieve mirrorlist 錯誤CentOS
- Intellij IDEA使用@Autowired註解,出現could not autowire錯誤,解決方案IntelliJIdea
- nginx出現403錯誤的解決方法Nginx
- 【RMAN】在備庫執行rman備份時報錯RMAN-06820 ORA-17629
- rman備份archivelog出現ORA-19625Hive
- Go:錯誤 could not launch process: EOF 解決Go
- SqlServer NBU備份出現錯誤程式碼2SQLServer
- 恢復備份例項時出現ORA-01659的解決方法UA
- NFS掛載時出現”access denied by server while mounting”的解決方法NFSServerWhile
- Python: 安裝 sklearn 包出現錯誤的解決方法Python
- 伺服器出現 HTTP 錯誤程式碼,及解決方法伺服器HTTP
- 錯誤 qt.qpa.plugin: Could not find the Qt platform plugin “windows“ in ““ 的解決方法QTPluginPlatformWindows
- 【RMAN】同時建立多個備份(建立多重備份)
- RMAN備份詳解(轉載)
- 【RMAN】RMAN備份至ASMASM
- win10系統登入Origin Access遊戲時出錯了的解決方法Win10遊戲
- RMAN-06214: Datafile Copy
- vagrant下composer安裝laravel-wechat時候,出現could not delete的錯誤Laraveldelete
- 解決win10安裝office出現錯誤程式碼30015-6的修復方法Win10
- 安裝vCenter Server出現1603錯誤的一種解決方法Server
- git push出現unpack failed: error Missing tree錯誤的解決方法GitAIError
- win10系統提示access violation at address出錯的解決方法Win10
- RMAN備份中發現壞塊
- RMAN備份概述
- RMAN刪除歸檔日誌出現RMAN-0813錯誤的處理
- 【RMAN】RMAN的備份保留策略
- 【備份】RMAN中對控制檔案的幾種備份方法
- win10 mstsc出現內部錯誤怎麼修復_win10 mstsc出現內部錯誤解決方法Win10
- Mysql出現連線錯誤解決辦法MySql
- windows10系統升級助手出現錯誤的解決方法Windows
- PbootCMS 404 錯誤解決方法boot
- Windows git remote: HTTP Basic: Access denied 錯誤解決辦法WindowsGitREMHTTP
- Mac時間機器備份加速教程,Time Machine 備份太慢的解決方法Mac
- dbfread報錯ValueError錯誤解決方法Error
- python匯入dlib時出錯解決方法Python
- RMAN備份恢復典型案例——RMAN備份&系統變慢
- 真機除錯出現 application installation failed 錯誤 解決方案除錯APPAI