使用orachk工具检查数据库实例的时候,发现报告里面有类似下面这样一些错误(最近有给Oracle 10g应用补丁PSU 10.2.0.5.180717,不清楚是这个产生的还是其他原因导致),使用脚本检查,发现有很多INVALID对象(具体参考[转载]—Health Check Reports Problem: Dependency$ p_timestamp mismatch for VALID objects (文档 ID 781959.1)

[W] - P_OBJ#=37817 D_OBJ#=38416

[W] - P_OBJ#=38014 D_OBJ#=38605

[W] - P_OBJ#=38020 D_OBJ#=38611

[W] - P_OBJ#=38043 D_OBJ#=38634

[W] - P_OBJ#=38061 D_OBJ#=38652

[W] - P_OBJ#=38064 D_OBJ#=38655

[W] - P_OBJ#=38087 D_OBJ#=38678

[W] - P_OBJ#=38090 D_OBJ#=38681

select 

do.obj# d_obj,do.name d_name, do.type# d_type, 

po.obj# p_obj,po.name p_name, 

to_char(p_timestamp,'DD-MON-YYYY HH24:MI:SS') "P_Timestamp", 

to_char(po.stime ,'DD-MON-YYYY HH24:MI:SS') "STIME", 

decode(sign(po.stime-p_timestamp),0,'SAME','*DIFFER*') X 

from sys.obj$ do, sys.dependency$ d, sys.obj$ po 

where P_OBJ#=po.obj#(+) 

and D_OBJ#=do.obj# 

and do.status=1 /*dependent is valid*/ 

and po.status=1 /*parent is valid*/ 

and po.stime!=p_timestamp /*parent timestamp not match*/ 

order by 2,1;

然后在执行编译一些INVALID对象时遇到了下面错误ORA-04045,如下所示:

SQL> alter public synonym "SM$VERSION" compile;

alter public synonym "SM$VERSION" compile

*

ERROR at line 1:

ORA-00604: error occurred at recursive SQL level 1

ORA-04045: errors during recompilation/revalidation of LBACSYS.LBAC_EVENTS

ORA-04064: not executed, invalidated

ORA-04064: not executed, invalidated package body "LBACSYS.LBAC_EVENTS"

ORA-06508: PL/SQL: could not find program unit being called:

"LBACSYS.LBAC_EVENTS"

ORA-06512: at line 2

ORA-06508: PL/SQL: could not find program unit being called:

"LBACSYS.LBAC_EVENTS"

如下所示,LBACSYS下有很多INVALID对象,最奇怪的是,执行了上面脚本,会触发ORA-04045,似乎还会导致其他会话执行脚本时也触发这个错误:

 

SQL> col comp_name for a36;

SQL> col version for a30;

SQL> col version for a10;

col status for a8;

select comp_id, comp_name, version, status 

from dba_registry 

where comp_name='Oracle Label Security';

 

COMP_ID                        COMP_NAME                            VERSION    STATUS

------------------------------ ------------------------------------ ---------- --------

OLS                            Oracle Label Security                10.2.0.5.0 VALID

 

SQL> 

 

SQL>  select * from v$option where parameter = 'Oracle Label Security';

 

PARAMETER                                                        VALUE

---------------------------------------------------------------- --------------

Oracle Label Security                                            FALSE

 

SQL> 

 

 

Tue Jun 25 20:15:01 HKT 2019

Errors in file /u01/app/oracle/admin/xxx/udump/xxx_ora_11203.trc:

ORA-00604: error occurred at recursive SQL level 1

ORA-04045: errors during recompilation/revalidation of LBACSYS.LBAC_EVENTS

ORA-04064: not executed, invalidated 

ORA-04064: not executed, invalidated package body "LBACSYS.LBAC_EVENTS"

ORA-06508: PL/SQL: could not find program unit being called: "LBACSYS.LBAC_EVENTS"

ORA-06512: at line 2

ORA-06508: PL/SQL: could not find program unit being called: "LBACSYS.LBAC_EVENTS"

ORA-06512: at line 2

 

 

 

[oracle@xxxxx bdump]$ more  /u01/app/oracle/admin/xxxx/udump/xxx_ora_11203.trc

/u01/app/oracle/admin/EPPS/udump/epps_ora_11203.trc

Oracle Database 10g Release 10.2.0.5.0 - 64bit Production

ORACLE_HOME = /u01/app/oracle/product/10.2.0/db_1

System name:    Linux

Node name:      xxxx

Release:        2.6.32-200.13.1.el5uek

Version:        #1 SMP Wed Jul 27 21:02:33 EDT 2011

Machine:        x86_64

Instance name: xxx

Redo thread mounted by this instance: 1

Oracle process number: 48

Unix process pid: 11203, image: oracle@xxxx (TNS V1-V3)

 

*** ACTION NAME:() 2019-06-25 20:15:01.745

*** MODULE NAME:(sqlplus@xxxx (TNS V1-V3)) 2019-06-25 20:15:01.745

*** SERVICE NAME:(SYS$USERS) 2019-06-25 20:15:01.745

*** SESSION ID:(113.2150) 2019-06-25 20:15:01.745

Error in executing triggers on connect internal

*** 2019-06-25 20:15:01.750

ksedmp: internal or fatal error

ORA-00604: error occurred at recursive SQL level 1

ORA-04045: errors during recompilation/revalidation of LBACSYS.LBAC_EVENTS

ORA-04064: not executed, invalidated 

ORA-04064: not executed, invalidated package body "LBACSYS.LBAC_EVENTS"

ORA-06508: PL/SQL: could not find program unit being called: "LBACSYS.LBAC_EVENTS"

ORA-06512: at line 2

ORA-06508: PL/SQL: could not find program unit being called: "LBACSYS.LBAC_EVENTS"

ORA-06512: at line 2

当时参考“ORA-04045: errors during recompilation/revalidation of LBACSYS.LBAC_EVENTS”这篇文章做了如下处理,告警日志里面不会出现ORA-04045错误了,但是如果我使用

上面的语句编译INVALID对象。就又会触发这个错误出现。似乎这种方法是指标不治本

shutdown immediate; 

 

startup migrate; 

 

alter view lbacsys.lbac$all_table_policies compile; 

 

alter package lbacsys.lbac_events compile body; 

 

shutdown immediate; 

 

startup;

最后参考官方文档“ORA-07445 [zllcini] or ORA-04045 in a Database with OLS Set to FALSE (文档 ID 233110.1)“给出解决方案:

ORA-4045 related to LBACSYS.LBAC_EVENTS

---------------------------------------

ORA-00604: error occurred at recursive SQL level 1

ORA-04045: errors during recompilation/revalidation of LBACSYS.LBAC_EVENTS

ORA-06508: PL/SQL: could not find program unit being called

ORA-06512: at line 2

ORA-06508: PL/SQL: could not find program unit being called

ORA-06512: at line 2

Solution Description

--------------------

1. Install Oracle Label Security with the Oracle Universal Installer

2. Run $ORACLE_HOME/rdbms/admin/catnools.sql script to disable OLS

3. Optionally de-install 'The Label Security' software

Explanation

-----------

The Oracle Universal Installer may install OLS components in some cases:

patchset apply

解决方案:

 

1:卸载Oracle Label Security

@?/rdbms/admin/catnools.sql

2:运行/tmp/compiling.lst重编译失效对象

具体参考[转载]—Health Check Reports Problem: Dependency$ p_timestamp mismatch for VALID objects (文档 ID 781959.1)

3:运行@?/rdbms/admin/catols.sql脚本安装Oracle Label Security

第三步可以做也可以不做,是具体情况而定。

参考资料:

http://www.itpux.com/thread-568-1-1.html

ORA-07445 [zllcini] or ORA-04045 in a Database with OLS Set to FALSE (文档 ID 233110.1)

ORA-04045: errors during recompilation/revalidation of LBACSYS.LBAC_EVENTS的更多相关文章

  1. 误删除AUD$所在的表空间,无法切换用户

    问题故障:数据库Open,无法切换普通用户: ---递归SQL无法执行   SQL> conn hr/hr ERROR at line 1: ORA-00604: error occurred  ...

  2. Oracle10g使用$ORACLE_HOME/rdbms/admin/awrrpt.sql报错

    Enter value for report_name: Using the report name awrrpt_1_591_593.htmlselect output from table(dbm ...

  3. 记录一次Oracle导入数据库失败的解决办法,最终报错:UDI-04045、ORA-04045、ORA-01775

    费了很大的工夫,终于解决了.做个记录. ******************************************************************************** ...

  4. Oracle的静默安装 升级和卸载 参考规范

    Oracle的静默安装 升级和卸载 参考规范 20180912 V1 一.Oracle的安装 Oracle产品的三种安装方式分别为: 1.图形化(Java向导)安装引导 2.使用应答文件静默安装 3. ...

  5. Oracle数据库迁移--->从Windows到Linux

    I did a practice to migrate the oracle database from windows to linux operation system. The followin ...

  6. 【RMAN】RMAN跨版本恢复(下)--大版本异机恢复

    [RMAN]RMAN跨版本恢复(下)--大版本异机恢复 BLOG文档结构图 ORACLE_SID=ORA1024G 关于10g的跨小版本恢复参考:http://blog.chinaunix.net/u ...

  7. Oracle Study之--Oracle 单实例11.2.0.1.0升级到11.2.0.3.0

    Oracle Study之--Oracle 单实例11.2.0.1.0升级到11.2.0.3.0 系统环境: 操作系统:RedHat EL6(64位) Oracle:    Oracle 11gR2 ...

  8. 探索Oracle数据库升级6 11.2.0.4.3 Upgrade12c(12.1.0.1)

    探索Oracle数据库升级6 11.2.0.4.3 Upgrade12c(12.1.0.1) 一.前言:       Oracle 12c公布距今已经一年有余了,其最大亮点是一个能够插拔的数据库(PD ...

  9. oracle重新编译失效对像

    重新编译失效对像可执行utlrp.sql文件: SQL> @?/rdbms/admin/utlrp.sql TIMESTAMP --------------------------------- ...

随机推荐

  1. Appium(九):Appium API(三) 滑动和拖拽、高级手势、手机操作

    1. 滑动和拖拽 我们在做自动化测试的时候,有些按钮是需要滑动几次屏幕后才会出现,此时,我们需要使用代码来模拟手指的滑动,也就是接下来要学的滑动和拖拽了. 1.1 swipe滑动事件 从一个坐标位置滑 ...

  2. Git submodule update 命令执行

    git submodule update操作可能导致执行.gitmodules文件中定义的任意shell命令. 受影响的产品 Git版本2.20.0至2.24.0 修复版本 Git v2.24.1,v ...

  3. ASP.NET Core on K8S深入学习(11)K8S网络知多少

    本篇已加入<.NET Core on K8S学习实践系列文章索引>,可以点击查看更多容器化技术相关系列文章. 一.Kubernetes网络模型 我们都知道Kubernetes作为容器编排引 ...

  4. Get提交数据过大,tomcat报错,信息: Error parsing HTTP request header Note: further occurrences of HTTP header parsing errors will be logged at DEBUG level

    原因 get提交的数据过大,超过了默认值. 解决办法 get提交配置 设置tomcat的server.xml.找到我们启动的端口,一般是8080,增加maxHttpHeaderSize= " ...

  5. C# 使用TopShelf实现Windows服务部署

    一.TopShelf介绍 topShelf是创建Windows服务的一种方式,可以方便管理应用服务,最大广泛应用于,数据实时接收,定时推送等. 二.TopShelf使用 1.安装 TopShelf程序 ...

  6. `http-equiv` meta 标签

    来看以下有趣的代码, <!DOCTYPE html> <html lang="en"> <head> <meta http-equiv=& ...

  7. Asp.net Core3.0 跨域配置

    原文:http://www.zilaohu.cn/Jie/Detail_Jie?ID=78840a04-55b8-4988-80b2-f964fd822d63 下面配置后:被拒绝的域请求后,可以进入方 ...

  8. SpringBoot 并发登录人数控制

    通常系统都会限制同一个账号的登录人数,多人登录要么限制后者登录,要么踢出前者,Spring Security 提供了这样的功能,本文讲解一下在没有使用Security的时候如何手动实现这个功能 dem ...

  9. Flask 教程 第十四章:Ajax

    本文翻译自The Flask Mega-Tutorial Part XIV: Ajax 这是Flask Mega-Tutorial系列的第十四部分,我将使用Microsoft翻译服务和少许JavaSc ...

  10. 一文理解Java IO/NIO/AIO

      目录 概述 一.IO流(同步.阻塞) 二.NIO(同步.非阻塞) 三.NIO2(异步.非阻塞) 正文 概述 在我们学习Java的IO流之前,我们都要了解几个关键词 同步与异步(synchronou ...