我尝试使用普通用户去连接数据库,数据库提示G:\xxx\xxx_AUDIT01.DBF数据文件无法读取,我于是查看数据库日志文件,有以下信息提示:
-
at May 20 04:32:49 2017
-
Archived Log entry 21959 added for thread 1 sequence 21815 ID 0x6e1a5168 dest 1:
-
Sat May 20 04:59:03 2017
-
KCF: read, write or open error, block=0x23b40 online=1
-
file=61 'G:\xxx\xxx_AUDIT01.DBF'
-
error=27070 txt: 'OSD-04016: 异步 I/O 请求排队时出错。
-
O/S-Error: (OS 1453) 配额不足,无法完成请求的服务。'
-
Automatic datafile offline due to write error on
-
file 61: x:\xxxx\xxxx_AUDIT01.DBF
-
KCF: read, write or open error, block=0x23b30 online=0
-
file=61 'MISSING0'
-
error=27070 txt: 'OSD-04016: 异步 I/O 请求排队时出错。
-
O/S-Error: (OS 1453) 配额不足,无法完成请求的服务。'
-
Sat May 20 04:59:04 2017
-
Checker run found 1 new persistent data failures
-
Sat May 20 04:59:56 2017
-
Errors in file x:\app\administrator\diag\rdbms\peis\peis\trace\peis_m000_1947744.trc:
-
ORA-01135: file 61 accessed for DML/query is offline
-
ORA-01110: data file 61: 'x:\xxxx\xxxx_AUDIT01.DBF'
- Sat May 20 05:09:59 2017
通过dba_data_files视图查看61号数据文件发现它的状态是 RECOVER ,需要恢复这个数据文件,数据库是每天晚上进行备份,因为有可用的备份文件可以恢复
-
x:\app\Administrator\product\11.2.0\dbhome_1\BIN>rman target /
-
-
恢复管理器: Release 11.2.0.1.0 - Production on 星期六 5月 20 08:28:07 2017
-
-
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
-
-
连接到目标数据库: PEIS (DBID=1847212904)
-
-
RMAN> recover datafile 61;
-
-
启动 recover 于 20-5月 -17
-
使用目标数据库控制文件替代恢复目录
-
分配的通道: ORA_DISK_1
-
通道 ORA_DISK_1: SID=245 设备类型=DISK
-
-
正在开始介质的恢复
-
介质恢复完成, 用时: 00:00:00
-
-
完成 recover 于 20-5月 -17
-
-
RMAN> restore datafile 61;
-
-
启动 restore 于 20-5月 -17
-
使用通道 ORA_DISK_1
-
-
通道 ORA_DISK_1: 正在开始还原数据文件备份集
-
通道 ORA_DISK_1: 正在指定从备份集还原的数据文件
-
通道 ORA_DISK_1: 将数据文件 00061 还原到 x:\xxx\xxx_AUDIT01.DBF
-
通道 ORA_DISK_1: 正在读取备份片段 x:\ORA_BACKUP\RMAN_BACKUP\Pxxx_20170519\xxxx_DF_944425959_S12839_P1
-
通道 ORA_DISK_1: 段句柄 = x:\ORA_BACKUP\RMAN_BACKUP\xxxx_20170519\xxxx_DF_944425959_S12839_P1 标记 = ABC_FULL_DATABASE_BACKUP
-
通道 ORA_DISK_1: 已还原备份片段 1
-
通道 ORA_DISK_1: 还原完成, 用时: 00:01:05
-
完成 restore 于 20-5月 -17
-
-
RMAN> recover datafile 61;
-
-
启动 recover 于 20-5月 -17
-
使用通道 ORA_DISK_1
-
-
正在开始介质的恢复
-
-
线程 1 序列 21808 的归档日志已作为文件 x:\xxxxARCH_BAK\ARC0000021808_0841487275.0001 存在于磁盘上
-
线程 1 序列 21809 的归档日志已作为文件 x:\xxxxARCH_BAK\ARC0000021809_0841487275.0001 存在于磁盘上
-
线程 1 序列 21810 的归档日志已作为文件 x:\xxxxARCH_BAK\ARC0000021810_0841487275.0001 存在于磁盘上
-
线程 1 序列 21811 的归档日志已作为文件 x:\xxxxARCH_BAK\ARC0000021811_0841487275.0001 存在于磁盘上
-
线程 1 序列 21812 的归档日志已作为文件 x:\xxxxARCH_BAK\ARC0000021812_0841487275.0001 存在于磁盘上
-
线程 1 序列 21813 的归档日志已作为文件 x:\xxxxARCH_BAK\ARC0000021813_0841487275.0001 存在于磁盘上
-
线程 1 序列 21814 的归档日志已作为文件 x:\xxxxARCH_BAK\ARC0000021814_0841487275.0001 存在于磁盘上
-
线程 1 序列 21815 的归档日志已作为文件 x:\xxxxARCH_BAK\ARC0000021815_0841487275.0001 存在于磁盘上
-
线程 1 序列 21816 的归档日志已作为文件 x:\xxxxARCH_BAK\ARC0000021816_0841487275.0001 存在于磁盘上
-
归档日志文件名=x:\xxxxARCH_BAK\ARC0000021808_0841487275.0001 线程=1 序列=21808
-
归档日志文件名=x:\xxxxARCH_BAK\ARC0000021809_0841487275.0001 线程=1 序列=21809
-
归档日志文件名=x:\xxxxARCH_BAK\ARC0000021810_0841487275.0001 线程=1 序列=21810
-
归档日志文件名=x:\xxxxARCH_BAK\ARC0000021811_0841487275.0001 线程=1 序列=21811
-
归档日志文件名=x:\xxxxARCH_BAK\ARC0000021812_0841487275.0001 线程=1 序列=21812
-
归档日志文件名=x:\xxxxARCH_BAK\ARC0000021813_0841487275.0001 线程=1 序列=21813
-
归档日志文件名=x:\xxxxARCH_BAK\ARC0000021814_0841487275.0001 线程=1 序列=21814
-
介质恢复完成, 用时: 00:00:02
-
完成 recover 于 20-5月 -17
-
-
RMAN> exit
-
-
-
恢复管理器完成。
-
-
x:\app\Administrator\product\11.2.0\dbhome_1\BIN>sqlplus / as sysdba
-
-
SQL*Plus: Release 11.2.0.1.0 Production on 星期六 5月 20 08:31:32 2017
-
-
Copyright (c) 1982, 2010, Oracle. All rights reserved.
-
-
-
连接到:
-
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
-
With the Partitioning, OLAP, Data Mining and Real Application Testing options
-
-
SQL> alter database datafile 61 online;
-
-
数据库已更改。
-
- SQL>
通过以上把61号数据文件进行了恢复,并且修改状态为Online,数据库恢复正常