如果已经知道函数、存储过程、body等plsql的名称,可以通过查询user_source(dba_sourceall_source)取得其源代码
演示过程如下:
ora_test@oracle[/home/oracle]> sqlplus scott/tiger SQL*Plus: Release 10.2.0.1.0 - Production on Tue Mar 16 16:27:27 2010 Copyright (c) 1982, 2005, Oracle. All rights reserved. Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production With the Partitioning, OLAP and Data Mining options scott@CNHTM> col text for a50; scott@CNHTM> scott@CNHTM> select b.line,b.text 2 from USER_SOURCE b 3 where b.name='P_TEST' 4 order by line; LINE TEXT ---------- -------------------------------------------------- 1 procedure p_test is 2 begin 3 dbms_output.enable(999999999); 4 for c in (select * from big_table) 5 loop 6 dbms_output.put_line(c.object_name); 7 end loop; 8 9 end p_test; 9 rows selected. scott@CNHTM> |
--end--
[@more@]来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/22049049/viewspace-1031884/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/22049049/viewspace-1031884/