Solved

Create a TEMPDB Database to each CPU on Server

Posted on 2011-03-25
4
532 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

Control application downtime with dependency maps

Visualize the interdependencies between application components better with Applications Manager's automated application discovery and dependency mapping feature. Resolve performance issues faster by quickly isolating problematic components.

Join & Write a Comment

Suggested Solutions

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…
Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

758 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now