Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 527
  • Last Modified:

searching package bodies for pl/sql statement

Is there a way to search all package bodies for a pl/sql statement?  Such as "insert into tablename"
0
Michael
Asked:
Michael
1 Solution
 
EikromanCommented:
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
 
MichaelAuthor Commented:
Thanks, have a good day!
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now