How to Find SQL Server Started date & Time – 4 Scripts to Find SQL Server Started Time

There  are so many way of finding the sql server started date time.

1. SQL Server Log

2.  using DMV

3. Using TempDB Creation date (as it is recreated when SQL Server is started every time)

4. Start Time of Default Trace

Examples : 

1. SQL Server Log :

SQL Server Management Studio –> Management –> SQL Server Logs –> We need to Search for the “SQL SERVER Starting….Image

or

 sp_readerrorlog 0,1,’Copyright (c)’

 

Image

 

2. Using DMV :

SELECT sqlserver_start_time FROM sys.dm_os_sys_info;

 

3. Using TempDb Creation Date

select crdate from sys.sysdatabases where name=’tempdb’

4. Default Trace :

 

SELECT login_time FROM sys.dm_exec_sessions WHERE session_id = 1;

 

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s