In the morning, I’m analyzing the usage of the index. I want to see when the database was started to ensure that there is no problem with the statistical data. I can use the following three methods to query:
--2008 and later
SELECT sqlserver_start_time
FROM sys.dm_os_sys_info
select crdate from master..sysdatabaseswherename='tempdb'
SELECT login_time FROMsysprocesses WHEREspid= 1