title: How to identify all stored procedures refering a particular table in Oracle
body: <p>I am working with Oracle 12c and need to find all references where a specific table or view is being used in <em>Stored Procedure/Function</em> and <em>packages</em>.</p>
  
  <p>I have found a this <a href="https://stackoverflow.com/questions/7272157/how-to-identify-all-stored-procedures-refering-a-particular-table">answer about MS SQL Server</a>, but it's <strong>not</strong> related to <strong>Oracle</strong>, besides <code>sp_help</code> and <code>sp_depends</code> sometimes return inaccurate results.</p>
  
  <p>I know to search in column <code>text</code> of table <code>all_source</code>, for example, this code (search only standard user defined package names, not system package):</p>
  
  <pre><code>SELECT   type, name, line, text 
     FROM  all_source 
     WHERE type = 'PACKAGE BODY'
       AND name like 'P%' 
       AND UPPER(text) like '%' || p_table_or_view_name || '%'
     ORDER BY name, line;
  </code></pre>
  
  <p>but I'm looking if there's a more elegant and/or standard solution in <strong>Oracle</strong>.</p>
  
  <p>I'm also checking if this <a href="https://stackoverflow.com/questions/21236433/how-to-list-all-the-tables-used-in-a-particular-stored-procedure-in-oracle">answer</a> can help me in any way.</p>
  
  <p>I will appreciate any assistance.</p>