Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

The tempdB of MS SQL server

Posted on 2013-01-01
6
Medium Priority
?
531 Views
Last Modified: 2013-01-16
Dear all,

right now we consider to place Tempdb in SSD, but the size the SSD is not always large enought.

If we place mulitple tempdB file cross different type of hard disk, like SSD + SAS, can MS SQL still operational if only the tempdB in SSD failed but not SAS?

DBA100.
0
Comment
Question by:marrowyung
[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
  • 3
  • 2
6 Comments
 
LVL 1

Author Comment

by:marrowyung
ID: 38735685
do we have any method to know what is the temp DB size during peak hour?
0
 
LVL 19

Assisted Solution

by:Rimvis
Rimvis earned 800 total points
ID: 38736336
Hi marrowyung,

You can split tempdb to multiple files. So yes, you can put one file on SSD, and another on SAS. But both files should be available. If one of them is inaccessible, you will not be able to start your server.

You can monitor tempdb file size, but this database is recreated every time server restarts. If your server is running long enough, just take a look at file size, this should give you  general understanding.
0
 
LVL 1

Author Comment

by:marrowyung
ID: 38738800
Rimvis,

"If one of them is inaccessible, you will not be able to start your server."

Exactly what I am thinking, I didn't do that before as I don't have a good reason to do this. But if SQL server alwasy like to use file in a round robin manner, and if one of the file is missing and MS SQL is accessing it, MS SQL should return error.

"You can monitor tempdb file size, but this database is recreated every time server restarts. If your server is running long enough, just take a look at file size, this should give you  general understanding. "

Exactly what I told my staff and we should reserve around 40% of buffer in total for the aim of safty.

DBA100.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 51

Accepted Solution

by:
Mark Wills earned 1200 total points
ID: 38762821
Short answer is "NO". If your tempdb failed on SSD, the only way it would keep working if there was some kind of hardware (RAID) mirroring and it was a hardware failure.

So, having multiple tempdb's does not mean that any one of them can fail and automatically locked out.

Just how big does your tempdb get ? You can setup SSD's in a mirror (might lose out on the TRIM functionality, but that doesnt really impact all that much in the scheme of things).

For size you can run a script or simple SQL,
USE TEMPDB
go

SELECT name
,type_desc
,physical_name
,size /128.0 size_allocated_MB
,fileproperty(name,'SpaceUsed') / 128.0 size_being_used_MB
,(size-fileproperty(name,'SpaceUsed'))/128.0 size_available_MB
,(fileproperty(name,'SpaceUsed')*1.0 / size) * 100.0 percent_used_MB
,((size - fileproperty(name,'SpaceUsed'))*1.0/size)*100 percent_available_MB
FROM sys.database_files
go

Open in new window

but tempdb is quite erratic in size and usage so best to really get to know and plan for your tempdb : http://technet.microsoft.com/en-US/library/ms345368(v=sql.100).aspx
0
 
LVL 1

Author Comment

by:marrowyung
ID: 38765796
mark_wills,

yeah, we will use the montioring tools to check the peak size of the tempdB file.

But did you frequently see the size change dynamically? except the user/progamming do the 'select * From xxxx', which can kill the tempdB volume as the tempdB keep expanding to the unlimited size.

In 'http://technet.microsoft.com/en-US/library/ms345368(v=sql.100).aspx', what is 'space-use values'?  I can't see how I can use this information to project the real figure.

"Short answer is "NO". If your tempdb failed on SSD, the only way it would keep working if there was some kind of hardware (RAID) mirroring and it was a hardware failure.

So, having multiple tempdb's does not mean that any one of them can fail and automatically locked out."

so this means you agree that setup muitiple tempDB file don't help but hardware mirror on SSD volume can ?

DBA100.
0
 
LVL 51

Expert Comment

by:Mark Wills
ID: 38765917
multiple tempdb can help, but not in terms of automatic failover or redundancy. It can help in size and performance. Hardware mirroring does offer that automatic failover, so, any of the RAID versions offering high redundancy is what you want.

yes, you can see tempdb changing size - normally growth (on disk) and any deleted space (within the db) quickly gets reused once released, so dont always see erratic shrinkage (unless you have autoshrink on - not advised).

Probably the "space-use values" you mention is looking at the different consumers / uses for tempdb and mentions the different aspects in both the capacity planning and that troubleshooting links, that troubleshooting link in possibly not the best discussion on tempdb, but, it does show how to identify the different use (albeit not explaining what that is).

There is also : http://technet.microsoft.com/en-US/library/ms175527(v=sql.100).aspx which talks about optimising tempdb. I think all three together should give you the best possible views of tempdb.

If plain size is a problem, then run the query to show the size and available space, and monitor that. If the size is really getting out of hand, then you need to start looking at what is "wasting" the tempdb resource and thats when you need some of the queries from the troubleshooting link.
.
0

Featured Post

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

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

Naughty Me. While I was changing the database name from DB1 to DB_PROD1 (yep it's not real database name ^v^), I changed the database name and notified my application fellows that I did it. They turn on the application, and everything is working. A …
How to leverage one TLS certificate to encrypt Microsoft SQL traffic and Remote Desktop Services, versus creating multiple tickets for the same server.
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…

670 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