Solved

searching package bodies for pl/sql statement

Posted on 2013-01-25
2
514 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.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Oracle RAC 12c 8 73
Oracle sql query 7 61
How to free up undo space? 3 41
Oracle dataguard 5 32
How to Unravel a Tricky Query Introduction If you browse through the Oracle zones or any of the other database-related zones you'll come across some complicated solutions and sometimes you'll just have to wonder how anyone came up with them.  …
Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
This video explains at a high level about the four available data types in Oracle and how dates can be manipulated by the user to get data into and out of the database.
This video shows information on the Oracle Data Dictionary, starting with the Oracle documentation, explaining the different types of Data Dictionary views available by group and permissions as well as giving examples on how to retrieve data from th…

810 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