Is there any query that I can run that will give me server uptime ? I know
when i run srvinfo, it shows me the server uptime at the end. I want to know
if I can just get that piece of info without the rest that I can then run on
multiple servers using TSQL.
Thanks
I believe this returns the time SQL Server was started:
SELECT login_time FROM sysprocesses
WHERE spid = 1
Roman
Roman Rehak
http://sqlblog.com/blogs/roman_rehak
"Hassan" <hassan@.hotmail.com> wrote in message
news:uf$7R%23RvHHA.4796@.TK2MSFTNGP04.phx.gbl...
> Is there any query that I can run that will give me server uptime ? I know
> when i run srvinfo, it shows me the server uptime at the end. I want to
> know if I can just get that piece of info without the rest that I can then
> run on multiple servers using TSQL.
> Thanks
>
Showing posts with label uptime. Show all posts
Showing posts with label uptime. Show all posts
Monday, March 12, 2012
Query to give me Server Uptime
Is there any query that I can run that will give me server uptime ? I know
when i run srvinfo, it shows me the server uptime at the end. I want to know
if I can just get that piece of info without the rest that I can then run on
multiple servers using TSQL.
ThanksI believe this returns the time SQL Server was started:
SELECT login_time FROM sysprocesses
WHERE spid = 1
Roman
--
Roman Rehak
http://sqlblog.com/blogs/roman_rehak
"Hassan" <hassan@.hotmail.com> wrote in message
news:uf$7R%23RvHHA.4796@.TK2MSFTNGP04.phx.gbl...
> Is there any query that I can run that will give me server uptime ? I know
> when i run srvinfo, it shows me the server uptime at the end. I want to
> know if I can just get that piece of info without the rest that I can then
> run on multiple servers using TSQL.
> Thanks
>
when i run srvinfo, it shows me the server uptime at the end. I want to know
if I can just get that piece of info without the rest that I can then run on
multiple servers using TSQL.
ThanksI believe this returns the time SQL Server was started:
SELECT login_time FROM sysprocesses
WHERE spid = 1
Roman
--
Roman Rehak
http://sqlblog.com/blogs/roman_rehak
"Hassan" <hassan@.hotmail.com> wrote in message
news:uf$7R%23RvHHA.4796@.TK2MSFTNGP04.phx.gbl...
> Is there any query that I can run that will give me server uptime ? I know
> when i run srvinfo, it shows me the server uptime at the end. I want to
> know if I can just get that piece of info without the rest that I can then
> run on multiple servers using TSQL.
> Thanks
>
Query to give me Server Uptime
Is there any query that I can run that will give me server uptime ? I know
when i run srvinfo, it shows me the server uptime at the end. I want to know
if I can just get that piece of info without the rest that I can then run on
multiple servers using TSQL.
ThanksI believe this returns the time SQL Server was started:
SELECT login_time FROM sysprocesses
WHERE spid = 1
Roman
Roman Rehak
http://sqlblog.com/blogs/roman_rehak
"Hassan" <hassan@.hotmail.com> wrote in message
news:uf$7R%23RvHHA.4796@.TK2MSFTNGP04.phx.gbl...
> Is there any query that I can run that will give me server uptime ? I know
> when i run srvinfo, it shows me the server uptime at the end. I want to
> know if I can just get that piece of info without the rest that I can then
> run on multiple servers using TSQL.
> Thanks
>
when i run srvinfo, it shows me the server uptime at the end. I want to know
if I can just get that piece of info without the rest that I can then run on
multiple servers using TSQL.
ThanksI believe this returns the time SQL Server was started:
SELECT login_time FROM sysprocesses
WHERE spid = 1
Roman
Roman Rehak
http://sqlblog.com/blogs/roman_rehak
"Hassan" <hassan@.hotmail.com> wrote in message
news:uf$7R%23RvHHA.4796@.TK2MSFTNGP04.phx.gbl...
> Is there any query that I can run that will give me server uptime ? I know
> when i run srvinfo, it shows me the server uptime at the end. I want to
> know if I can just get that piece of info without the rest that I can then
> run on multiple servers using TSQL.
> Thanks
>
Subscribe to:
Posts (Atom)