Removing tempdb files

  • Comments posted to this topic are about the item Removing tempdb files

  • 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.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • 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”

  • Steve does mention the constraint on the answer "Note, if the file is not empty, you cannot remove it.)

  • 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.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • It's the best answer. Clearing the system of a workload is a separate task and a separate question.

  • 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.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • 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 Administrator1st Source BankMCP, MCTS

  • 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 Administrator1st Source BankMCP, MCTS

  • 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

Viewing 10 posts - 1 through 9 (of 9 total)

You must be logged in to reply to this topic. Login to reply