Solved

SHRINK DATA FILE(mdf and log files)

Posted on 2003-11-22
4
945 Views
Last Modified: 2007-12-19
I am shrinking the temp_db file from 30GB. I want to know what effect it can make to my performance. Bascally i need to know why temp_db is used and  why so much space was alloctated to it initalliy. Some ex-dba has done that.

0
Comment
Question by:pg_india
  • 2
4 Comments
 
LVL 34

Expert Comment

by:arbert
Comment Utility
Temp_Db is used whenever temporary tables are created or whenever someone does large sorts.  Everytime you restart SQL Server tempdb is recreated, but it doesn't hurt to shrink it once in a while if you don't restart the server that often.

Of course, any time you shrink ANY database, it does have an affect on the server because of the extra IO that's involved.

Brett
0
 
LVL 1

Expert Comment

by:yuniar
Comment Utility
TempDB database size is usually set base on how much space is needed for processing using temporary table. it seems that your setting is too big. you can decrease your tempdb database from SHRINK database option and set file growth to 10% for tempdb database setting
0
 
LVL 3

Author Comment

by:pg_india
Comment Utility
Thanks you all for your views and experts comments.

I want to know what effect it can make to my performance???
Now that temporary tables are used to store in temp_db shrinking it will make it slower? I mean suppose i have shrinked it After shriking it will reduce the speed of temp_db file??


0
 
LVL 34

Accepted Solution

by:
arbert earned 30 total points
Comment Utility
You're only going to take a "hit" while the shrink is happening.  You could experience a little bit of lock contention and IO waits.  After the shrink there should be no bad affects (unless for some reason the tempdb has to grow again and then you can get bad performance because of the auto grow and any fragmentation that ocurrs because of it).

Brett
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.

728 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

9 Experts available now in Live!

Get 1:1 Help Now