Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Re-size TempDB files


Re-size TempDB files

Author
Message
AmarPo
AmarPo
SSC Rookie
SSC Rookie (41 reputation)SSC Rookie (41 reputation)SSC Rookie (41 reputation)SSC Rookie (41 reputation)SSC Rookie (41 reputation)SSC Rookie (41 reputation)SSC Rookie (41 reputation)SSC Rookie (41 reputation)

Group: General Forum Members
Points: 41 Visits: 220
Comments posted to this topic are about the item Re-size TempDB files

Amar
ESL_HSBC
ESL_HSBC
Forum Newbie
Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)

Group: General Forum Members
Points: 8 Visits: 151
Hi,
remove *.ndf file is very delicate, cause for best performance with tempdb , you have to add a number of tempdb files equal to the number of processor's.

regards ,
eric.simbozel@hsbc.fr
TravisDBA
TravisDBA
UDP Broadcaster
UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)

Group: General Forum Members
Points: 1462 Visits: 3069
You have to be careful how you use the word RESTRICTED in SQL Server. Using the startup instance of
C:\SQL\MSSQL.1\MSSQL\Binn>sqlservr.exe -c -f

puts the instance in minimal configuration. This is for setting of a configuration value The option enables the sp_configure allow updates option. On the other hand, the term RESTRICTED in SQL Server refers to the USER that can access things such as the RESTRICTED_USER option of the ALTER DATABASE command. RESTRICTED here refers to only members of the db_owner fixed database role and dbcreator and sysadmin fixed server roles that can connect to the database. MINIMAL CONFIGURATION and the term RESTRICTED are two totally different things in SQL Server, where semantics does matter. Regards. Travis.

"Technology is a weird thing. It brings you great gifts with one hand, and it stabs you in the back with the other. ...:-D"
Rudyx - the Doctor
Rudyx - the Doctor
Hall of Fame
Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)

Group: General Forum Members
Points: 3290 Visits: 2476
The -m parameter is definitely needed to prevent any other dbo or administrator type access - this is especially true during outages on production SQL servers.

Regards
Rudy Komacsar
Senior Database Administrator

"Ave Caesar! - Morituri te salutamus."
Charles Kincaid
Charles Kincaid
Ten Centuries
Ten Centuries (1K reputation)Ten Centuries (1K reputation)Ten Centuries (1K reputation)Ten Centuries (1K reputation)Ten Centuries (1K reputation)Ten Centuries (1K reputation)Ten Centuries (1K reputation)Ten Centuries (1K reputation)

Group: General Forum Members
Points: 1041 Visits: 2383
I had heard that you could
  • Stop the service
  • Kill the TempDB files
  • Start the service


The downsides are two: (1) stopping the service, and (2) not being able to control where TempDB lives. This resets the Missing/Unused index statistics that SQL server keeps for you and that can be a bad thing as well.

ATBCharles Kincaid
Alex Prusakov
Alex Prusakov
SSC Journeyman
SSC Journeyman (94 reputation)SSC Journeyman (94 reputation)SSC Journeyman (94 reputation)SSC Journeyman (94 reputation)SSC Journeyman (94 reputation)SSC Journeyman (94 reputation)SSC Journeyman (94 reputation)SSC Journeyman (94 reputation)

Group: General Forum Members
Points: 94 Visits: 301
The article is right in time for me. I’ve just added new ndf files to TempDb. Unfortunately, there is a small issue that surprised me. As you can see in attached Word file, that result of run of EXEC sp_helpfile and SELECT * FROM sys.master_files is different for initial size and current file size of TempDb.

Can anybody explain what does it mean and if there is a way to resolve it without service restart?
It is working and there is no problem with that but if I run DBCC SHRINKDB, the initial size for Tempdb.mdf will jump to 6Gb and files will not be same size that may lead to disproportional load. I am not afraid to make each file 6Gb but the server doesn’t need 6*8=48Gb Tempdb.

Initially TempDb had size of 6Gb and I had no problem adding ndf files with initial size of 500Mb. However, every attempt to reduce initial size of TempDB.mdf resulted in error message: “MODIFY FILE failed. Specified size is less than current size."

My last step was: SSMS --> TempDB --> Properties --> Files --> Initial size modified to 500; Click OK; Restart Service. After that TempDB is 4Gb (8*0.5).

Alex Prusakov
Attachments
USE tempdb.docx (14 views, 215.00 KB)
iain27
iain27
SSC-Enthusiastic
SSC-Enthusiastic (121 reputation)SSC-Enthusiastic (121 reputation)SSC-Enthusiastic (121 reputation)SSC-Enthusiastic (121 reputation)SSC-Enthusiastic (121 reputation)SSC-Enthusiastic (121 reputation)SSC-Enthusiastic (121 reputation)SSC-Enthusiastic (121 reputation)

Group: General Forum Members
Points: 121 Visits: 318
My experience was the same, if you use the gui - ssms it lets you reduce the size of the file. I created 4 x 4gb files and re sized them in the gui to 1 Gb each, with windows explorer open you could actually see the file size change - no service restart was needed. Although I would point out this was a new server build not being used in production at the time.

Iain
Alex Prusakov
Alex Prusakov
SSC Journeyman
SSC Journeyman (94 reputation)SSC Journeyman (94 reputation)SSC Journeyman (94 reputation)SSC Journeyman (94 reputation)SSC Journeyman (94 reputation)SSC Journeyman (94 reputation)SSC Journeyman (94 reputation)SSC Journeyman (94 reputation)

Group: General Forum Members
Points: 94 Visits: 301
I have bad feelings if one table (sys.master_files) has one values and another (sys.database_files) is different. It would be great to know how to sink all.

Alex Prusakov
Misha_SQL
Misha_SQL
SSChasing Mays
SSChasing Mays (607 reputation)SSChasing Mays (607 reputation)SSChasing Mays (607 reputation)SSChasing Mays (607 reputation)SSChasing Mays (607 reputation)SSChasing Mays (607 reputation)SSChasing Mays (607 reputation)SSChasing Mays (607 reputation)

Group: General Forum Members
Points: 607 Visits: 983
Thank you for the article. The text looks very odd with all the HTML tags exposed when I view it (happens in both IE7 and FireFox3). Is it just me?



AmarPo
AmarPo
SSC Rookie
SSC Rookie (41 reputation)SSC Rookie (41 reputation)SSC Rookie (41 reputation)SSC Rookie (41 reputation)SSC Rookie (41 reputation)SSC Rookie (41 reputation)SSC Rookie (41 reputation)SSC Rookie (41 reputation)

Group: General Forum Members
Points: 41 Visits: 220
Looks like bunch of XML tags are getting exposed. I see them in the edit mode too. I took them out and resubmitted the article but I will also get in touch with the editor to see what's going on here.

I hope the new submission shows clearly.

Amar
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