Solved

searching package bodies for pl/sql statement

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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Cursors in Oracle: A cursor is used to process individual rows returned by database system for a query. In oracle every SQL statement executed by the oracle server has a private area. This area contains information about the SQL statement and theā€¦
From implementing a password expiration date, to datatype conversions and file export options, these are some useful settings I've found in Jasper Server.
This video shows setup options and the basic steps and syntax for duplicating (cloning) a database from one instance to another. Examples are given for duplicating to the same machine and to different machines
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

829 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