我們的品牌

Impact-Company-Logo-English Black-01-177x54

歡迎造訪施耐德電機全球網站

歡迎訪問我們的網站
		
我们今天能为您提供什么帮助?
How to find when SQL Server (service/instance) was last restarted

Issue
When troubleshooting database issues, gathering some basic information can be very helpful in leading to the resolution or to identifying the cause of problems.

Product Line

Power Monitoring Expert 7.2.x

Power Monitoring Expert 8.x

Power Monitoring Expert 9.0

Power Monitoring Expert 2020

Power Monitoring Expert 2021

Power Monitoring Expert 2022

Power Monitoring Expert 2023



Environment

Power Monitoring Expert Software with SQL Server 2005-2022 versions



Cause
Database maintenance and troubleshooting possible database issues.

Resolution
*Warning: Irreparable database damage can occur. This procedure should only be performed by users familiar with SQL Server Management Studio. Databases should be backed up prior to performing this procedure.*

Listed below are three methods to find the last time SQL Server server/service was restarted.

Method 1
The first method uses the fact that 'tempdb' will be recreated with every restart. We can check the created date (crdate) from master..sysdatabases.
SELECT crdate FROM master..sysdatabases WHERE name ='tempdb'

Method 2
The second method checks the master..sysprocesses database and check for the minimum value in the 'login_time' column.
SELECT MIN(login_time) FROM master..sysprocesses

Method 3
Examine the Windows Event Viewer and search for the most recent event indicating that the SQL server service was started.

  1. Right click on the Start button and select Control Panel > System & Security and double-click Administrative tools
  2. Double-click Event Viewer
  3. Select the type of logs that you wish to review (ex: Application, System)

NOTE: To access the Application Logs once in Event Viewer, go to Windows Logs > Application, for shutdown errors refer to Application and System logs.

    施耐德電機Taiwan

    探索更多
    產品:
    探索更多
    產品:
    • 產品文檔
    • 軟體下載
    • 產品選型工具
    • 產品替代和替換
    • 幫助和聯絡中心
    • 尋找我們的辦公室
    • 取得報價
    • 施耐德電機社群
    • 人才招募
    • 公司簡介
    • 舉報不當行為
    • 無障礙
    • 新聞中心
    • 投資者
    • 專業洞察
    • 台灣施耐德電機學院
    • 綠色影響力落差調查
    • Schneider Go Green 2025
    • 隱私政策
    • Cookie通告
    • 使用條款
    • Change your cookie settings