object_name || ' COMPILE'; END LOOP; END; / 例2: 代码语言:javascript 复制 --生成手动编译无效对象的脚本,然后执行脚本。 SELECT 'ALTER ' || OBJECT_TYPE || ' ' || OWNER || '.' || OBJECT_NAME || ' COMPILE;' FROM DBA_OBJECTS WHERE STATUS = 'INVALID' AND OBJECT_TYPE IN ('...
object_name || ' COMPILE'; END LOOP; END; / 复制 例2: --生成手动编译无效对象的脚本,然后执行脚本。 SELECT 'ALTER ' || OBJECT_TYPE || ' ' || OWNER || '.' || OBJECT_NAME || ' COMPILE;' FROM DBA_OBJECTS WHERE STATUS = 'INVALID' AND OBJECT_TYPE IN ('PACKAGE','PACKAGE BODY'...
Below is the query to find the invalid objects currently present in the database. set pagesize 200 set lines 200 select owner,object_name,object_type,status from dba_objects where STATUS='INVALID'; 1. Compile all the objects of the database using UTLRP.SQL. This script may take some time...
点第一个,按住shift键点最后一个,右键recompile就OK了
Alter materialized view <owner>.<Package_name> Compile; In case you have lots of invalid objects,you can generate scripts that will generate the sqls for compiling the invalid objects : In sqlplus connect as sys: set heading off spool compileinvalid.sql ...
SQL> @C:UsersAdministratorDesktopaq eCompile.sql; 备注:运行脚本reCompile.sql的时候,会创建另一个脚本run_invalid, 紧跟着执行该脚本,完成编译工作 1. 2. 3. 4. 5. 5 编写PL/SQL利用游标编译 declare v_object_name user_objects.object_name%type; ...
查看当前无效对象 代码语言:javascript 复制 select*from dba_objects t where t.status='INVALID'order by1; 编译无效对象: 有两种方式: 1、执行sql查询结果: 代码语言:javascript 复制 select'alter '||object_type||' '||owner||'.'||object_name||' compile;'from dba_objects t ...
打开维护模式 adadmin->Change Maintenance Mode->1. Enable Maintenance Mode 重新编译APPS Schema Compile/Reload Applications Database Entities menu-> 1. Compile APPS schema 4. 检查无效对象的数量,关闭维护模式,启动应用 SQL> select count(*) from dba_objects where status='INVALID'; ...
ALTER VIEW HKJJW.TEST COMPILE; 如果是index的话,需要重建. alter index index_name rebuild; 如果是package body alter package DBMS_CUBE compile body; 3. 自动生成编译无效对象SQL 1) 统计当前用户无效对象数量: SQL> select owner,object_type,status,count(*) from dba_objects where status='INVALID' gr...
DOC> utlirp.sql completed successfully. All PL/SQL objects in theDOC> database have been invalidated.DOC>DOC> Shut down and restart the database in normal mode and run utlrp.sql toDOC> recompile invalid objects.DOC>###也就是说,这个脚本的作用是使数据库中的PL/SQL对象INVALID,然后通过utlrp....