Using tempdb created date. SQL Server clear up the tempdb when it starts. Here is what stated in the Windows event log during SQL Server start up, 'Clearing tempdb database', then 'Starting up database 'tempdb' '.
Find the tempdb create date in sys.databases,
SELECT create_date FROM sys.databases WHERE name = 'tempdb'
From SQL Server 2008 forward, sqlserver_start_time is added to sys.dm_os_sys_info DMV.
SELECT sqlserver_start_time FROM sys.dm_os_sys_info
There is also an undocumented DBCC command, DBCC DBINFO
DBCC DBINFO('YourDatabase') WITH TABLERESULTS
No comments:
Post a Comment