Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2009
    Posts
    5

    Unanswered: Get a List of Last date Database access in SQL Server 2000

    Hi,

    I had tried on my local server for the getting details who are last date accessed database in sql server 2000.

    select b.name as DBName,a.login_time,a.last_batch,a.hostname,a.prog ram_name,a.hostprocess,
    a.nt_domain,a.nt_username,a.net_address,a.net_libr ary,a.loginame
    from sysprocesses a, sysdatabases b where a.dbid=b.dbid order by a.last_batch desc

    Can anyone give me sql script for getting all remote server detail.

    Thanks

  2. #2
    Join Date
    Jun 2009
    Location
    CA, USA
    Posts
    59
    You get the last access after the reboot only...what happens some accessed the database but later you restarted the sql and no one logged in...in this case you get null means it is incorrect result...

    If you want to do for remote servers you can use either BCP/OSQL...
    MohammedU
    SQL Server MVP

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •