Ad Code

How to check the time the SQL Server was restarted

How to check the time when the SQL Server was restarted

Several different scripts to check the time the SQL Server was restarted are shared in thispost.

 
Scripts:
 
SELECT login_time FROM sys.dm_exec_sessions WHERE session_id = 1
GO
 
 
SELECT sqlserver_start_time FROM sys.dm_os_sys_info
GO
 
 
SELECT create_date FROM sys.databases WHERE name = 'tempdb'
GO
 
 
SELECT start_time FROM sys.traces WHERE is_default =
GO
 
 
SELECT crdate FROM sysdatabases WHERE name='tempdb' 
GO

Post a Comment

0 Comments

Close Menu