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

java - WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/board/] in DispatcherServlet with name 'appServlet' -

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

android - How to create dynamically Fragment pager adapter -