SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Removing tempdb files


Removing tempdb files

Author
Message
Steve Jones
Steve Jones
SSC Guru
SSC Guru (682K reputation)SSC Guru (682K reputation)SSC Guru (682K reputation)SSC Guru (682K reputation)SSC Guru (682K reputation)SSC Guru (682K reputation)SSC Guru (682K reputation)SSC Guru (682K reputation)

Group: Administrators
Points: 682134 Visits: 21588
Comments posted to this topic are about the item Removing tempdb files

Follow me on Twitter: @way0utwest
Forum Etiquette: How to post data/code on a forum to get the best help
My Blog: www.voiceofthedba.com
Jeff Moden
Jeff Moden
SSC Guru
SSC Guru (975K reputation)SSC Guru (975K reputation)SSC Guru (975K reputation)SSC Guru (975K reputation)SSC Guru (975K reputation)SSC Guru (975K reputation)SSC Guru (975K reputation)SSC Guru (975K reputation)

Group: General Forum Members
Points: 975134 Visits: 49307
It'll be interesting to see how people answer this one because the correct answer won't actually work on a busy system because the file will not be empty.

--Jeff Moden

RBAR is pronounced ree-bar and is a Modenism for Row-By-Agonizing-Row.
First step towards the paradigm shift of writing Set Based code:
Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column.
If you think its expensive to hire a professional to do the job, wait until you hire an amateur. -- Red Adair

When you put the right degree of spin on it, the number 318 is also a glyph that describes the nature of a DBAs job. Wink

Helpful Links:
How to post code problems
How to post performance problems
Forum FAQs
Stewart "Arturius" Campbell
Stewart "Arturius" Campbell
SSC Guru
SSC Guru (69K reputation)SSC Guru (69K reputation)SSC Guru (69K reputation)SSC Guru (69K reputation)SSC Guru (69K reputation)SSC Guru (69K reputation)SSC Guru (69K reputation)SSC Guru (69K reputation)

Group: General Forum Members
Points: 69864 Visits: 8344
Jeff Moden - Thursday, March 14, 2019 11:56 PM
It'll be interesting to see how people answer this one because the correct answer won't actually work on a busy system because the file will not be empty.

my thoughts exactly.
thanks for the question, Steve


____________________________________________
Space, the final frontier? not any more...
All limits henceforth are self-imposed.
“libera tute vulgaris ex”
frederico_fonseca
frederico_fonseca
SSChampion
SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)

Group: General Forum Members
Points: 13307 Visits: 7193
Steve does mention the constraint on the answer "Note, if the file is not empty, you cannot remove it.)
Jeff Moden
Jeff Moden
SSC Guru
SSC Guru (975K reputation)SSC Guru (975K reputation)SSC Guru (975K reputation)SSC Guru (975K reputation)SSC Guru (975K reputation)SSC Guru (975K reputation)SSC Guru (975K reputation)SSC Guru (975K reputation)

Group: General Forum Members
Points: 975134 Visits: 49307
frederico_fonseca - Friday, March 15, 2019 5:00 AM
Steve does mention the constraint on the answer "Note, if the file is not empty, you cannot remove it.)


Yep... but the correct answer will not work by itself if there's any activity at all in TempDB (system generated or not and there's a fair number of system generated tables that seem to "stick" even after a system goes to a quiet but normal state) and that contingency makes the correct answer listed only a partially correct answer. Since the question was specifically about TempDB, the contingency should have been a part of the correct answer, IMHO.

Heh... it didn't happen here but instructions on some exams to "pick the best answer" give me the hackles when the "best" answer isn't actually the best answer.

--Jeff Moden

RBAR is pronounced ree-bar and is a Modenism for Row-By-Agonizing-Row.
First step towards the paradigm shift of writing Set Based code:
Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column.
If you think its expensive to hire a professional to do the job, wait until you hire an amateur. -- Red Adair

When you put the right degree of spin on it, the number 318 is also a glyph that describes the nature of a DBAs job. Wink

Helpful Links:
How to post code problems
How to post performance problems
Forum FAQs
Steve Jones
Steve Jones
SSC Guru
SSC Guru (682K reputation)SSC Guru (682K reputation)SSC Guru (682K reputation)SSC Guru (682K reputation)SSC Guru (682K reputation)SSC Guru (682K reputation)SSC Guru (682K reputation)SSC Guru (682K reputation)

Group: Administrators
Points: 682134 Visits: 21588
It's the best answer. Clearing the system of a workload is a separate task and a separate question.

Follow me on Twitter: @way0utwest
Forum Etiquette: How to post data/code on a forum to get the best help
My Blog: www.voiceofthedba.com
Jeff Moden
Jeff Moden
SSC Guru
SSC Guru (975K reputation)SSC Guru (975K reputation)SSC Guru (975K reputation)SSC Guru (975K reputation)SSC Guru (975K reputation)SSC Guru (975K reputation)SSC Guru (975K reputation)SSC Guru (975K reputation)

Group: General Forum Members
Points: 975134 Visits: 49307
Steve Jones - SSC Editor - Friday, March 15, 2019 9:36 AM
It's the best answer. Clearing the system of a workload is a separate task and a separate question.


Heh... no it's not. The "Best Answer" would be the one that includes the "clearing of the guns" because the code won't actually work on most production systems because of the current workload. This is especially true since the title of the question is ...

Removing tempdb files

;-)

--Jeff Moden

RBAR is pronounced ree-bar and is a Modenism for Row-By-Agonizing-Row.
First step towards the paradigm shift of writing Set Based code:
Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column.
If you think its expensive to hire a professional to do the job, wait until you hire an amateur. -- Red Adair

When you put the right degree of spin on it, the number 318 is also a glyph that describes the nature of a DBAs job. Wink

Helpful Links:
How to post code problems
How to post performance problems
Forum FAQs
Mike Hinds
Mike Hinds
SSCarpal Tunnel
SSCarpal Tunnel (4.1K reputation)SSCarpal Tunnel (4.1K reputation)SSCarpal Tunnel (4.1K reputation)SSCarpal Tunnel (4.1K reputation)SSCarpal Tunnel (4.1K reputation)SSCarpal Tunnel (4.1K reputation)SSCarpal Tunnel (4.1K reputation)SSCarpal Tunnel (4.1K reputation)

Group: General Forum Members
Points: 4103 Visits: 1244
A "useful" answer would include steps to clear such a file, or at least a link to a more complete set of steps to do so. I would appreciate such a link to bookmark for myself and my in-house compadres.

Mike Hinds
Lead Database Administrator
1st Source Bank
MCP, MCTS
Mike Hinds
Mike Hinds
SSCarpal Tunnel
SSCarpal Tunnel (4.1K reputation)SSCarpal Tunnel (4.1K reputation)SSCarpal Tunnel (4.1K reputation)SSCarpal Tunnel (4.1K reputation)SSCarpal Tunnel (4.1K reputation)SSCarpal Tunnel (4.1K reputation)SSCarpal Tunnel (4.1K reputation)SSCarpal Tunnel (4.1K reputation)

Group: General Forum Members
Points: 4103 Visits: 1244
Mike Hinds - Monday, March 18, 2019 6:20 AM
A "useful" answer would include steps to clear such a file, or at least a link to a more complete set of steps to do so. I would appreciate such a link to bookmark for myself and my in-house compadres.


Reminds me of a conversation from "Fiddler on the Roof" -
"You can't both be right."
"And you are also right."

Mike Hinds
Lead Database Administrator
1st Source Bank
MCP, MCTS
Shayn Thomas
Shayn Thomas
SSCertifiable
SSCertifiable (5.1K reputation)SSCertifiable (5.1K reputation)SSCertifiable (5.1K reputation)SSCertifiable (5.1K reputation)SSCertifiable (5.1K reputation)SSCertifiable (5.1K reputation)SSCertifiable (5.1K reputation)SSCertifiable (5.1K reputation)

Group: General Forum Members
Points: 5118 Visits: 908
Mike Hinds - Monday, March 18, 2019 6:20 AM
A "useful" answer would include steps to clear such a file, or at least a link to a more complete set of steps to do so. I would appreciate such a link to bookmark for myself and my in-house compadres.

+1


---------------------------------------------------------------------------------------
The more you know, the more you know that you dont know
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum









































































































































































SQLServerCentral


Search