Posted By

jstrawther on 04/05/12


Tagged

sql search server Oracle DDL


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

johnw


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


 / Published in: SQL
 

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

  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  

You need to login to post a comment.