概述
首先,正常的实验会出现备份非归档模式数据库的错误(ORA-19602: cannot backup or copy active file in NOARCHIVELOG mode),但是这里却出现了RMAN-06169错误
正常实验会出现下面在linux机子上的错误
oracle@gujunpu-HP-ProBook-4410s:~$ export ORACLE_SID=gujunpu
oracle@gujunpu-HP-ProBook-4410s:~$ export NLS_DATE_FORMAT="YYYY/MM/DD HH24:MI"
oracle@gujunpu-HP-ProBook-4410s:~$ rman
Recovery Manager: Release 11.2.0.1.0 - Production on Wed Nov 13 18:01:34 2013
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
RMAN> connect target
connected to target database: GUJUNPU (DBID=2213880084)
RMAN> backup database;
Starting backup at 2013/11/13 18:03
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=125 device type=DISK
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
RMAN-03009: failure of backup command on ORA_DISK_1 channel at 11/13/2013 18:03:49
ORA-19602: cannot backup or copy active file in NOARCHIVELOG mode
continuing other job steps, job failed will not be re-run
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
including current control file in backup set
including current SPFILE in backup set
channel ORA_DISK_1: starting piece 1 at 2013/11/13 18:03
channel ORA_DISK_1: finished piece 1 at 2013/11/13 18:03
piece handle=/u01/app/oracle/flash_recovery_area/GUJUNPU/backupset/2013_11_13/o1_mf_ncsnf_TAG20131113T180349_986mn6p8_.bkp tag=TAG20131113T180349 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03009: failure of backup command on ORA_DISK_1 channel at 11/13/2013 18:03:49
ORA-19602: cannot backup or copy active file in NOARCHIVELOG mode
但在一台windows上的Oracle做实验时出现下面状况
E:程序工作区JAVA>set ORACL_SID=gujunpu
E:程序工作区JAVA>set NLS_DATE_FORMAT=YYYY/MM/DD HH24:MI
E:程序工作区JAVA>RMAN
恢复管理器: Release 11.2.0.1.0 - Production on 星期三 11月 13 10:15:30 2013
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved
RMAN> connect target;
已连接到目标数据库: GUJUNPU (DBID=2206206519, 未打开)
RMAN> alter database open;
使用目标数据库控制文件替代恢复目录
数据库已打开
RMAN> connect target;
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-06167: 已经连接
RMAN> backup database;
启动 backup 于 2013/11/13 10:16
分配的通道: ORA_DISK_1
通道 ORA_DISK_1: SID=67 设备类型=DISK
RMAN-06169: 无法读取数据文件的文件标头5错误原因4
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: backup 命令 (在 11/13/2013 10:16:43 上) 失败
RMAN-06056: 无法访问数据文件5
通过查资料找到发生这种错误的原因,我初步断定的原因是我的某个数据文件offline。你可以去找对应原因的解决办法
RMAN-06169: could not read file header for datafile 4 error reason 1
The reason code 1 is: 1 - "filename is MISSINGxx in the control file"
...
2 - file is offline
3 - file is not verified
4 - DBWR could not find the file
5 - unable to open file
6 - I/O error during read
7 - file header is corrupt
8 - file is not a datafile
9 - file does not belong to this database
10 - file number is incorrect
12 - wrong file version
15 - control file is not current.
先检查数据文件状态
SQL> select file_name,tablespace_name,online_status from dba_data_files;
FILE_NAME TABLESPACE_NAME ONLINE_
---------------------------------------- ------------------------------ -------
G:APPADMINISTRATORORADATAGUJUNPUUSE USERS ONLINE
RS01.DBF
G:APPADMINISTRATORORADATAGUJUNPUUND UNDOTBS1 ONLINE
OTBS01.DBF
G:APPADMINISTRATORORADATAGUJUNPUSYS SYSAUX ONLINE
AUX01.DBF
G:APPADMINISTRATORORADATAGUJUNPUSYS SYSTEM SYSTEM
TEM01.DBF
FILE_NAME TABLESPACE_NAME ONLINE_
---------------------------------------- ------------------------------ -------
G:TESTDADA01.DBF DATA01 RECOVER
切换到online发现根本不存在,其实我在操作系统上删除了
SQL> alter database gujunpu datafile 'G:TESTDADA01.DBF' online;
alter database gujunpu datafile 'G:TESTDADA01.DBF' online
*
第 1 行出现错误:
ORA-01157: 无法标识/锁定数据文件 5 - 请参阅 DBWR 跟踪文件
ORA-01110: 数据文件 5: 'G:TESTDADA01.DBF'
不能直接删除数据文件,只能删除表空间。这里有个问题是如果你的表空间见有多个数据文件,并且表空间还有用。我目前知道的一个比较麻烦的方法是:
使要删除的数据文件脱机
exp导出,full=y
删除表空间includeing contents
imp导入再联机
下面直接删除
SQL> drop tablespace data01 including contents;
表空间已删除。
SQL> select file_name,tablespace_name,online_status from dba_data_files;
FILE_NAME TABLESPACE_NAME ONLINE_
---------------------------------------- ------------------------------ -------
G:APPADMINISTRATORORADATAGUJUNPUUSE USERS ONLINE
RS01.DBF
G:APPADMINISTRATORORADATAGUJUNPUUND UNDOTBS1 ONLINE
OTBS01.DBF
G:APPADMINISTRATORORADATAGUJUNPUSYS SYSAUX ONLINE
AUX01.DBF
G:APPADMINISTRATORORADATAGUJUNPUSYS SYSTEM SYSTEM
TEM01.DBF
FILE_NAME TABLESPACE_NAME ONLINE_
---------------------------------------- ------------------------------ -------
结果可以出现正常的备份错误
RMAN> backup database
2> ;
启动 backup 于 2013/11/13 18:20
使用目标数据库控制文件替代恢复目录
分配的通道: ORA_DISK_1
通道 ORA_DISK_1: SID=134 设备类型=DISK
通道 ORA_DISK_1: 正在启动全部数据文件备份集
通道 ORA_DISK_1: 正在指定备份集内的数据文件
RMAN-03009: backup 命令 (ORA_DISK_1 通道上, 在 11/13/2013 18:20:20 上) 失败
ORA-19602: 无法按 NOARCHIVELOG 模式备份或复制活动文件
继续执行其他作业步骤, 将不重新运行失败的作业
通道 ORA_DISK_1: 正在启动全部数据文件备份集
通道 ORA_DISK_1: 正在指定备份集内的数据文件
备份集内包括当前控制文件
备份集内包括当前的 SPFILE
通道 ORA_DISK_1: 正在启动段 1 于 2013/11/13 18:20
通道 ORA_DISK_1: 已完成段 1 于 2013/11/13 18:20
段句柄=G:APPADMINISTRATORFLASH_RECOVERY_AREAGUJUNPUBACKUPSET2013_11_13O1_MF_NCSNF_TAG20
P 标记=TAG20131113T182019 注释=NONE
通道 ORA_DISK_1: 备份集已完成, 经过时间:00:00:01
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03009: backup 命令 (ORA_DISK_1 通道上, 在 11/13/2013 18:20:20 上) 失败
ORA-19602: 无法按 NOARCHIVELOG 模式备份或复制活动文件
转载于:https://blog.51cto.com/gujunpu/1345929
最后
以上就是无聊果汁为你收集整理的RMAN简单实验引出的RMAN-06169错误的全部内容,希望文章能够帮你解决RMAN简单实验引出的RMAN-06169错误所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
发表评论 取消回复