Online Tutorials & Training Materials | STechies.com
Register Login
Advertisement

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

|| || 1

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

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 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'


Advertisement
Advertisement