在pl/sql developer中,右键点击一个存储过程,在菜单中点击recompile就可以编译这个存储过程。
现在我希望写一个批处理的程序,在需要的时候自动执行编译过程,请问如何做?
现在我希望写一个批处理的程序,在需要的时候自动执行编译过程,请问如何做?
解决方案 »
- 求条SQL语句,我做的都想吐了,在线等达人。。
- jdbc读表数据
- 哪位高手帮我看看这是什么原因造成的啊ORA-00600: internal error code, arguments: [opiexe:NROC], [],
- backup 函数
- 对数据中的某张表进行遍历
- 通过ODBC和另外一个关系数据库相连,操作另外一数据库的表??怎么办阿?
- sql优化
- SQL查询语句遇到麻烦了,各位大侠高手帮帮忙呀!!!!!!!
- exp username/password@conname file=d:\aa\aa.dmp full=y 后,如何恢复他呢?(初学) ?
- 哪位高手帮我看一下这个过程?编译通过了,可是执行老是出错!真讨厌!
- 知道所有的叶子结点,如何找到拥有这些叶子的全部的树!急!!急!!急!!在线等
- 为什么单点登录(sso)页面,第一次密码输入错误,再次输入也进不去?
2 cursor cur_invalid_objects is
3 select object_name,object_type from user_objects where status = 'INVALID';
4 rec_columns cur_invalid_objects%rowtype;
5 err_status numeric;
6 begin
7 dbms_output.enable(10000);
8 open cur_invalid_objects;
9 loop
10 fetch cur_invalid_objects into rec_columns;
11 exit when cur_invalid_objects%notfound;
12 dbms_output.put_line
13 ('Recompiling ' || rec_columns.object_type || ' ' || rec_columns.object_name);
14 dbms_ddl.alter_compile(rec_columns.object_type,null,rec_columns.object_name);
15 end loop;
16 close cur_invalid_objects;
17 exception
18 when others then
19 begin
20 err_status:=sqlcode;
21 dbms_output.put_line('Recompilation failed :' || sqlerrm(err_status));
22 if (cur_invalid_objects%isopen) then
23 close cur_invalid_objects;
24 end if;
25 exception when others then
26 null;
27 end;
28 end reCompile;
29 /Procedure createdSQL>