how to output date of when a SP was created and last modification?

  • Hi everyone

    I have a query that gives me the list of all SP in my DB.  I would like to modify the query so it outputs two additional fields:

    1. When was the SP created (call it CREATION_DATE)?

    2. When was the SP last updated (call it LAST_UPDATE_DATE)?

    Is this possible?  If yes, how would I modify my query below?

    SELECT  [NAME] as STORED_PROCEDURE
    FROM SYSOBJECTS
    WHERE TYPE = 'P' AND CATEGORY = 0
    ORDER BY 1

    Thank you

  • I have made some progress on this.  I had to change the FROM table and now I can see the creation and last modified dates.  However, the query is showing a SP that isn't a SP that I created (sp_ssis_addlogentry).  Where is this coming from?  The old query above didn't show sp_ssis_addlogentry.  Is there a way to modify my query so this SP isn't appearing?  In the end, I only want to see SP that I have created.

    SELECT  [NAME] as STORED_PROCEDURE,
    CREATE_DATE AS CREATE_DATE,
    MODIFY_DATE AS LAST_MODIFIED_DATE
    FROM SYS.OBJECTS
    WHERE TYPE = 'P' --AND CATEGORY = 0
    ORDER BY 1
  • issue fixed.  Adding IS_MS_SHIPPED = 0 removes the SP in question.

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

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