• Michael Valentine Jones (11/13/2012)


    This code gives the start time for the OS, SQL Server, and SQL Server Agent, and gives the uptime days for the OS, SQL Server, and SQL Server Agent.

    ....

    Michael,

    Pretty neat query this one - hadn't thought to get OS start time from dm_os_sys_info ticks.:cool:

    Since it returns just one row, it is also handy for registred-server batch queries. After a powercut, you can tell immediately which servers had Windows interrupted and which one just SQL services.

    Cheers,

    JohnA

    MCM: SQL2008