sql server - Finding a literal within a database definition -


a database contains in definition hardcoded literal, should replaced generic function call.

the literal may appear in procedures, triggers, defaults, checks, etc. - "everywhere".

i'm using code find literal:

select name sys.objects  object_definition(object_id) '%hardcodedliteral%' 

i know if code sufficient find occurrences, or if might overseeing occurrences within database ?

you can try this:

select distinct o.name object_name,o.type_desc sys.sql_modules m  inner join sys.objects  o on m.object_id=o.object_id m.definition '%hardcodedliteral%' 

Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -