January 13, 2012

How to find when SQL Server Service started?

We can find out by query when we started last time SQL Server service.

1st Method

SELECT crdate FROM [master].dbo.sysdatabases
WHERE
Name
= 'tempdb'

2nd Method

SELECT login_time FROM sys.dm_exec_sessions
WHERE
session_id = 1


That’s It.
Enjoy Learning.

No comments:

Post a Comment