How to get Database Last Connection time for SQL server ?

  • Hi,

    How to get Database Last Connection time for SQL server ?

    Also, can we retireve the database information of all servers in my domain through the query?

    Thanks and regards,

    Pramod 

  • pramod - see if this is what you want...

    select program_name, login_time, last_batch, lastwaittype from sysprocesses

    inner join

    sysdatabases on

    sysprocesses.dbid = sysdatabases.dbid

    and sysdatabases.name = 'dbName'

    order by login_time desc







    **ASCII stupid question, get a stupid ANSI !!!**

Viewing 2 posts - 1 through 2 (of 2 total)

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