Startup

  • Is there a function or way to determine how many seconds have have gone by since server startup.  @@?

     

    I need to calculated some stuff with sys.dm_os_performance_counters and I think the operations/sec counters are cummulative.

     

    Thanks

    -WM

  • You can calculate the uptime using the sysprocesses.

    select

    DateDiff(ss,login_time, getdate())

    from sysprocesses

    where spid = 1

    Markus

    [font="Verdana"]Markus Bohse[/font]

  • thanks

    In addition to that are there any other functions that contain this info?

     

    -WM

  • Since you're using DMVs, I'm assuming this is on SS2005. If so, does the following return what you want?

    SELECT

    ms_ticks / 1000 FROM sys.dm_os_sys_info

     

  • That's what I was looking for thanks

     

    -WM

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

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