ITPub博客

首页 > 数据库 > Oracle > compile invalid object

compile invalid object

原创 Oracle 作者:jackeyliliang 时间:2014-06-11 18:47:29 0 删除 编辑
SQL> select owner, object_name,object_type from dba_objects where status ='INVALID';

OWNER
--------------------------------------------------------------------------------
OBJECT_NAME
--------------------------------------------------------------------------------
OBJECT_TYPE
-----------------------
SOE
ORDERENTRY
PACKAGE BODY


SQL>  alter package  SOE.ORDERENTRY compile body;  

Warning: Package Body altered with compilation errors.

SQL> show errors;
Errors for PACKAGE BODY SOE.ORDERENTRY:

LINE/COL ERROR
-------- -----------------------------------------------------------------
89/11    PL/SQL: Statement ignored
89/11    PLS-00201: identifier 'DBMS_LOCK' must be declared
92/11    PL/SQL: Statement ignored
92/11    PLS-00201: identifier 'DBMS_LOCK' must be declared

SQL> grant execute on SYS.DBMS_LOCK to soe;

Grant succeeded.

SQL>  alter package  SOE.ORDERENTRY compile body;  

Package body altered.

SQL> select owner, object_name,object_type from dba_objects where status ='INVALID';

no rows selected



Other related commad
Alter procedure . compile;
Alter function . compile; 
Alter package . compile;
Alter package . compile body;
Alter package . compile body;

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/26611303/viewspace-1180784/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2012-01-08

  • 博文量
    35
  • 访问量
    28274