I saw a post in the Forum, saying that the database slowed down for a while and found that the last modification time of the database file was the same as that of the slow world. I want to know if the file actually increased during this time.
In fact, SQL Server provides an Event for data growth, which is recorded in the Default Trace.
In the following test, I created a new database, created a table, and inserted data:
Createtabletest (testvarchar (100 ))
Go
Insertintotestvalues (replicate ('A', 100 ))
Go 100000
Query the Default Trace:
Declare @ TraceFileasvarchar (max)
Select @ TraceFile = path fromsys. traces
SelectDatabaseName, FileName, StartTime
From: fn_trace_gettable (@ TraceFile, default) -- replace your own Trace file address
WhereEventClass = 92 or EventClass = 93 andStartTime> '2017-06-2013: 09: 66661'
Explanations of Event 92 and 93:
Select * fromsys. trace_eventswheretrace_event_id = 92 or trace_event_id = 93
650) this. width = 650; "title =" 1.png" style = "float: left;" src = "http://www.bkjia.com/uploads/allimg/131228/22232330O-0.png"/>
The result is as follows:
650) this. width = 650; "title =" 2.png" style = "float: left;" src = "http://www.bkjia.com/uploads/allimg/131228/2223235305-1.png"/>
You can see the database growth records.
This article is from the "follow SQL Server Technology" blog, please be sure to keep this source http://lzf328.blog.51cto.com/1196996/1231688