Skip to content
benjf.com
benjf.com

  • Home
  • About
  • Technology
    • Linux Mint (Cinnamon)
    • ✉ Email
    • Privacy
    • Programming
      • HTML
      • CSS
      • Javascript
        • jQuery
      • PHP
      • SQL
        • SQL Server
      • Powershell
      • MS Access
      • WordPress
  • Opinion
    • ✞ Faith
    • ☺ For Fun
    • ? Politics
    • ? Random Awesomeness
  • Health
benjf.com

TempDB Reporting Incorrect File Size

benjf.com.blog@benjf.com, 2017-01-20

So what happens when you run a query to check TempDB file sizes and SQL tells you that each file is 101 MB, but when you look in the file system, they're actually a 45 GB each?  

Also, when you try to shrink the file, the shrink file dialog window shows free space as a negative number.  According MSDN:

 Once you restart the instance the space will be freed back to the OS.

Hint,don't do that!  Well, I mean, you can if you want, but if you're on a production server, that's not really an option.

All you really need to do is select "Release unused space" for each file and it will correct the issue.

I have read that shrinking tempdb comes with a risk of corruption of data, but I haven't yet seen that happen.  If you are having other issues then it's time to play doctor, weighing the risk of a side-effect against the likelihood of improving the situation.  As for me and my house, we release the unused space.

If you want the T-SQL for that, here it is:

SQL Server sql servertempdb

Post navigation

Previous post
Next post

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Recent Posts

  • Coercion and Loving God
  • Fire is power and they don’t want you to have it
  • Biden Too Old?
  • Telegram is awful for content
  • Want proof that nobody believes the government and media?

Recent Comments

  1. Hairstyles on How To Convert PCM to MP3
  2. TSQL – Loop Through Result Set WITHOUT Cursors – {benjf.com/_/} on TSQL – Simple Loop Through Result Set Using Cursor
  3. TSQL – Simple Loop Through Result Set Using Cursor – {benjf.com/_/} on TSQL – Loop Through Result Set WITHOUT Cursors
  4. Script Storage – {benjf.com/_/} on Script Storage Update
  5. benjf.com » Well, The World Is Going To End Again on End of the World Prediction “Best Practices”

Archives

  • September 2023
  • July 2023
  • June 2023
  • May 2023
  • October 2022
  • September 2022
  • August 2022
  • May 2022
  • December 2021
  • November 2021
  • September 2021
  • July 2021
  • June 2021
  • April 2021
  • March 2021
  • February 2021
  • January 2021
  • December 2020
  • October 2020
  • September 2020
  • August 2020
  • July 2020
  • June 2020
  • May 2020
  • April 2020
  • February 2020
  • January 2020
  • December 2019
  • November 2019
  • October 2019
  • July 2019
  • May 2019
  • April 2019
  • January 2019
  • December 2018
  • November 2018
  • May 2018
  • April 2018
  • February 2018
  • December 2017
  • September 2017
  • June 2017
  • May 2017
  • February 2017
  • January 2017
  • December 2016
  • August 2016
  • July 2016
  • May 2016
  • April 2016
  • March 2016
  • February 2016
  • December 2015
  • September 2015
  • August 2015
  • July 2015
  • June 2015
  • October 2013
  • September 2013
  • August 2013
  • June 2013
  • May 2013
  • April 2013
  • March 2013
  • February 2013
  • January 2013
  • December 2012
  • October 2012
  • September 2012
  • July 2012
  • April 2012
  • March 2012
  • February 2012
  • January 2012
  • December 2011
  • November 2011
  • October 2011
  • September 2011
  • August 2011
  • July 2011
  • June 2011
  • May 2011
  • April 2011
  • February 2011
  • January 2011
  • December 2010
  • November 2010
  • September 2010
  • August 2010
  • July 2010
  • June 2010
  • May 2010
  • April 2010
  • March 2010
  • February 2010
  • January 2010
  • December 2009
  • November 2009
  • October 2009

Categories

  • C#
  • CSS
  • EMail
  • Faith
  • For Fun
  • Health
  • HTML
  • Javascript
  • jQuery
  • Just Info
  • Movies
  • MS Access
  • Music
  • Opinion
  • PHP
  • Politics
  • Powershell
  • Privacy
  • Programming
  • Random Awesomeness
  • Self Hosting
  • SQL
  • SQL Server
  • Technology
  • Uncategorized
  • WordPress
©2023 benjf.com | WordPress Theme by SuperbThemes