网站首页
JSP空间
动态资讯
开源项目
技术文档
资源下载
J2EE资源
客户论坛
在线支付
 
  技术文档>>数据库技术>>Oracle技术>>Oracle开发>查看文档  
  数据字典表truncate掉将导致数据库不可用     
  文章作者:未知  文章来源:赛迪网技术社区  
  查看:57次  录入:管理员--2008-05-28  
 

【赛迪网-it技术报道】在实际的工作环境下,如果你在操作时将数据库内的几个数据字典表truncate掉,将会直接导致数据库不能再继续使用,本文将针对一个相关案例进行详细的讲解。

案例如下:

数据库环境:oracle数据库9.2.0.7 rac。(注:由于数据库的事务量体别大,所以数据库没有进行备份)。

检查后发现的被截断表:

sql> select object_name,object_type from dba_objects where object_name like 'idl%';

object_name            object_type
------------------- ------------------
idl_char$                 table
idl_sb4$                  table
idl_ub1$                  table
idl_ub2$                  table

idl_ub1$表是特别重要的字典表,只要出现故障,数据库就会出现大量的ora-00600错误,所有事务将不能进行。

ora-00600: internal error code, arguments: [17069],

[0xc0000000dddfa690], [], [], [], [], [], []

ora-600 17069错误是一个特别难解决的问题,问题出现后数据库的某个跟踪日志很快就会出现暴涨的情况,因为idl系列字典表是记录数据库对象编译信息的,丢失了其中的数据,所有过程、package等都将无法执行。

字典表作用的说明:

idl_ub1$ is one of four tables that hold compiled pl/sql code:

idl_ub1$
idl_char$
idl_ub2$
idl_sb4$

"pl/sql is based on the programming language ada. as a result, pl/sql uses a
variant of descriptive intermediate attributed notation for ada (diana), which
is a tree-structured intermediate language. it is defined using a meta-notation
called interface definition language (idl). diana provides for communication
internal to compilers and other tools.

"at compile time, pl/sql source code is translated into machine-readable
m-code.both the diana and m-code for a procedure or package are stored in the
database.at run time, they are loaded into the shared (memory) pool. the diana is
used to compile dependent procedures; the m-code is simply executed."

these four tables hold the diana and the so-code m-code. i think "m-code" is
short for machine-dependent byte code but there is a sizable machine-indenpendent part

as well. if you have a look at sql.bsq, you can see
that oracle documents the "type" column of these tables as follows:
part number not null,
/* part: 0 = diana, 1 = portable pcode, 
2 = machine-dependentpcode */

如果出现更为严重的情况,它将导致大量系统dbms包失效,其重新编译也将更为复杂。

恢复数据库,消除所有ora-600错误的方法:

恢复的方法是通过运行相关的脚本,重建和重新编译所有procedure/trigger/package等对象,重新生成这些对象的diana和so-code m-code,主要包括catlog.sql,catproc.sql等脚本。

注意:即使以花费大量的时间为代价,一些ora-00600错误也必须解决。

 
 
上一篇: 排除cache影响手动强制刷新buffer cache    下一篇: 配置windows与linux平台的data gurad (1)
  相关文档
带你深入的了解执着并购中的--甲骨文 11-15
通过分析SQL语句的执行计划优化SQL(一) 08-05
Oracle数据库中基本动态Web开发和应用 04-11
通过意向锁多粒度封锁机制进行并发控制 (1) 04-11
创建物化视图提高查询速度 04-11
基于已被证实的oracle高可用性技术maa 03-14
redhat linux as4 安装oracle 10g(包括启动) (1) 08-28
讲解七种数据库中select top的使用方法 06-02
甲骨文撤回67亿美元报价不排除卷土重来 11-15
Oracle 9i应用COMPOSE和UNISTR创建沉音 07-07
讲解oracle优化器的优化方式和优化模式 (1) 03-27
讲解用于描述数据库中需要存储的实体语言 03-14
oracle的共享封锁 独占封锁和共享更新封锁 (1) 05-28
重建oracle数据库控制文件的简单方法 05-13
对系统默认的约束名和索引名进行重命名 03-03
为什么同机安装10g和11g后会出现连接问题 04-17
解析学习Oracle架构所应了解的基础知识 08-05
学习 Oracle过程中几个常见问题的总结 08-05
通过create datafile方式重新创建文件 (1) 02-22
一个完整的oracle rman备份恢复参考示例 05-29
返回首页 | 关于我们 | J网章程 | JSP空间合租 | 客服中心 | 免责声明 | 常见问题 | 参观机房
本站主机空间代理至厦门市华众网络科技有限公司
《中华人民共和国增值电信业务经营许可证》
编号:闽B2-20050079
@2005-2008福建JSP技术网 版权所有 闽ICP备05000928号
厦门(总部):13616026886 福州:0591-87655121
邮箱:admin@fjjsp.com 站长QQ,点击这里给我发消息