ORA-01110: data file
2014-03-05 13:50
399 查看
CASE1:
测试场insert 操作时报错。
ORA-01110: data file 4: '/home/XXX/data/XXX_01.dbf'
。先查看了下DB状态,是OPEN。DF,看空间大小,也没满。从dba_data_files中找出这个DBF对应的TABLESPACE,去dba_tablespaces中看了下它的状态。为READ ONLY!
有点慌。。快速查看了所有的表空间哪些是READ ONLY的。有140个!
跑个脚本改过来。
set head off pages 0 lines 200 feedback off
SPOOL alter_tablespaces.sql
select 'ALTER TABLESPACE ' || tablespace_name || ' READ WRITE;'
from dba_tablespaces
where status='READ ONLY';
SPOOL off
@alter_tablespaces
------------------------------
SQL> shutdown immediate;
ORA-01116: error in opening database file 8
ORA-01110: data file 8: '/home/oracle/ad_test/t1.dbf'
ORA-27041: unable to open file
SQL> SELECT name, error FROM v$datafile JOIN v$recover_file USING (file#);
NAME
--------------------------------------------------------------------------------
ERROR
-----------------------------------------------------------------
/home/oracle/ad_test/t1.dbf
FILE NOT FOUND
alter database datafile 8 offline drop;
SQL> alter database datafile 8 offline drop;
Database altered.
SQL> startup force
ORACLE instance started.
Total System Global Area 2672361472 bytes
Fixed Size 2256232 bytes
Variable Size 1392509592 bytes
Database Buffers 1258291200 bytes
Redo Buffers 19304448 bytes
Database mounted.
Database opened.
CASE2:
删除了一个DBFILE。
然后出错, 使用RMAN
Total System Global Area 2672361472 bytes
Fixed Size 2256232 bytes
Variable Size 1392509592 bytes
Database Buffers 1258291200 bytes
Redo Buffers 19304448 bytes
Database mounted.
ORA-01157: cannot identify/lock data file 7 - see DBWR trace file
ORA-01110: data file 7: '/home/oracle/adam/audit_tbs01.dbf'
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
-bash-3.2$ rman target /
Recovery Manager: Release 11.2.0.4.0 - Production on Tue Apr 8 20:55:40 2014
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
connected to target database: AD_TEST (DBID=846030938, not open)
RMAN> list failure;
using target database control file instead of recovery catalog
List of Database Failures
=========================
Failure ID Priority Status Time Detected Summary
---------- -------- --------- -------------------- -------
26422 HIGH OPEN Mar-14-2014:14:59:24 One or more non-system datafiles are missing
26502 HIGH OPEN Mar-20-2014:20:39:09 One or more non-system datafiles are offline
Mandatory Manual Actions
========================
1. If file /home/oracle/ad_test/t1.dbf was unintentionally renamed or moved, restore it
2. If you have an export of tablespace GVVMC_DATA, open the database read/write, then drop and re-create the tablespace and import the data.
3. If file /home/oracle/adam/audit_tbs01.dbf was unintentionally renamed or moved, restore it
4. If you have an export of tablespace AUDIT_TBS, offline its data files, open the database read/write, then drop and re-create the tablespace and import the data.
5. A database state change is required to repair the following failures.
6. Open the database to validate and get repair advice for failure 26505: Datafile 8: '/home/oracle/ad_test/t1.dbf' is offline
7. Contact Oracle Support Services if the preceding recommendations cannot be used, or if they do not fix the failures selected for repair
Optional Manual Actions
=======================
no manual actions available
Automated Repair Options
========================
no automatic repair options available
不用使用REPAIR FAILURE...
SQL> alter database datafile 7 offline drop;
Database altered.
测试场insert 操作时报错。
ORA-01110: data file 4: '/home/XXX/data/XXX_01.dbf'
。先查看了下DB状态,是OPEN。DF,看空间大小,也没满。从dba_data_files中找出这个DBF对应的TABLESPACE,去dba_tablespaces中看了下它的状态。为READ ONLY!
有点慌。。快速查看了所有的表空间哪些是READ ONLY的。有140个!
跑个脚本改过来。
set head off pages 0 lines 200 feedback off
SPOOL alter_tablespaces.sql
select 'ALTER TABLESPACE ' || tablespace_name || ' READ WRITE;'
from dba_tablespaces
where status='READ ONLY';
SPOOL off
@alter_tablespaces
------------------------------
SQL> shutdown immediate;
ORA-01116: error in opening database file 8
ORA-01110: data file 8: '/home/oracle/ad_test/t1.dbf'
ORA-27041: unable to open file
SQL> SELECT name, error FROM v$datafile JOIN v$recover_file USING (file#);
NAME
--------------------------------------------------------------------------------
ERROR
-----------------------------------------------------------------
/home/oracle/ad_test/t1.dbf
FILE NOT FOUND
alter database datafile 8 offline drop;
SQL> alter database datafile 8 offline drop;
Database altered.
SQL> startup force
ORACLE instance started.
Total System Global Area 2672361472 bytes
Fixed Size 2256232 bytes
Variable Size 1392509592 bytes
Database Buffers 1258291200 bytes
Redo Buffers 19304448 bytes
Database mounted.
Database opened.
CASE2:
删除了一个DBFILE。
然后出错, 使用RMAN
Total System Global Area 2672361472 bytes
Fixed Size 2256232 bytes
Variable Size 1392509592 bytes
Database Buffers 1258291200 bytes
Redo Buffers 19304448 bytes
Database mounted.
ORA-01157: cannot identify/lock data file 7 - see DBWR trace file
ORA-01110: data file 7: '/home/oracle/adam/audit_tbs01.dbf'
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
-bash-3.2$ rman target /
Recovery Manager: Release 11.2.0.4.0 - Production on Tue Apr 8 20:55:40 2014
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
connected to target database: AD_TEST (DBID=846030938, not open)
RMAN> list failure;
using target database control file instead of recovery catalog
List of Database Failures
=========================
Failure ID Priority Status Time Detected Summary
---------- -------- --------- -------------------- -------
26422 HIGH OPEN Mar-14-2014:14:59:24 One or more non-system datafiles are missing
26502 HIGH OPEN Mar-20-2014:20:39:09 One or more non-system datafiles are offline
Mandatory Manual Actions
========================
1. If file /home/oracle/ad_test/t1.dbf was unintentionally renamed or moved, restore it
2. If you have an export of tablespace GVVMC_DATA, open the database read/write, then drop and re-create the tablespace and import the data.
3. If file /home/oracle/adam/audit_tbs01.dbf was unintentionally renamed or moved, restore it
4. If you have an export of tablespace AUDIT_TBS, offline its data files, open the database read/write, then drop and re-create the tablespace and import the data.
5. A database state change is required to repair the following failures.
6. Open the database to validate and get repair advice for failure 26505: Datafile 8: '/home/oracle/ad_test/t1.dbf' is offline
7. Contact Oracle Support Services if the preceding recommendations cannot be used, or if they do not fix the failures selected for repair
Optional Manual Actions
=======================
no manual actions available
Automated Repair Options
========================
no automatic repair options available
不用使用REPAIR FAILURE...
SQL> alter database datafile 7 offline drop;
Database altered.
相关文章推荐
- ORA-01152: file 1 was not restored from a sufficiently old backup ORA-01110: data file 1: '/u01/app
- ORA-01111: name for data file 81 is unknown - rename to correct file ORA-01110: ORA-01157:
- ORA-00376: file 202 cannot be read at this time ORA-01110: data file 202故障处理
- ORA-01110: data file 56
- Oracle:datafile删除后,重启server报ORA-01110
- ORA-01110: data file 1: '/opt/ora10g/oradata/orcla/system01.dbf'错误
- 尝试进行recover datafile时报告下列错误:ORA-00283 ORA-01115 ORA-01110 ORA-27069 OSD-04026
- 【精】ORA-01157: cannot identify/lock data file 6 - see DBWR trace file ORA-01110: 解决方法
- oracle启动报错ORA-01157: cannot identify/lock data file 7 - see DBWR trace file ORA-01110: data file 7:
- 【续】ORA-01157: cannot identify/lock data file 6 - see DBWR trace file ORA-01110: 解决方法
- “ORA-01110: data file 1: 'F:\oracle\product\10.2.0\oradata\orcl\sysaux01.dbf'"解决方法
- oracle 启动时出现ORA-01157: cannot identify/lock data和ORA-01110: data file 错误
- ORA-01146: cannot start online backup - file 1 is already in backup ORA-01110: data file 1: 'C:\ORACLE\ORADATA\ORCL8\SYSTEM01.DBF'
- ORA-01187: cannot read from file because it failed verification tests ORA-01110: data file 201: '/
- ORA-01110 ORA-01111: name for data file 69 is unknown - rename to correct file
- ORA-01210: data file header is media corrupt
- ORA-01157 ORA-01110 Alter system check datafiles
- ORA-01180: can not create datafile 1 :解决一例
- UNNAMED FILE ERROR IN STANDBY AFTER ADDING NEW FILE TO PRIMARY DATABASE – ORA-01111, ORA-01110, ORA-
- ORA-01157: cannot identify/lock data file 6 - see DBWR trace file