How to programmatically find out when the SQL Server service started?
Venkat Raju 0
Everytime SQL Server starts, it recreates the tempdb database. So, the creation date and time of the tempdb database tells us the date and time at which SQL Server service started. This information is stored in the crdate column of the sysdatabases table in master database. Here's the query to find that out:SELECT crdate AS 'SQL Server service started approximately at:'FROM master.dbo.sysdatabasesWHERE name = 'tempdb'