当前位置:操作系统 > Unix/Linux >>

如何编译无效对象

如何编译无效对象
 
1、查找无效对象:
SELECT object_name, object_type FROM dba_objects
WHERE status = 'INVALID';
2、编译无效对象:
手工编译:
ALTER PACKAGE pkg1 COMPILE REUSE SETTINGS;
 
使用PL/SQL Package编译 :
revalidate all invalid objects in the database, in parallel and in dependency order:
begin
   utl_recomp.recomp_parallel();
end;
/
revalidates the procedure  UPDATE_SALARY  in schema HR:
begin
   dbms_utility.validate('HR', 'UPDATE_SALARY', namespace=>1);
end;
/
revalidates the package body HR.ACCT_MGMT:
begin
   dbms_utility.validate('HR', 'ACCT_MGMT', namespace=>2);
end;
/
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,