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.
| 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 1980blog: http://weblogs.sqlteam.com/mladenp |
 |
|
|
X002548
Not Just a Number
15586 Posts |
|
|
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. |
 |
|
|
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. |
 |
|
|
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. |
 |
|
|
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. |
 |
|
|
|
|
|