泉源:赛迪网 作者:Arvin
在梦想的义务环境下,假如你在操作时将数据库内的几个数据字典表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错误也必须筹划。
版权声明:
原创作品,答应转载,转载时请务必以超链接方式标明文章 原始来因 、作者信息和本声明。不然将穷究纪律责任。