To get the information about how long has your server been running since the last SQL Server startup?
Code: SELECT @@Servername AS ServerName , create_date AS ServerStarted , DATEDIFF(s, create_date, GETDATE()) / 86400.0 AS DaysRunning , DATEDIFF(s, create_date, GETDATE()) AS SecondsRunnig FROM sys.databases WHERE name = 'tempdb'; GO, Snippet:
If you are Hire A SQL Developer in Brisbane, Technology Cue is here. Contact us.