Last date of server/database access?

  • How can I determine the last date/time a SQL server login accessed a server/database? It's a SQL2K database, and I am trying to track down information on this sql account and whether it's even being used.

    "Got no time for the jibba jabba!"
    -B.A. Baracus

  • You would have better posted this in the sql2000 forum.

    - You could enable "audit login" for all. This reports logins to sqlserver errorlog. (Serverproperties page (Security) in EM)

    - you could start a sql profiler trace only to capture the specific login

    Johan

    Learn to play, play to learn !

    Dont drive faster than your guardian angel can fly ...
    but keeping both feet on the ground wont get you anywhere :w00t:

    - How to post Performance Problems
    - How to post data/code to get the best help[/url]

    - How to prevent a sore throat after hours of presenting ppt

    press F1 for solution, press shift+F1 for urgent solution 😀

    Need a bit of Powershell? How about this

    Who am I ? Sometimes this is me but most of the time this is me

  • no way to go back and do it. You have to be tracking this ahead of time.

    Also, please post in the right version forum. Moved to SQL 2K forum.

  • Sorry about the wrong forum, almost all my work involves 2k5, so I'm used to going straight there.

    Thanks for the info, though. Unfortunately going forward doesn't really help me due to time constraints on finding this info.

    Out of curiosity for future reference, what type of overhead is incurred if I wanted to set up a trace for one login? Does that constantly "run" and hit performance in any way?

    "Got no time for the jibba jabba!"
    -B.A. Baracus

  • The overhead depends on what you trace. Are you getting just login/logoff? Almost no overhead. If you want SQL statements, just get completed and the overhead depends on the load submitted. also requires lots of storage space.

  • For a case such as this, yes, it would be just login/logout. Again, I can't use it in this case, because I need this info by the end of the day, so I don't have the luxury of monitoring for, say, a week to see if this user logs in. We are trying to determine if this database is even still necessary, basically.

    "Got no time for the jibba jabba!"
    -B.A. Baracus

  • If this is a "single user" database, you can also use the db option "auto close". This way you will free up system resources, the db is still available and will be opened at usage time.

    The "open db" event is logged in sqlserver errorlog.

    With respect to backups, you may want to revise the backup schedule for this db. a backup database will need to open it a therefor will cause the "open db" event;

    Maybe Redgates SQLLogRescue (free downloadable for sql2000) can help you in your quest to see when data has been modified the last time by examining the db logfile entries.

    Johan

    Learn to play, play to learn !

    Dont drive faster than your guardian angel can fly ...
    but keeping both feet on the ground wont get you anywhere :w00t:

    - How to post Performance Problems
    - How to post data/code to get the best help[/url]

    - How to prevent a sore throat after hours of presenting ppt

    press F1 for solution, press shift+F1 for urgent solution 😀

    Need a bit of Powershell? How about this

    Who am I ? Sometimes this is me but most of the time this is me

  • Please Checks the Event logs files in SQL2k.

    You can knows that What time server was running....

    bye.

  • ALZDBA (5/6/2008)


    If this is a "single user" database, you can also use the db option "auto close". This way you will free up system resources, the db is still available and will be opened at usage time.

    The "open db" event is logged in sqlserver errorlog.

    Very helpful suggestion, I will keep that one in mind. Thanks!

    "Got no time for the jibba jabba!"
    -B.A. Baracus

Viewing 9 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic. Login to reply