Is there way to tell when was sql server stopped? I know i can look in the sql server logs but that only tells me when sql server was started.
thanks
Look on the server's application log in event viewer.
Theoretically the last record should show the request to stop.
This will also work:
Copy the following VB Script code to Notepad, save for example as C:\CheckSQLStop.vbs and run either by itself on the server or specifying the machine name if you have admin rights (that you don't have as you say) or running in Query Analyzer which will execute as SQL Server startup account. This will work on Windows XP and Windows 2003
xp_cmdshell
' Code for CheckSQLStop.vbs
' This is modified example from Scriptomatic Tool - generated code
On Error Resume NextstrComputer = "."Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")Set colItems = objWMIService.ExecQuery("Select * from Win32_NTLogEvent where " _& "Logfile = 'Application' and eventcode = '17147'",,48)For Each objItem in colItems Wscript.Echo "Category: " & objItem.Category Wscript.Echo "CategoryString: " & objItem.CategoryString Wscript.Echo "ComputerName: " & objItem.ComputerName Wscript.Echo "Data: " & objItem.Data Wscript.Echo "EventCode: " & objItem.EventCode Wscript.Echo "EventIdentifier: " & objItem.EventIdentifier Wscript.Echo "EventType: " & objItem.EventType Wscript.Echo "InsertionStrings: " & objItem.InsertionStrings Wscript.Echo "Logfile: " & objItem.Logfile Wscript.Echo "Message: " & objItem.Message Wscript.Echo "RecordNumber: " & objItem.RecordNumber Wscript.Echo "SourceName: " & objItem.SourceName Wscript.Echo "TimeGenerated: " & objItem.TimeGenerated Wscript.Echo "TimeWritten: " & objItem.TimeWritten Wscript.Echo "Type: " & objItem.Type Wscript.Echo "User: " & objItem.UserNext