• tt-615680 (8/10/2011)


    Hi All,

    I'm trying to work out how to find out where and how many times a particular stored procedure is located, I thought I can find out in the sys objects tables but I guess I was wrong. I would be very grateful if some would let me know please.

    Thank you,

    Tizita

    In your post, it is not clear whether you are searching within a single database or all the databases.

    If you are searching for multiple occurances of a stored procedure within a single database...

    I think the stored procedure is created on different schemas. Join sys.schemas to sys.objects. That should give you correct result.

    If you are searching all the databases use sp_msforeachdb.