SQL Homework – March 2019 – Reconfigure tempdb

Leave a comment

March 4, 2019 by Kenneth Fisher

You’ve heard of tempdb right? It’s one of the system databases. All of the system databases are important but poor tempdb gets beaten on more than any of the others. You almost never type tempdb? And you are querying stuff out of master and msdb all the time? Yep. Tempdb is the silent partner. SQL uses tempdb all the time. So much that Brent Ozar (b/t) compares it to a public restroom.

Ok, tempdb is important. Now you want to know where I’m going with this? There’s a point, I promise.

For this month’s SQL Homework I want you to work on the tempdb configurations. For the most part, this is going to be very similar to modifying any database but there are some pretty significant differences.

  • Read up on tempdb.
  • What can’t be done? Backups for example.
  • Create a temp table and go to tempdb to see what the actual table name is.
  • Add a new file.
  • Confirm that all of the files are the same size and have the same growth and growth limits.
  • Move an existing file from one drive (or directory) to another.
  • Remove a file.
  • Shut down SQL, delete the tempdb files, bring SQL back up again. What happened?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Enter your email address to follow this blog and receive notifications of new posts by email.

Join 3,755 other subscribers

Follow me on Twitter

ToadWorld Pro of the Month November 2013
%d bloggers like this: