Skip to content

Instantly share code, notes, and snippets.

@yurifedoseev
Last active August 29, 2015 14:25
Show Gist options
  • Save yurifedoseev/0239cd552cc114ceca3e to your computer and use it in GitHub Desktop.
Save yurifedoseev/0239cd552cc114ceca3e to your computer and use it in GitHub Desktop.
Usage in sql
-- find object usage in stored procedures and functions
select * from INFORMATION_SCHEMA.ROUTINES e
where OBJECT_DEFINITION(OBJECT_ID(e.SPECIFIC_SCHEMA + '.' + e.SPECIFIC_NAME)) LIKE '%ObjectName%';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment