Finding Real Dependencies

  • Comments posted to this topic are about the content posted at http://qa.sqlservercentral.com/columnists/spopovski/findingrealdependencies.asp

  • Overall I think this is a very good start.

    One thing to keep in mind is that proc names can contain embeaded underscore characters (i.e. update_company), which when used in a LIKE match can cause problems unless they are properly escaped (i.e. _ becomes [_]). It is also valid to include statement terminators immediately after the proc name (i.e. exec run_me; )

    With these two points in mind, I have updated the ad-hock query WHERE comparision to look like:

    WHERE #T1.ProcText LIKE '%' + Replace(T2.DependOnProc,'_','[_]') + '[' + char(9)+ char(10)+ char(13)+ char(32) + char(59) + ']%'

    (be sure to add back in the plus characters for string concatination between each of the substring elements above -- looks like the forum software doesn't like this...)

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply