December 5, 2003 at 12:00 am
Comments posted to this topic are about the content posted at http://www.sqlservercentral.com/columnists/spopovski/findingrealdependencies.asp
December 18, 2003 at 8:58 am
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...)
May 5, 2023 at 12:04 am
fyi.. THSI ONLY SHOWS THE FIRST sp THAT THE NAMED sp IS CALLING. fOR EXAMPLE IF i HAVE THE FOLLOWING sp
LF5_Job
LF5_Job2
LF5_Job3
LF5_CalcFess
Where LF5_Job calls LF5_Job2 and Lf5_Job2 Calls Lf5_Job3 and LF5_CalcFees
When I run your code for LF5_Job it shows LF5_job2 and that's it. It not only shows just 1 level deep. If I run it for LF5_JOb2 it shows only LF5_Job3 even though within LF5_Job2 there is a call to LF5_Calcfees it shows only LF5_Job3 and I believe it's because it's the first SP that LF5_Job2 calls
Kindest Regards,
Just say No to Facebook!Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy