Anonymous Asked in Cars &Transportation · 2 weeks ago

Why is TempDB MDF so large?

MDf Data file for tempdb grew to 130 GB yesterday on one of the servers . on a regular basis is asking for bigger problems down the road.My SQL server seems to be creating Huge Tempdb.mdf file post .SQL 2000 Tempdb mdf size, cause and resolution - MSDNtempdb mdf vs ldf - MSDNDetermining Initial Size of Tempdb Additional Data Files - MSDNДругие результаты с сайта social.msdn.microsoft.com


Why is TempDB growing so large?

Tempdb growth is mainly due to poor performing queries, so you can use SQL Profiler and probably filter on Duration to determine if there are any stored procedures that are taking more than x seconds to execute.

Why is my MDF file so big?

Because the MDF was allocated with 154Gb, or has grown to 154Gb through various operations. A database file has at least the size of the data in it, but it can be larger than the used amount by any amount.

How do you shrink TempDB MDF?

Shrink TempDB using SSMS Right-click on the TempDB and go to Tasks. In the tasks list, click on Shrink, and you can select Database or files. Both Database and Files options are similar to the DBCC SHRINKDATABASE and DBCC SHRINKFILE command we explained earlier.

Can I delete TempDB MDF?

All tempdb files are re-created during startup. However, they are empty and can be removed. To remove additional files in tempdb, use the ALTER DATABASE command by using the REMOVE FILE option. Use the DBCC SHRINKDATABASE command to shrink the tempdb database.

Related Questions

Relevance
Write us your question, the answer will be received in 24 hours