How do we get all DB and Table current history from SQL Server.?

BeUnique 2,332 Reputation points
2024-03-12T10:48:25.53+00:00

I am currently using many SQL Servers and every SQL server has "n" number of DB's.

In the current situation, we are spending lot of money for unused DB's and SQL account.

we are decided to avoid this situation and company has decided to handle the above details regularly.

To overcome the above, How get the below details in SQL Server.

  1. DB ==> When the DB is created and who is created...? In which application this DB is connecting to..? How many users are currently connecting to...? When is last date are connecting for every user...? If the DB doesn't used for past few months, how to calculate the duration of unused DB's...? when is the last transaction done in the DB...?
    1. Tables/Views/Stored Procedures ==> when is the table/views/sp's are created and who is created in which account....?
  2. what is the last date for every table transaction..?

Also, to check and get whether the current DB's are in use or not used (no transaction and no access from the application)..?

Is it possible to get all the above details..?

Pls. help us to resolve the above queries

SQL Server | Other
{count} votes

1 answer

Sort by: Most helpful
  1. Olaf Helper 47,441 Reputation points
    2024-03-13T06:13:30.6+00:00

    Is it possible to get all the above details..?

    If you haven't implemented an auditing and logging, then you can not get the requested informations.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.