Wednesday, March 28, 2012

How to get the time since a sql server is running

Do you know any easy way for getting the time that the SQL Server was
running?
Thanks
JavierHi Javier
Look at the creation date for the tempdb database.
In SQL 2005:
select create_date from sys.databases
where name = 'tempdb'
--
HTH
Kalen Delaney, SQL Server MVP
www.InsideSQLServer.com
http://sqlblog.com
"Javier" <ji_villegas@.hotmail.com> wrote in message
news:ACBD90A1-D7B3-4D81-868F-EB2528A10741@.microsoft.com...
> Do you know any easy way for getting the time that the SQL Server was
> running?
> Thanks
> Javier|||You can look at your SQL Server logs as they are created when SQL Server
restarts (although it may be a spill-over of the previous log which may be
too big to fit into one file). Just check the very first entry in the
latest log
"Javier" <ji_villegas@.hotmail.com> wrote in message
news:ACBD90A1-D7B3-4D81-868F-EB2528A10741@.microsoft.com...
> Do you know any easy way for getting the time that the SQL Server was
> running?
> Thanks
> Javiersql

No comments:

Post a Comment