SysDaemon / SQLMonitor

MIT License
0 stars 0 forks source link

Sys: Server Uptime #6

Open SysDaemon opened 5 months ago

SysDaemon commented 5 months ago

select DATEDIFF(DAY, sqlserver_start_time,convert(datetime,getdate(),103)) AS ServerUpTime from sys.dm_os_sys_info

SysDaemon commented 5 months ago

DECLARE @body VARCHAR(MAX) DECLARE @uptime varchar(15) = ( select DATEDIFF(DAY, sqlserver_start_time,convert(datetime,getdate(),103)) AS ServerUpTime from sys.dm_os_sys_info)

SET @body = ' <!DOCTYPE html>

Instância SQL Server

Server Uptime
' + @uptime + ' dias

E.

e-mail

'