Results 1 to 4 of 4
  1. #1
    Join Date
    Oct 2005
    Posts
    21

    Red face Unanswered: Get the Sp in a database

    Hi ,
    I need to get list and contents of all the stored procedures present in a table.Is there any way to get it.I tried syscomments table.but how to get the sp name.

  2. #2
    Join Date
    Jan 2004
    Posts
    545
    Provided Answers: 4
    select name from <dbname>..sysobjects
    where type like "P%"

    This gives you all stored procedures in a database.
    I'm not crazy, I'm an aeroplane!

  3. #3
    Join Date
    Oct 2005
    Posts
    21
    Thank you,
    It worked..

  4. #4
    Join Date
    Mar 2006
    Posts
    25

    Cool

    u can get list of stored procedures using following query

    select name from sysobjects where type="P"

    and content of this stored procedures by using

    sp_helptext storedprocedurename

    Quote Originally Posted by Nura
    Hi ,
    I need to get list and contents of all the stored procedures present in a table.Is there any way to get it.I tried syscomments table.but how to get the sp name.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •