This is a continuation of a previous blog and in case you have not read that blog, you can read that blog first here.. How to find the last time SQL Server was started? Part l
Windows event Logs
The next method to find the SQL Server start time is finding it through the Windows Event log viewer. Explaining the details of how to open a event log viewer (with pictures) is beyond the scope of this blog. So let me give tell you in short steps. Right-click your computer and choose manage. Under System Tools, expand Event Viewer, choose Windows Logs. Once you are in Windows Logs, choose Application. The main secion of the console displays the events from various applications installed on your server. A SQL Server startup information is displayed as a shown below. The main problem of finding the SQL Server startup information this way is difficult, since you have to go through th list of events.. Since I am aware of the startup time, I could go straight to that date and time in the application log.
sys.dm_os_sys_info Dynamic Management View
This is another way and the most easiest way to find the SQL Server start time and date. The information is readily available by querying the dynamic management view sys.dm_os_sys_info. The column name is sqlserver_start_time. This dmv has been there in SQL Server 2005, but the column sqlserver_start_time is added starting from SQL Server 2008.
Summarizing the 2 parts of the blogs, looking at the Tempdb create time is an option you can choose no matter what SQL Server version you are using. In case of SQL Server 2008 or above, querying the dmv mentioned above is the easiest way to go…
Do you like this site? Like our FB page @ Facebook.com\LearnSQLWithBru so that, you know when there is a new blog post.