oracle中取得存储过程、函数等pl sql源码的方法

如果已经知道函数、存储过程、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/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值