Solved

searching package bodies for pl/sql statement

Posted on 2013-01-25
2
509 Views
Last Modified: 2013-01-25
Is there a way to search all package bodies for a pl/sql statement?  Such as "insert into tablename"
0
Comment
Question by:Michael
2 Comments
 
LVL 5

Accepted Solution

by:
Eikroman earned 500 total points
ID: 38818227
Hello,

select * from DBA_SOURCE where type='PACKAGE BODY' and upper(TEXT) like '%INSERT INTO TABLENAME%'; -- as SYSDBA for all packages in db
select * from ALL_SOURCE where type='PACKAGE BODY' and upper(TEXT) like '%INSERT INTO TABLENAME%'; -- as any user for all accessible packages
select * from USER_SOURCE where type='PACKAGE BODY' and upper(TEXT) like '%INSERT INTO TABLENAME%'; -- as any user for own packages

Open in new window


Update: small correction. ALL_SOURCE - for all accessible packages, and USER_SOURCE for own.
0
 

Author Closing Comment

by:Michael
ID: 38818674
Thanks, have a good day!
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

Subquery in Oracle: Sub queries are one of advance queries in oracle. Types of advance queries: •      Sub Queries •      Hierarchical Queries •      Set Operators Sub queries are know as the query called from another query or another subquery. It can …
How to Create User-Defined Aggregates in Oracle Before we begin creating these things, what are user-defined aggregates?  They are a feature introduced in Oracle 9i that allows a developer to create his or her own functions like "SUM", "AVG", and…
Via a live example show how to connect to RMAN, make basic configuration settings changes and then take a backup of a demo database
This video shows how to copy an entire tablespace from one database to another database using Transportable Tablespace functionality.

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now