How to printout All Stored procedures in a Database

  • Is there a easy way to printout all the stored procedures in a database? The previous DBA left the firm on short notice and I need to find out which stored procedures(903 total) are being used in production. Thanks in advance.

     

  • do you mean the scripts of the stored procedures or just a list of all the procedures in the database - if it is the former, you can use enterprise manager to script them (either in individual files or a combined one) - if the latter, you can query the db using:

    select * from sysobjects

    where xtype = 'p'

    order by name







    **ASCII stupid question, get a stupid ANSI !!!**

  • thanks. I also want to print to a file with just the name and crdate.

     

  • greene - not sure if you're asking how to get the name etc..but if you are, then the query would be:

    select name, crdate from sysobjects

    where xtype = 'p'

    order by crdate desc

    this will give you most recently created to earliest created order!







    **ASCII stupid question, get a stupid ANSI !!!**

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

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