469,081 Members | 1,808 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,081 developers. It's quick & easy.

last time someone connected to a database

Hello all,

Is there a way to figure out when was the last time someone connected to
a database? SQL 2000 environment.

Thanks,
Raziq.

*** Sent via Developersdex http://www.developersdex.com ***
Aug 11 '05 #1
5 2269
Raziq Shekha (ra**********@anadarko.com) writes:
Is there a way to figure out when was the last time someone connected to
a database? SQL 2000 environment.


You would have to set up a trace with Profiler or the sp_trace_xxx routines
to track this.
--
Erland Sommarskog, SQL Server MVP, es****@sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp

Aug 11 '05 #2
Thanks Erland. But setting up a trace will only tell me when someone
logs on to a database in the future. I don't think it will tell me
whether someone logged on to a database last week.

What I am trying to do is to determine whether there are any databases
to which no one has connected to in a long time. And if that is the
case, I can try and get rid of those databases.

Thanks,
Raziq.


*** Sent via Developersdex http://www.developersdex.com ***
Aug 11 '05 #3
Raziq Shekha (ra**********@anadarko.com) writes:
Thanks Erland. But setting up a trace will only tell me when someone
logs on to a database in the future. I don't think it will tell me
whether someone logged on to a database last week.
Correct. The information you are asking for, is not available unless
you collect it.
What I am trying to do is to determine whether there are any databases
to which no one has connected to in a long time. And if that is the
case, I can try and get rid of those databases.


Be aggressive! Find the most suspicious ones, set them offline, and
see if someone screams!
--
Erland Sommarskog, SQL Server MVP, es****@sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp

Aug 11 '05 #4
LOL. I like the way you think :)

Thanks,
Raziq.
*** Sent via Developersdex http://www.developersdex.com ***
Aug 11 '05 #5
LOL. I like the way you think :)

Thanks,
Raziq.
*** Sent via Developersdex http://www.developersdex.com ***
Aug 11 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.