Register Login

Do You have Any Script to Find Out Who Stopped and Restarted SQL Server?

Updated May 18, 2018

Hello Experts,

Do you have any script to find out who stopped and restarted sql server ?

Please let me know if you have.

Thanks in advance.


Comments

  • 02 Nov 2015 3:35 pm Jyoti Pandey Helpful Answer

    Hello follow.

    This commands and if we want more information , you have to event viewer .SELECT sqlserver_start_time FROM sys.dm_os_sys_info; 
    SELECT login_time FROM sys.dm_exec_sessions WHERE session_id = 1; 
    select start_time from sys.traces where is_default = 1 
    SELECT crdate FROM sysdatabases WHERE name='tempdb' 
    SELECT create_date FROM sys.databases WHERE name = 'tempdb'


×