where is Stored Procedure Body or text stored in metadata

  • Hi all

    I want to know where the body or the text of the stored procedure is stored in the sysobjects or syscolumns or somewhere else?

    Actually i need to find which stored procedure are using a particular table,

    So i want a list of all stored procedures name which contains that particular table name.

    once i know where the vody or text is stored i can write a query on metadata to get it.

    Thanks.

    :w00t:

  • You can find the text in the syscomments table. You can search for your specific table name in the text column.

    Select *

    from sysobjects A

    JOIN syscomments B

    On A.id = B.id

    where xtype = 'P'

  • Thanks Ken

    It worked.

    :w00t:

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

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