ETLSQL Queries

To check – How long has your SQL Server has been running since the last SQL Server startup?

By 31/07/2023 December 3rd, 2024 No Comments

To get the information about how long has your server been running since the last SQL Server startup?

 

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

If you are Hire A SQL Developer in Brisbane, Technology Cue is here. Contact us.

Leave a Reply