数据库对象失效原因 数据库对象失效的原因很多,下面大致归纳了一些常见的原因: 1: 当被引用对象的结构变更时,都会使得相关的依赖对象转变为INVALID状态. 数据库中的对象(存储过程,函数,包,视图,触发器),它们往往需要直接或者间接的引用其它对象,对象的依赖包括直接和间接二种,其中直接依赖是指存储对象直接依赖于被引用对象,而间接依赖是指对象间接依赖于被引用对象 要查看被引用的对象,可以通过下面SQL查看 SELECT * FROM dba_dependencies WHERE NAME
昨天看有个帖子说到的失效对象重新编译的问题,然后发现自己公司里也出现莫名其妙的失效对象. --创建自动编译失效过程事务记录表 declare tabcnt integer := 0; begin select count(*) into tabcnt from dba_tables where table_name='RECOMPILE_LOG'; if tabcnt = 0 then execute immediate 'create table recompile_log(rdate dat
每次数据库升级之后,都需要对库中的对象进行重新编译一下.下面整理出了一个脚本,只需要执行一下就能批量编译这些失效的对象.需要注意的是:因权限问题,最好是选择sys用户来执行这个脚本,如是plsql developer中执行,记得选择"ALL USERS" [[email protected] ~]$ cat check_compile.sql set heading off; set feedback off; set echo off; Set lines 999;
原博主:http://blog.csdn.net/tianlesoftware/article/details/4843600 Applies to: Oracle Server - Enterprise Edition - Version: 10.1.0.5.0 This problem can occur on any platform. Symptoms: The issue is that the following error was raised : ORA-00600: inter
sqlplus "/as sysdba"@$ORACLE_HOME\RDBMS\ADMIN\utlrp.sql; this script will compile all invalid objects in database 自己编写的一个脚本 $ more check.sqlset head offset pagesize 2000spool comp.sqlselect 'alter '||decode(object_type, 'VIEW', 'VIEW','TRIGGER',