0

I am planning on increasing the number of tempdbs we have on our sql cluster. I do have one question that I can't seem to find a clear cut answer to...

I have one tempdb that is over 50GB and I want to add an additional 11 more tempdb files but I do not want them all to be 50GB so I want to 'shrink' the original tempdb but my question is if I set the initial size to 4GB on the original tempdb file and I bounce the server will it shrink the original tempdb to 4GB or will it stay at 50GB?

Or

Should I just use DBCC SHRINKFILE (tempdev, 4096) on the original tempdb?

4
  • 2
    You're going from one tempdb file to 12? Is there any logic behind that choice? Apr 22, 2016 at 18:58
  • I am going off the logic of Microsoft that they recommend to have one tempdb for every core but it depends on how many cores you have. which we have 24 cores on the server. So they recommend if you have 8 to 32 cores to divide by 2 and that is how many tempdbs you should have
    – unrealmatt
    Apr 22, 2016 at 19:10
  • 1
    If you are the OP, you can merge your two DBA.SE accounts by following instructions here. That will allow you to regain full control over the question. As a result, you will be able, among other things, to post comments on your question as well as on answers to your question.
    – Andriy M
    Apr 22, 2016 at 19:39
  • Yes, sorry I am not sure why it wouldn't let me add a comment at first guess I should just create an account.
    – unrealmatt
    Apr 22, 2016 at 19:47

1 Answer 1

1

If you are going to bounce the server then nothing to do.

Just define the files and the initial size and they will be built with the initial size when you restart the service.

It does not shrink as nothing is retained in a log file.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.