Is there a query I can run to search all packages to see if a particular table and/or column is used in the package? There are too many packages to open each one and do a find on the value(s) I'm looking for.
I know that there is simple way to search a value in all columns by using where condition. Example: Select * from tablename where col1='value' || col2 = 'value' || col3='value' || col4='value'.
To open the Find Database Object pane, right-click a connection name in the Connections navigator and select Find DB Object. You can also click on VIEW and then on FIND DB Object. Get Oracle SQL Developer now with the O'Reilly learning platform.
The easiest way to find all tables in SQL is to query the INFORMATION_SCHEMA views. You do this by specifying the information schema, then the “tables” view. Here's an example. SELECT table_name, table_schema, table_type FROM information_schema.
You can do this:
select * from user_source where upper(text) like upper('%SOMETEXT%');
Alternatively, SQL Developer has a built-in report to do this under:
View > Reports > Data Dictionary Reports > PLSQL > Search Source Code
The 11G docs for USER_SOURCE are here
you can use the views *_DEPENDENCIES
, for example:
SELECT owner, NAME FROM dba_dependencies WHERE referenced_owner = :table_owner AND referenced_name = :table_name AND TYPE IN ('PACKAGE', 'PACKAGE BODY')
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With