Solved

Create a TEMPDB Database to each CPU on Server

Posted on 2011-03-25
4
555 Views
Last Modified: 2012-05-11
Hi Experts
What is the way to create a TEMPDB database for each CPU on the Server? and then how assign every database to each CPU?

thanks.
0
Comment
Question by:saulpilot439
  • 2
  • 2
4 Comments
 
LVL 37

Accepted Solution

by:
Neil Russell earned 125 total points
ID: 35218283
QUOTED FROM: http://www.sqlservercentral.com/Forums/Topic391927-360-1.aspx

Very very very important - NOT filegroups, files. For any database, not just tempdb, you may gain performance by having the same number of files per filegroup as you have cpu sockets or cores ( don't do this for hyperthreading ).

Putting tempdb on it's own array is another matter and not directly related to database files.

here's an example to create an 8 file tempdb

use master

go

Alter database tempdb modify file (name = tempdev, filename = 'D:\Program Files\Microsoft SQL Server\MSSQL\data\tempdb_db1.mdf',size = 60Mb,filegrowth = 20Mb)


use master

go

Alter database tempdb add file (name = tempdev2, filename = 'D:\Program Files\Microsoft SQL Server\MSSQL\data\tempdb_db2.mdf',size = 60Mb,filegrowth = 20Mb),

( name = tempdev3, Filename = 'D:\Program Files\Microsoft SQL Server\MSSQL\data\tempdb_db3.mdf',size = 60Mb,filegrowth = 20Mb),

( name = tempdev4, Filename = 'D:\Program Files\Microsoft SQL Server\MSSQL\data\tempdb_db4.mdf',size = 60Mb,filegrowth = 20Mb),

( name = tempdev5, Filename = 'D:\Program Files\Microsoft SQL Server\MSSQL\data\tempdb_db5.mdf',size = 60Mb,filegrowth = 20Mb),

( name = tempdev6, Filename = 'D:\Program Files\Microsoft SQL Server\MSSQL\data\tempdb_db6.mdf',size = 60Mb,filegrowth = 20Mb),

( name = tempdev7, Filename = 'D:\Program Files\Microsoft SQL Server\MSSQL\data\tempdb_db7.mdf',size = 60Mb,filegrowth = 20Mb),

( name = tempdev8, Filename = 'D:\Program Files\Microsoft SQL Server\MSSQL\data\tempdb_db8.mdf',size = 60Mb,filegrowth = 20Mb)

go



The GrumpyOldDBA
www.grumpyolddba.co.uk
http://sqlblogcasts.com/blogs/grumpyolddba/ 
0
 
LVL 37

Expert Comment

by:Neil Russell
ID: 35218345
Oh and you dont need to assign a db file to a cpu. The whole point is that if you have 2 x Quad core CPU's then thats 8 threads. Wach thread can access 1 file, so in theory 8 threads = 8 files in a group = the setup shown above.
0
 

Author Closing Comment

by:saulpilot439
ID: 35218349
Great, Greate Answer Neilsr thank very Much with this I have my problem solved.

Thanks Expert.
0
 

Author Comment

by:saulpilot439
ID: 35218394
Thanks very Much Neilsr.

This answer help me  for to night on my change. Thanks
0

Featured Post

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Need help creating a stored procedure 4 60
Problem with SqlConnection 4 168
Grid querry results 41 78
SQL Query with Sum and Detail rows 2 49
Recently, when I was asked to create a new SQL 2005 cluster, Microsoft released a new service pack for MS SQL 2005 what is Service Pack 3. When I finished the installation of MS SQL 2005 I found myself troubled why the installation of SP3 failed …
by Mark Wills PIVOT is a great facility and solves many an EAV (Entity - Attribute - Value) type transformation where we need the information held as data within a column to become columns in their own right. Now, in some cases that is relatively…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question