--查看存储过程源代码
IKKI@ test10g> select text from user_source where name='ADD_DEPT';
TEXT
--------------------------------------------------------------------------------
procedure add_dept
(dno number, dname varchar2 default null,
loc varchar2 default null)
is
begin
insert into dept values (dno,dname,loc);
exception
when dup_val_on_index then
raise_application_error(-20000,'bu neng chongfu');
end;
10 rows selected.
--查看依赖关系
IKKI@ test10g> select name,type from user_dependencies
2 where referenced_name='EMP';
NAME TYPE
------------------------------ -----------------
QUERY_EMPLOYEE PROCEDURE
GET_SAL FUNCTION
GET_INFO FUNCTION
--列出当前用户的子程序
IKKI@ test10g> col object_name format a20
IKKI@ test10g> select object_name,created,status from user_objects
2 where object_type in ('PROCEDURE','FUNCTION');
OBJECT_NAME CREATED STATUS
-------------------- ------------ -------
RAISE_SALARY 15-OCT-13 INVALID
DEPTREE_FILL 15-OCT-13 VALID
QUERY_EMPLOYEE 15-OCT-13 VALID
COMPUTE 15-OCT-13 VALID
GET_USER 15-OCT-13 VALID
GET_SAL 15-OCT-13 VALID
GET_INFO 15-OCT-13 VALID
7 rows selected.
--重新编译无效对象
alter procedure|function|view <object_name>compile;