Oracle/MSSQL中通过关键字查找所有存储过程


Oracle

查找函数

select t.name,t.text from all_source t where type = 'PROCEDURE' and text like '%var_app_1_pst%'

查找存储过程

select t.name,t.text from all_source t where type = 'FUNCTION' and text like '%var_app_1_pst%'

MSSQL

select b.name 
from 数据库名.dbo.syscomments a, 数据库名.dbo.sysobjects b 
where a.id=b.id  and b.xtype='p' and a.text like '%key words%'
order by name

 

Oracle中,如果关键字是一张表的话,还可以通过表的Referenced by属性找到相关的函数、存储过程和触发器等。

如:

MSSQL类似。

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM