注册 登录  
 加关注
   显示下一条  |  关闭
温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!立即重新绑定新浪微博》  |  关闭

PostgreSQL 中文网

 
 
 

日志

 
 

脚本建库导致 Oracle 组件未安装故障案例  

2011-02-18 20:38:13|  分类: Oracle |  标签: |举报 |字号 订阅

  下载LOFTER 我的照片书  |

 

         这篇记录也是以前在做数据库巡检时,客户数据库的一个故障,
觉得不错,记录分享到博客里。     
  

1 问题描述
      今天数据库应用人员在编译存过时,报以下错误
PACKAGE BODY TXCZ10.BILLELEMENT_TYPE 编译错误错误:
PLS-00201: 必须说明标识符 'XMLDOM.DOMDOCUMENT'行:5

2 应用影响
      系统关键应用不可用。

3 背景
      由于客户数据库有坏块,后来不得已帮客户重新创建了一个数据库,至于原库坏块的详细信息,详
见我的上篇博文(http://francs3.blog.163.com/blog/static/405767272011118819481/),由于使用dbca
图形化界面创建数据库时遇到问题,网上找了半天也没有可行方法,后来通过脚本建库的。手工建库的
脚本以下仅列出建库的SQL,和导入的SQL,其它信息省略

3.1 建库脚本
CREATE DATABASE myschema
CONTROLFILE REUSE
USER SYS IDENTIFIED BY myschema155
USER SYSTEM IDENTIFIED BY myschema155       
LOGFILE GROUP 1 ('/dev/vg01/rlvredolog11', '/dev/vg01/rlvredolog12') SIZE 512M,
        GROUP 2 ('/dev/vg01/rlvredolog21', '/dev/vg01/rlvredolog22') SIZE 512M,
        GROUP 3 ('/dev/vg01/rlvredolog31', '/dev/vg01/rlvredolog32') SIZE 512M,
        GROUP 4 ('/dev/vg01/rlvredolog41', '/dev/vg01/rlvredolog42') SIZE 512M,
        GROUP 5 ('/dev/vg01/rlvredolog51', '/dev/vg01/rlvredolog52') SIZE 512M,
        GROUP 6 ('/dev/vg01/rlvredolog61', '/dev/vg01/rlvredolog62') SIZE 512M
MAXLOGFILES 6
MAXLOGMEMBERS 5
MAXLOGHISTORY 1 
MAXDATAFILES 1000
MAXINSTANCES 1
CHARACTER SET UTF8
NATIONAL CHARACTER SET UTF8
DATAFILE '/dev/vg01/rmyschema_system_01.dbf' SIZE 3130M AUTOEXTEND OFF
SYSAUX DATAFILE '/dev/vg01/rmyschema_sysaux_01.dbf' SIZE 3130M AUTOEXTEND OFF
DEFAULT TEMPORARY TABLESPACE temp
      TEMPFILE '/dev/vg01/rmyschema_temp_01.dbf'
      SIZE 5140M AUTOEXTEND OFF
UNDO TABLESPACE UNDOTBS1
      DATAFILE '/dev/vg01/rmyschema_undo_01.dbf'
      SIZE 10240M AUTOEXTEND OFF;

3.2导入数据字典   
@?/rdbms/admin/catalog.sql;
@?/rdbms/admin/catproc.sql;
@?/rdbms/admin/pupbld.sql;

   根据 ORA 报错信息,猜测可能是组件不正常。
 
4 查询新库和老库组件
4.1 新库(myschema)组件
Oracle9i CataLog Views       9.2.0.8.0
Oracle9i Package and Type    9.2.0.8.0

4.2 原库(myschema)组件(老库还在的,新库建好后,暂时没删掉。)
15:34:02 SYS@myschema> select comp_name, status, substr(version,1,10) as version from dba_registry;

COMP_NAME
                                                                                        STATUS      VERSION
-------------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------- ----------- -------------------
Oracle9i Catalog Views
                                                                                       VALID       9.2.0.7.0
Oracle9i Packages and Types
                                                                                        VALID       9.2.0.7.0
Oracle Workspace Manager
                                                                                        VALID       9.2.0.1.0
JServer JAVA Virtual Machine
                                                                                        VALID       9.2.0.7.0
Oracle XDK for Java
                                                                                        VALID       9.2.0.9.0
Oracle9i Java Packages
                                                                                        VALID       9.2.0.7.0
Oracle interMedia
                                                                                        VALID       9.2.0.7.0
Spatial
                                                                                        VALID       9.2.0.7.0
Oracle Text
                                                                                        VALID       9.2.0.7.0
Oracle XML Database
                                                                                        VALID       9.2.0.7.0
Oracle Ultra Search
                                                                                        VALID       9.2.0.7.0
Oracle Data Mining
                                                                                        VALID       9.2.0.7.0
OLAP Analytic Workspace
                                                                                        UPGRADED    9.2.0.7.0
Oracle OLAP API
                                                                                        UPGRADED    9.2.0.7.0
OLAP Catalog
                                                                                        VALID       9.2.0.7.0

     从上面可以清楚地看到,通过脚本手工创建的数据库少装了很多组件,现在考虑如何装上以下组件
     1 JServer JAVA Virtual Machine         2 Oracle XML Database
     如果问题不能快速解决,都打算暂时迁回到老库去(将新库数据导入)。


5 后来在老大的指导下,通过以下步骤解决
停止实例。
停listener
启动1个实例。
connect / as sysdba
startup mount
alter system set "_system_trig_enabled" = false scope=memory;
alter database open;

-- if jvm not installed,install jvm
@?/javavm/install/initjvm.sql

-- install XML (xdk for java)
@?/xdk/admin/initxml.sql
select comp_id,comp_name,version,status from dba_registry;
 
SQL> select comp_name, status, substr(version,1,10) as version
  2    from dba_registry;

COMP_NAME
--------------------------------------------------------------------------------
STATUS                 VERSION
---------------------- ----------------------------------------
Oracle9i Catalog Views
VALID                  9.2.0.8.0

Oracle9i Packages and Types
VALID                  9.2.0.8.0

JServer JAVA Virtual Machine
VALID                  9.2.0.8.0

COMP_NAME
--------------------------------------------------------------------------------
STATUS                 VERSION
---------------------- ----------------------------------------
Oracle XDK for Java
VALID                  9.2.0.10.0

    新装组件后,应用重新编译存过通过,然后通知应用人员进行了系统测试,测试正常。

  评论这张
 
阅读(26123)| 评论(0)
推荐 转载

历史上的今天

在LOFTER的更多文章

评论

<#--最新日志,群博日志--> <#--推荐日志--> <#--引用记录--> <#--博主推荐--> <#--随机阅读--> <#--首页推荐--> <#--历史上的今天--> <#--被推荐日志--> <#--上一篇,下一篇--> <#-- 热度 --> <#-- 网易新闻广告 --> <#--右边模块结构--> <#--评论模块结构--> <#--引用模块结构--> <#--博主发起的投票-->
 
 
 
 
 
 
 
 
 
 
 
 
 
 

页脚

网易公司版权所有 ©1997-2016