Solved

Create a TEMPDB Database to each CPU on Server

Posted on 2011-03-25
4
568 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Isolation level in SQL server 3 58
ms sql + top 1 for each customer 3 70
MS SQLK Server multi-part identifier cannot be bound 5 50
Loops and updating in SQL Query 9 71
This article will describe one method to parse a delimited string into a table of data.   Why would I do that you ask?  Let's say that you need to pass multiple parameters into a stored procedure to search for.  For our sake, we'll say that we wa…
I am showing a way to read/import the excel data in table using SQL server 2005... Suppose there is an Excel file "Book1" at location "C:\temp" with column "First Name" and "Last Name". Now to import this Excel data into the table, we will use…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

736 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