Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 simple question

Author  Topic 

ruchika
Starting Member

3 Posts

Posted - 2007-09-07 : 11:57:34
how can we know if database has been used or not ?

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2007-09-07 : 11:59:10
when people connect to it?

_______________________________________________
Causing trouble since 1980
blog: http://weblogs.sqlteam.com/mladenp
Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 2007-09-07 : 13:14:09
maybe if you dust for fingerprints?



Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx

Add yourself!
http://www.frappr.com/sqlteam



Go to Top of Page

Zoroaster
Aged Yak Warrior

702 Posts

Posted - 2007-09-07 : 14:08:11
quote:
Originally posted by ruchika

how can we know if database has been used or not ?



Please explain what you mean by "used"? If you are looking for active connections there are several ways, SELECT @@CONNECTIONS for example.



Future guru in the making.
Go to Top of Page

ruchika
Starting Member

3 Posts

Posted - 2007-09-07 : 22:07:32
Thank you for ur suggestion..

we have many database on the server. Management told me that some of them are n't used.Even they don't know which database in the server aren't used. I noted down log back up files but didn't give me clue. SO how can i know if anyone is using that database now or not.
Go to Top of Page

rmiao
Master Smack Fu Yak Hacker

7266 Posts

Posted - 2007-09-07 : 22:48:59
Check connections with sp_who2, db is not currently used if it's not shown in the result. Then find any datetime column in those dbs to check max date. If that value is old date, you can set db to read only and for dba use only. If no one complaints for couple of days, back it up and take it offline.
Go to Top of Page

ruchika
Starting Member

3 Posts

Posted - 2007-09-08 : 19:46:37
Thank you. I will try checking sp_who2 and max_date in the tables.And eventually set it to readonly.
Go to Top of Page
   

- Advertisement -