Link to home
Start Free TrialLog in
Avatar of goprasad
goprasad

asked on

TSQL script to identify which DB's are active in last 60 days, in SQL server 2005 instance

Hello there,

Please advise TSQL script to identify which DB's are active in last 60 days, in SQL server 2005 instance?

Thanks and Regards
Avatar of goprasad
goprasad

ASKER

Please advise.
Please advise
Avatar of Sharath S
What do you mean by active?
To know if there has been any activity in DB level in last 60 days, so that we determine how many dB's are being actually used.
ASKER CERTIFIED SOLUTION
Avatar of Sara bhai
Sara bhai
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
In that case, based on the last mdf modified date, can we assume that the db is in use?

Please advise.
Please advise.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
So what's the solution? Do you think, by changing the mode to Single User and generate call to Service Desk is the way to find out?

Please advise.
You could set the db(s) OFFLINE and see if any errors are generated.

You could run a trace that captures database names for all SQL procs and queries.
How to run a trace using SQL profiler that captures all the transactions for all the databases in the instance.