本文是原创文章。转载请注明出处:http://blog.csdn.net/msdnchina/article/details/44336789

近期遇到一个案例,是将一个表空间offline之后,alert日志中不断的报错,最初该报错是在11.2.0.2被发现的。后来我在11.2.0.4的linux x86-64 bit下试验了一下,也发现了同样的现象。

例如以下是我的实验步骤:

[oracle@rhel63single ~]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.4.0 Production on Fri Mar 13 09:11:24 2015

Copyright (c) 1982, 2013, Oracle.  All rights reserved.

Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options SQL> select name from v$dbfile; NAME
--------------------------------------------------------------------------------
/u01/app/oracle/oradata/test/users01.dbf
/u01/app/oracle/oradata/test/undotbs01.dbf
/u01/app/oracle/oradata/test/sysaux01.dbf
/u01/app/oracle/oradata/test/system01.dbf
/u01/app/oracle/oradata/test/ten01.dbf
/u01/app/oracle/oradata/test/tb_test_01.dbf
/u01/app/oracle/oradata/test/ts1.dbf
/u01/app/oracle/oradata/test/ts2.dbf
/u01/app/oracle/oradata/test/test01.dbf
/u01/app/oracle/oradata/test/test_uni_sz_2m_01.dbf
/u01/app/oracle/oradata/test/test_uni_sz_1m_01.dbf 11 rows selected. SQL> create tablespace testtbs datafile '/u01/app/oracle/oradata/test/test.dbf' size 10M; Tablespace created. SQL> create table testtab tablespace testtbs as select * from dual; Table created. SQL> select * from testtab; D
-
X SQL> alter database datafile '/u01/app/oracle/oradata/test/test.dbf' offline; Database altered. SQL> select * from testtab;
select * from testtab
*
ERROR at line 1:
ORA-00376: file 12 cannot be read at this time
ORA-01110: data file 12: '/u01/app/oracle/oradata/test/test.dbf' SQL> ! date
Fri Mar 13 09:17:12 CST 2015 SQL>

从alert日志中看到:

Fri Mar 13 09:15:38 2015
create tablespace test datafile '/u01/app/oracle/oradata/test/test.dbf' size 10M
ORA-1543 signalled during: create tablespace test datafile '/u01/app/oracle/oradata/test/test.dbf' size 10M...
Fri Mar 13 09:15:57 2015
create tablespace testtbs datafile '/u01/app/oracle/oradata/test/test.dbf' size 10M
Completed: create tablespace testtbs datafile '/u01/app/oracle/oradata/test/test.dbf' size 10M
Fri Mar 13 09:16:46 2015
alter database datafile '/u01/app/oracle/oradata/test/test.dbf' offline
Completed: alter database datafile '/u01/app/oracle/oradata/test/test.dbf' offline
Fri Mar 13 09:17:01 2015
Checker run found 1 new persistent data failures
Fri Mar 13 09:20:28 2015
Errors in file /u01/app/oracle/diag/rdbms/test/test/trace/test_m000_3186.trc:
ORA-01135: file 12 accessed for DML/query is offline
ORA-01110: data file 12: '/u01/app/oracle/oradata/test/test.dbf'
Fri Mar 13 09:30:29 2015
Errors in file /u01/app/oracle/diag/rdbms/test/test/trace/test_m000_3217.trc:
ORA-01135: file 12 accessed for DML/query is offline
ORA-01110: data file 12: '/u01/app/oracle/oradata/test/test.dbf'
Fri Mar 13 09:40:30 2015
Errors in file /u01/app/oracle/diag/rdbms/test/test/trace/test_m000_3250.trc:
ORA-01135: file 12 accessed for DML/query is offline
ORA-01110: data file 12: '/u01/app/oracle/oradata/test/test.dbf'

查看/u01/app/oracle/diag/rdbms/test/test/trace/test_m000_3250.trc文件的内容例如以下:

[oracle@rhel63single trace]$ cat /u01/app/oracle/diag/rdbms/test/test/trace/test_m000_3250.trc
Trace file /u01/app/oracle/diag/rdbms/test/test/trace/test_m000_3250.trc
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
ORACLE_HOME = /u02/app/oracle/product/11.2.0.4/db_1
System name: Linux
Node name: rhel63single
Release: 2.6.32-279.el6.x86_64
Version: #1 SMP Wed Jun 13 18:24:36 EDT 2012
Machine: x86_64
VM name: VMWare Version: 6
Instance name: test
Redo thread mounted by this instance: 1
Oracle process number: 22
Unix process pid: 3250, image: oracle@rhel63single (M000) *** 2015-03-13 09:40:30.195
*** SESSION ID:(130.7) 2015-03-13 09:40:30.195
*** CLIENT ID:() 2015-03-13 09:40:30.195
*** SERVICE NAME:(SYS$BACKGROUND) 2015-03-13 09:40:30.195
*** MODULE NAME:(MMON_SLAVE) 2015-03-13 09:40:30.195
*** ACTION NAME:(Monitor Tablespace Thresholds) 2015-03-13 09:40:30.195 DDE rules only execution for: ORA 1110
----- START Event Driven Actions Dump ----
---- END Event Driven Actions Dump ----
----- START DDE Actions Dump -----
Executing SYNC actions
----- START DDE Action: 'DB_STRUCTURE_INTEGRITY_CHECK' (Async) -----
Successfully dispatched
----- END DDE Action: 'DB_STRUCTURE_INTEGRITY_CHECK' (SUCCESS, 0 csec) -----
Executing ASYNC actions
----- END DDE Actions Dump (total 0 csec) -----
ORA-01135: file 12 accessed for DML/query is offline
ORA-01110: data file 12: '/u01/app/oracle/oradata/test/test.dbf'
[oracle@rhel63single trace]$

后来在mos中搜索了一下:

Getting Trace Files With DB_STRUCTURE_INTEGRITY_CHECK And An ORA-01110. (文档 ID 1252614.1)

该文章与本现象相符。

该文章给出原因是:

These files are generated by the Health Check Monitor and specifically, the DB Structure Integrity Check.

http://docs.oracle.com/cd/B28359_01/server.111/b28310/diag007.htm#ADMIN11269

这个hcm(health check monitor)是从11.1就有的。

例如以下来自:Checker Run Found xx New Persistent Data Failures. (文档 ID 1391202.1)

By default the database runs the Health Check on a regular basis.During the course of these health check executions if any failures are detected then these kind of messages are logged to the alert log.

Health Monitor checks (also known as checkers, health checks, or checks) examine various layers and components of the database. Health checks detect file corruptions, physical and logical block corruptions, undo and redo corruptions, data dictionary corruptions, and more. The health checks generate reports of their findings and, in many cases, recommendations for resolving problems.

拓展一下:与health check相关的视图(事实上是synonym)有:

V$HM_CHECK
V$HM_CHECK_PARAM
V$HM_FINDING
V$HM_INFO
V$HM_RECOMMENDATION
V$HM_RUN

以上视图的查询结果能够用到客户db的巡检中。

解决方式见下:

Solution

 The ORA-01110 is not seen in the alert log, but if you set an Error Stack for it, you would see it. So, we need to set an Error Stack for the ORA-01110 to get the name of the offline data file.

 1) Set the following event and check the alert log for occurrence of the ORA-01110.
SQL> connect / as sysdba
SQL> alter system set events '1110 trace name errorstack level 3'; 2) If the trace files are still being generated, then once a file is created, the ORA-01110 should now be seen
in the alert log. When you capture it, disable the tracing:
SQL> connect / as sysdba
SQL> alter system set events '1110 trace name errorstack off'; 3. The ORA-01110 in the alert log seen, should give the name of the data file that's offline. 4. Please switch that data file/ table space status to online, and that should avoid the traces. 5. If the table space/ data file is set to offline for a reason, then the traces are expected and should be of no
concern. Note that you can also use below query to find offline data files. The point from above steps is to get the data file triggering the error: SQL> connect / as sysdba
SQL> column file_name format a40;
SQL> column tablespace_name format a12;
SQL> select file_name,file_id,tablespace_name,online_status from dba_data_files order by
tablespace_name, file_id; Even when the temp file is offline, ORA-01110 is seen in alert log or trace file. Run the sql to check temp files and online or drop it. SQL>select file_name, tablespace_name, status from dba_temp_files order by file_name;

一个表空间offline后alert日志报ORA-01135 和ORA-01110的问题的更多相关文章

  1. Oracle误删表空间文件后数据库无法启动

    [问题描述]Oracle误删表空间文件后数据库无法启动,报错表空间文件不存在 [解决办法]sqlplus / as sysdba       #以dba身份登陆数据库shutdown immediat ...

  2. PLSQL 导入表到Oracle------》从一个表空间导入到其它表空间

        在用PLSQL导入.dmp文件到Oracle时出现的问题如下: Import started on 2015/11/18 10:42:44E:\oracle\product\10.2.0\db ...

  3. ORACLE表空间offline谈起,表空间备份恢复

    从ORACLE表空间offline谈起,表空间备份恢复将表空间置为offline,可能的原因包括维护.备份恢复等目的:表空间处于offline状态,那么Oracle不会允许任何对该表空间中对象的SQL ...

  4. 直接删除undo及temp表空间文件后的数据库恢复一例

    前几天,某用户研发找到我,说他们的研发库坏了,问我能恢复不?我问他们做了什么操作,一个小男孩儿说,看到空间满了,清除了点儿数据,我说是不是连数据库的文件也清除了,他说没有,他清除的是ORACLE_HO ...

  5. alert日志报错:ERROR: failed to establish dependency between database RACDB and diskgroup resource ora.DATA.dg

    一.打开数据库alert日志,发现有报错 ERROR: failed to establish dependency between database RACDB and diskgroup reso ...

  6. oracle imp导入数据到另一个表空间

    http://blog.163.com/darlingchenlin@126/blog/static/7156283420100531431855/ 1.在第一个数据库导出数据:qlyg_xs_db_ ...

  7. oracle新建一个表空间和用户来測试

    首先对表空间作例如以下说明 暂时表空间:是在做大数据量排序时.分组操作时用的.正常这些都是在内存中完毕的.但在大数据量排序处理时.内存不够用的情况下就会用到暂时表空间,这里是不存放表的,有点类似于操作 ...

  8. oracle如何将数据导入到另一个表空间

    某个用户的数据在USER表空间里,如果多个用户的数据都在USERS表空间内,将严重影响系统性能,一般在系统迁移的时候,在新的系统里希望导入 一个独立的用户表空间,但是经常无法导入用户指定的缺省表空间, ...

  9. 关于ORALCE一个表空间的数据导入到另一个表空间的方法(原创)

    用户:   whnaproject     所属表空间: whnaproject 新用户   : wniec            所属新表空间: wniec 要求:将用户whnaproject中的数 ...

随机推荐

  1. 描述 Machine.Config 和 Web.Config(转载)

    NET Framework 提供的配置管理包括范围广泛的设置,允许管理员管理 Web 应用程序及其环境.这些设置存储在 XML 配置文件中,其中一些控制计算机范围的设置,另一些控制应用程序特定的配置. ...

  2. jquery点击回到页面顶部方法

    1.代码实例 <!DOCTYPE html> <html lang="en"> <head> <meta charset="UT ...

  3. Orchard运用 - 整合多说评论插件

    曾经我在一随笔讲述如何整合第三方Disqus评论插件,不过这一插件不是本土,对中国客户毕竟有点别扭.比如这一随笔就提到为啥要选择多说 - 另外一个国内比较知名的评论插件. 今天跟大家分享如何用最简单的 ...

  4. go语言基础之递归实现数字累加

    1.实现1+100 = 5050 示例: package main import "fmt" //实现1+2+3+……100 func test01() (sum int) { f ...

  5. jquery的$.each()

    each()方法能使DOM循环结构简洁,不容易出错.each()函数封装了十分强大的遍历功能,使用也很方便,它可以遍历一维数组.多维数组.DOM, JSON 等等在javaScript开发过程中使用$ ...

  6. Node.js:Web模块、文件系统

    一.web模块 Web服务器一般指网站服务器,是指驻留于因特网上某种类型计算机的程序,Web服务器的基本功能就是提供Web信息浏览服务.它只需支持HTTP协议.HTML文档格式及URL,与客户端的网络 ...

  7. (剑指Offer)面试题43:n个骰子的点数

    题目: 把n个骰子仍在地上,所有骰子朝上一面的点数之和为s.输入n,打印出s的所有可能的值出现的概率. 思路: s可能出现的值的范围为:n--6*n 1.全排列 回溯法枚举n个骰子(6面)的全排列,然 ...

  8. 广州高清卫星地图 用百度卫星地图server下载 含标签、道路数据叠加 可商用

    广州高清卫星地图的地图展示图片各自是15级别.17级别.19级别的地图.一般来说17级别的地图图片就行用于商用.地图包包括一整张高级别的图片,如要全图浏览请用专业图片处理软件PS等打开. 一般来说互联 ...

  9. USD Series: Installation

    Today I would like to talk is Unified Service Desktop. It was published in Dynamics CRM 2013 Spring ...

  10. TP框架中关于if、else 分支结构逻辑错误

    TP框架中关于if.else 分支结构逻辑错误 代码中没有任何错误 将注释往下一行就可以解决 造成问题的原因: TP框架中 想分配变量可以使用assign方法 在[模块]中: $this->as ...