March 27, 2019 at 9:07 am
I'm currently setting up multiple SQL Server 2017 instances using a configuration file. I have the TempDB separated into the recommended 8 files and have the TempDB disk is 100GB in size. My question is, do I need to go an alter each of the 8 files or do I just use the ALTER DATABASE TempDB... for the original file? I would like to also turn off autogrowth. Thanks in advance!
March 27, 2019 at 11:33 am
I've answered my own question. I do need to change the *.mdf file as well as the *.ndf files so that they write/fill proportionally. I use the following T-SQL to perform the task.
ALTER DATABASE tempdb
MODIFY FILE (Name=<filename.mdf>,
Size = 12250);
GO
ALTER DATABASE tempdb
MODIFY FILE (Name=<filename.ndf>,
Size = 12250);
GO
March 27, 2019 at 1:36 pm
trent.adams0201 - Wednesday, March 27, 2019 11:33 AMI've answered my own question. I do need to change the *.mdf file as well as the *.ndf files so that they write/fill proportionally. I use the following T-SQL to perform the task.
ALTER DATABASE tempdb
MODIFY FILE (Name=<filename.mdf>,
Size = 12250);
GO
ALTER DATABASE tempdb
MODIFY FILE (Name=<filename.ndf>,
Size = 12250);
GO
That only leaves you 2GB for the LDF... could be a form of "Death by SQL".
--Jeff Moden
Change is inevitable... Change for the better is not.
April 18, 2019 at 2:38 pm
@jeff Moden
trent.adams0201 - Wednesday, March 27, 2019 11:33 AMI've answered my own question. I do need to change the *.mdf file as well as the *.ndf files so that they write/fill proportionally. I use the following T-SQL to perform the task.<span id="if_insertedNode_1553707938884">
ALTER DATABASE tempdb
MODIFY FILE (Name=<filename.mdf>,
Size = 12250);
GO
ALTER DATABASE tempdb
MODIFY FILE (Name=<filename.ndf>,
Size = 12250);
GO</span>
That only leaves you 2GB for the LDF... could be a form of "Death by SQL".
Thanks Jeff, I've made changes accordingly.
April 18, 2019 at 5:37 pm
Thanks for the feedback.
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply