List of SPROCS with creation and alteration times

  • Please could someone donate a T-SQL script that will return the full list of SPROCS in a specified database with their creation and alteration times.

  • SELECT SPECIFIC_CATALOG, SPECIFIC_SCHEMA, SPECIFIC_NAME, ROUTINE_CATALOG, CREATED, LAST_ALTERED

    FROM INFORMATION_SCHEMA.ROUTINES

    WHERE ROUTINE_TYPE = 'PROCEDURE'

    ORDER BY SPECIFIC_NAME

  • I don't really understand what you mean by SPECIFIC_CATALOG and SPECIFIC_SCHEMA.  I am assuming that by SPECIFIC_NAME you mean the database name.  So if I don't have different catalogs and schemas set can I ignore those then? 

  • Copy and paste it into Query Analyzer.  Switch to the database you want to run it in.  Press F5.  You can leave out SPECIFIC_CATALOG, SPECIFIC_SCHEMA, or whatever else you want to leave out; or you can include everything by using *.

  • Last  altered date  is always the same as Created date in SQL 2000. Not sure about 2005 though

     

    Cheers,

     


    * Noel

  • sounds like this is heading the way of the discussed-to-death version control..

    Here's a link to a series of articles by Steve on this...







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

Viewing 6 posts - 1 through 5 (of 5 total)

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