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?
-
2You're going from one tempdb file to 12? Is there any logic behind that choice?Aaron Bertrand– Aaron Bertrand2016年04月22日 18:58:13 +00:00Commented 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 haveunrealmatt– unrealmatt2016年04月22日 19:10:37 +00:00Commented Apr 22, 2016 at 19:10
-
1If 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– Andriy M2016年04月22日 19:39:56 +00:00Commented 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– unrealmatt2016年04月22日 19:47:24 +00:00Commented Apr 22, 2016 at 19:47
1 Answer 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.