This month's discount Comprehensive Database Performance Health Check · Testimonials
SQLAuthority with Pinal Dave
Home
  • Consulting
    • Health Check
  • Free Videos
  • All Articles
    • AI
    • SQL Performance
    • SQL Tips and Tricks
    • Interview Questions and Answers
    • SQL Puzzle
    • SQL Video
    • SQLAuthority News
    • Personal
  • Books
  • Consulting
Remove this file.

SQL SERVER – How to Remove TempDB File?

October 28, 2017
Pinal Dave
SQL Tips and Tricks
SQL Scripts, SQL Server, SQL TempDB

A DBA accidentally added an extra TempDB file and was not allowed to use SSMS to undo it. Here is how to remove a TempDB file with T-SQL only.

Read More
Gouache painting of a small tent beside a large open-sided vermilion canopy over a picnic table

Create a Global Temporary Table in SQL Server

October 21, 2017
Pinal Dave
SQL Tips and Tricks
SQL Scripts, SQL Server, SQL TempDB, Temp Table

A global temporary table starts with two # signs, lives in tempdb, and any session can read it. This post creates one, reads it from a second window, and shows when SQL Server drops it. It also covers name collisions and the cases where a different table type is the better choice.

Read More
Two temporary tile workspaces have different physical boundaries and one tile in each.

SQL SERVER – How to Create Table Variable and Temporary Table?

October 18, 2017
Pinal Dave
SQL Tips and Tricks
SQL Scripts, SQL Server, SQL TempDB, Temp Table

A Temporary table uses CREATE TABLE, while a table variable uses DECLARE. I use one row in each beginner example.

Read More
A fixed-base storage box has expanded sides to hold more sheets

What is the Initial Size of TempDB? – Interview Question of the Week #120

April 30, 2017
Pinal Dave
SQL Interview Questions and Answers
SQL Scripts, SQL Server, SQL TempDB, Starting SQL

Question: What is the Initial Size of TempDB? Trust me, this question is way more complicated than you read in one line.

Read More
SQL server command prompt.

SQL SERVER – Unable to Start SQL Service – OS Error 5 (Access is denied.) for TempDB

April 27, 2017
Pinal Dave
SQL Tips and Tricks
SQL Scripts, SQL Server, SQL TempDB, Starting SQL

I moved TempDB files and SQL Server would not start, with OS Error 5 (Access is denied). The message was misleading, and here is the real mistake.

Read More
Tempdb database icon.

SQL SERVER – DBCC SHRINKFILE: Page 1:26423878 Could not be Moved Because it is a Work Table Page – TempDB Files

March 21, 2017
Pinal Dave
SQL Tips and Tricks
SQL Scripts, SQL Server, SQL Server DBCC, SQL Server Management Studio, SQL TempDB

Shrinking TempDB kept failing: DBCC SHRINKFILE said the page could not be moved because it is a work table page. Here is the workaround that helped.

Read More
Tempdb database icon.

SQL SERVER – Script to Find and Monitoring TempDB Space Usage

February 2, 2017
Pinal Dave
SQL Tips and Tricks
SQL DMV, SQL Scripts, SQL Server, SQL TempDB

A client’s TempDB log grew to 80 GB while the data file was 5 GB. Here is the script I used for monitoring TempDB Space usage and finding the cause.

Read More
Previous 1 … 5 6 7 8 9 10 11 … 14 Next
  • Books
  • Testimonials
  • Privacy Policy

© 2006 – 2026 All rights reserved. pinal @ SQLAuthority.com