Store Procedure to check database/table last updated

  • Hi,

    Does anyone know which store procedure allow us to check when the database or table last updated?

    Kindly advice.

    Thanks.

    Regards,monkeyDBAWe dont grow when things are easy; We grow when we face challenges.

  • There isn't a reliable, persistent one. You can query the index_usage DMVs, but that's only since the last database start.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • You can try out something like this.

    SELECT name, create_date, modify_date

    FROM sys.objects

    WHERE type = 'U'

    order by modify_date desc

  • mail.pnreddy (3/21/2011)


    You can try out something like this.

    SELECT name, create_date, modify_date

    FROM sys.objects

    WHERE type = 'U'

    order by modify_date desc

    That will give you the date that the object's definition was changed, not the data in the table.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • Thanks for your help on this. The script is really helpful. 😀

    Regards,monkeyDBAWe dont grow when things are easy; We grow when we face challenges.

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

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