Search DDL (stored procedures, functions, etc) for keywords


/ Published in: SQL
Save to your folder(s)

Search SQL Server or Oracle database for keyword embedded within stored procedures, functions, triggers, etc.


Copy this code and paste it in your HTML
  1. Oracle:
  2.  
  3. SELECT
  4. TYPE,
  5. name,
  6. line
  7. FROM
  8. user_source -- or dba_source, or all_source
  9. WHERE
  10. UPPER(text) LIKE UPPER('%keyword%');
  11.  
  12.  
  13. SQL Server:
  14.  
  15. SELECT
  16. object_name(id)
  17. FROM
  18. syscomments
  19. WHERE
  20. UPPER(text) LIKE UPPER('%keyword%');

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.