开发者

How to search strings inside Oracle Procedures, Functions and Triggers?

I need to find strings inside Oracle Procedures, Functions and Triggers.

For SQLServer I use something like this:

SELECT DISTINCT so.name
FROM syscomments sc
INNER JOIN sy开发者_如何学运维sobjects so ON sc.id=so.id
WHERE sc.TEXT LIKE '%m4_plf_par_periodo%'

There is something like this for Oracle?

Give me a clue.

Best Regards,


you can query ALL_SOURCE (contains the source to all programs you have access to).

Alternatively, DBA_SOURCE describes the text source of all stored objects in the database and USER_SOURCE contains the text source of your stored objects only.


See this question for the solution using USER_SOURCE.


Use the "Find Database Object" wizard in free Oracle DB tool "SQL Developer".

To be exact, download and install Oracle SQL Developer from Oracle --> Create a new connection to the database, using a power-user --> In the SQL Developer menu choose "View" --> open menu item "Find DB Object" --> opens a Find Database Object Widget on the left panel --> Choose the DB connection --> Select specific schemas to search --> Select "All Source Lines" node --> type a string to search --> Click Go.

Expect it to do a non-cases-sensitive wild-card search in all source of Triggers/Procedures/Functions/Packages, owned by the selected schema and display a comprehensive search report of sample lines of code from each object where it was located.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜