When did my SQL Server Service Restart?

If you like to keep a track of when your SQL Server Service Restarted or when the TempDB table was created again, here's these queries for you

SQL Server Service Last Restart Time


SELECT MIN(login_time) FROM master..sysprocesses




When was TempDB last recreated?


SELECT CrDate as TempDBRecreated


FROM sys.sysdatabases


WHERE name = 'tempdb'


No comments:

Post a Comment