Results 1 to 3 of 3
  1. #1
    Join Date
    Sep 2011
    Posts
    71

    Question Unanswered: Find Last Restart of SQL Server

    Problem

    How can I tell when my SQL Server instance was last started? In this tip we look at various methods of how to get the start time for a SQL Server instance.
    Solution

    Here are a few different ways that you can tell when SQL Server was last started.
    Method 1: sys.dm_os_sys_info

    This DMV, sys.dm_os_sys_info, contains a column that holds the startup time for SQL Server. You can run the following command to find the start time.
    SELECT sqlserver_start_time FROM sys.dm_os_sys_info

    sys.dm_os_sys_info

    Method 2: SQL Server Error Log

    If you open the current SQL Server error log in SSMS under Management > SQL Server Logs and scroll to the bottom of the error log you can see when the server was started. Note the highlighted text below "SQL Server is starting". You will want to look for this to make sure the error log was not cycled and give you a false impression of the start time.

    sql server error log start up time

    Here is an example of a cycled error log and note the highlighted text. If you see this you will need to look at a previous error log until you find the log that contains the information in the image above.

    sql server log initialized

    Note: if you are running the Express edition of SQL Server you cannot read the error logs directly from SSMS, but you can use xp_readerrorlog or navigate to the folder where the log files are stored and use a text editor to read the SQL Server error log files.
    to see original article go to
    Find Last Restart of SQL Server

  2. #2
    Join Date
    Sep 2011
    Posts
    75

  3. #3
    Join Date
    Sep 2011
    Posts
    31
    sp_helpdb tempdb
    this will tell you tempdb creation time (which is essentially when you sql server was started)
    You can also check error logs which contain startup information.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •