[SQL Server] Afficher le dernier démarrage de l'instance SQL Server
/** Afficher le dernier démarrage de l'instance SQL Server **/
-------------------------------------------------
-- SQL Server 2000
-------------------------------------------------
SELECT MIN(login_time) AS DernierDemarrageInstanceSQL
FROM master.dbo.sysprocesses
-------------------------------------------------
-- SQL Server 2005
-------------------------------------------------
SELECT DATEADD(second,-ms_ticks / 1000,GETDATE()) AS DernierDemarrageInstanceSQL
FROM sys.dm_os_sys_info;
-------------------------------------------------
-- SQL Server 2008 et versions ultérieures
-------------------------------------------------
SELECT sqlserver_start_time AS DernierDemarrageInstanceSQL
FROM sys.dm_os_sys_info