SQL 2012 TempDB Large Log File

compdigit44
compdigit44 used Ask the Experts™
on
Our SQL 2012 cluster is used to host our SharePoint 2012 DB's only. I know ou server is not setup correctly and doing my best to correct things from past admins..

Anyway I have noticed the TempDB is divided up into 6 files 1GB each but the single tempdb log file is 130GB!!!!!

Why is this and how can I correct it???
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Top Expert 2012
Commented:
Why is this and how can I correct it???
Either:
1.  Setup frequent Transaction Log Backups or
2,  Change the Recovery Model to Simple and give up support for point-in-time restore.

Once you have done either one of those you can then do a one time (do not even think about scheduling this) shrink of your Transaction Log.
Top Expert 2012

Commented:
Why is this and how can I correct it???
And I forgot to answer your question.  It is because the database was setup with the default Full Recovery Model and no Transaction Log backups have been done.

Author

Commented:
I just checked and the TempDB is set to a simple recovery model..

I have read that a large tempdb log can be caused by uncommitted changes. How can I check for this?
Ensure you’re charging the right price for your IT

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden using our free interactive tool and use it to determine the right price for your IT services. Start calculating Now!

Author

Commented:
I hate to say this but I made an ID10T mistake!!!

I thought my log files size was in GB come to find out it was only 120MB...... :o)

Please keep posted thought because I have a number of other question I will be opening a question for.
Most Valuable Expert 2013
Awarded 2012

Commented:
Hi,
just some more comments:
It is common best practice to create multiple files for the temp db with a fixed size - to enforce/enable better parallelism. Normally you create a dedicated file per 1-2 cores (meaning 1 CPU Quad Core with 2 threads for each code (8 overall threads) should have 2-4 files.
Second, SharePoint is using the tempdb internally very heavily - so a good tempdb setup will increase the overall performance dramatically (or make it unusable if the SQL config is bad) - e.g. each and every security trimmed "list" (search, list elements, documents, actions ...) will be stored inside of temporary table variables inside the called stored procedures. These variables are normally stored inside the tempdb until the end of the stored procedures.  Therefore a single search or list view can have a lot of I/O to the tempdb.

HTH
Rainer

Author

Commented:
Great tip!!!!!!!!!!!!   :o)

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial