--编译程序包 ALTER PACKAGE package_name COMPILE; ---分别编译程序包PACKAGE和BODY ALTER PACKAGE package_name COMPILE PACKAGE; ALTER PACKAGE package_name COMPILE BODY; --编译视图和触发器 ALTER VIEW <SCHEMA NAME>.<VIEW_NAME> COMPILE; ALTER TRIGGER <SCHEMA).<TRIGGER_NAME> COMPILE; --查看是否有编...
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 ti...
,object_typeFROMdba_objectsWHEREobject_type ='PROCEDURE'ANDstatus ='INVALID')LOOPDBMS_OUTPUT.PUT_LINE(cur.object_name);EXECUTEIMMEDIATE'ALTER '|| cur.object_type||' '|| cur.object_name||' COMPILE';ENDLOOP;END; / 复制 例2: --生成手动编译无效对象的脚本,然后执行脚本。SELECT'ALTER '||OBJ...
Alter function <owner>.<function_name> compile; Alter view <owner>.<view_name> compile; Alter package <owner>.<package_name> compile; Alter package <owner>.<package_name> compile body; Alter materialized view <owner>.<Package_name> Compile; In case you have lots of invalid objects,you ca...
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; ...
-- 重新编译单个存储过程 ALTER PROCEDURE my_procedure COMPILE; -- 重新编译所有无效的存储过程 SELECT 'ALTER PROCEDURE ' || OBJECT_NAME || ' COMPILE;' FROM USER_OBJECTS WHERE STATUS = 'INVALID' AND OBJECT_TYPE = 'PROCEDURE'; 自动重新编译脚本示例: 代码语言:txt 复制 DECLARE v_sql VARCHAR2(40...
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 ...
打开维护模式 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'; ...
select'alterprocedure'||object_name||'compile;'fromall_objects wherestatus='INVALID'andobject_type='PROCEDURE'ANDowner='UNMI'; spooloff @ExecCompProc.sql; 2.写成一个存储过程——让这个存储过程在某个时机执行,比如Job中,代码如下: createorreplaceprocedurecompile_invalid_procedures( p_ownerv...
Invalid SYS objects cannot be recompiled.The issue started with an alert log messages: ORA-04063: package body "SYS.DBMS_SQLTUNE" has errors ORA-06508: PL/SQL: could not find program unit being called: "SYS.DBMS_SQLTUNE".When the DBA tried to recompile this package body (as sysdba), ...