Forum Discussion

Gani_TpT's avatar
Gani_TpT
Copper Contributor
Sep 24, 2024
Solved

How do we get DB Creation Date along with Tables/Views/SPs last access history details

I need below details when i connect to my SQL Server.

 

DB Creation Date

Tables/Views/SPs Creation Date

Tables/Views/SPs Last used/accessed  ==> Need history of one/two years when they accessed

connecting to applications host

 

I want all above details in one SQL Query. 

Is that possible to get all the above details in one single query..?

 

  • Gani_TpT 

    DB Creation

    select create_date, *
    from sys.databases

    Object creation

    select create_date, *
    from sys.objects

     

    SQL Server don't log a "access history", so not possible to get the informations.

     

3 Replies

  • olafhelper's avatar
    olafhelper
    Bronze Contributor

    Gani_TpT 

    DB Creation

    select create_date, *
    from sys.databases

    Object creation

    select create_date, *
    from sys.objects

     

    SQL Server don't log a "access history", so not possible to get the informations.

     

    • Gani_TpT's avatar
      Gani_TpT
      Copper Contributor

      Hi olafhelper ,

      Thanks for your reply.

       

      can we get details of DML commands, particularly when was the last SELECT statement executed either from applications or run from sql query window..?

Resources