Removing Tempdb Files

Erin Stellato relates a painful experience of tempdb filling up a VM’s drive:

I made a mistake with a script today. I created three new tempdb files sized at 10GB each that filled up a hard drive.

Whoops.

Luckily it was in one of my own testing VMs, so it wasn’t awful. Fixing it, however, was a fun one.

**NOTE: All work was done in a test environment. Proceed with caution if you’re running these commands in Production and make sure you understand the ramifications.

It’s a good opportunity to learn from Erin’s experience.

Related Posts

Getting Per-Table Space Utilization With Powershell

Drew Furgiuele provides us a script and a homework assignment: Of course, PowerShell excels at this. By using the SQL Server module, it’s really easy to: Connect to an instance and collect every user database, and From each database, collect every table, and For each table, collect row counts and space used, and If there are […]

Read More

SQL Server Disk Space Analysis

Jana Sattainathan has a solution using Powershell, Power BI, and T-SQL to track disk usage across a series of SQL Server instances: This is just great on its own as I get information shown below. It is basically data like this at the Database/FileGroup/File levels Database/Filegroup/File name Size Free size Max size Free of Max […]

Read More

Categories

April 2017
MTWTFSS
« Mar May »
 12
3456789
10111213141516
17181920212223
24252627282930