Running Time

  • Hello!

    Is there a variable/sp/function where I can see since when or for how long has been running a server?

    Regards, Angel

  • select dateadd(ss, -1*ms_ticks/1000, getdate()) "server is reunning since" from sys.dm_os_sys_info

  • Thanks for the reply.

    I've checked and sys.dm_os_sys_info exists in SQL 2005, and I'm trying to check some 2000 servers.

    Don't you know if there's something similar for 2000?

    Regards, Angel

  • I've seen a way to do that in 2000, but can't recall where. This is close enough for me:

    select login_time as sqlserver_start_date from sysprocesses where spid = 1

  • the create date of tempdb will tell from when your server has been running, subtract from today for runing time.

    [font="Comic Sans MS"]The GrumpyOldDBA[/font]
    www.grumpyolddba.co.uk
    http://sqlblogcasts.com/blogs/grumpyolddba/

  • Thanks a lot, Lance (and sorry for the big delay on the feedback)

Viewing 6 posts - 1 through 5 (of 5 total)

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