Friday, March 23, 2012

out to expand tempdb log file

I have a problem cause by an extensive sql statement that causes the tempdb
log file to be too small for execution. how can i extend the size of the log
file ?
is
ALTER DATABASE tempdb
MODIFY FILE (
NAME=templog,
FILENAME='E:\tempdb.ldf',
SIZE = 5MB,
MAXSIZE = 10MB,
FILEGROWTH = 1MB )
a safe bet from the default size?
thanks
It all depends on the amount of "temp" work your server does (joins,
temp tables, temp variables, etc.). Although a tempdb log that starts
at 5MB and can autogrow by 1MB to a max size of 10MB is the smallest
tempdb log file I've ever seen. My small-to-medium sized production
servers have tempdb log files that range from 100MB to 2GB.
You've got the right syntax for the ALTER DATABASE statement, although
you don't need to specify the filename (that's an optional in this
case), but why set such a low max size? Are you a bit strapped for space?
*mike hodgson* |/ database administrator/ | mallesons stephen jaques
*T* +61 (2) 9296 3668 |* F* +61 (2) 9296 3885 |* M* +61 (408) 675 907
*E* mailto:mike.hodgson@.mallesons.nospam.com |* W* http://www.mallesons.com
David Tucker wrote:

>I have a problem cause by an extensive sql statement that causes the tempdb
>log file to be too small for execution. how can i extend the size of the log
>file ?
>is
>ALTER DATABASE tempdb
>MODIFY FILE (
>NAME=templog,
>FILENAME='E:\tempdb.ldf',
>SIZE = 5MB,
>MAXSIZE = 10MB,
>FILEGROWTH = 1MB )
>
>a safe bet from the default size?
>
>thanks
>
>
>
|||Thanks Mike
no this was just a sample, just to illustrate the question.
thanks for answering . regards
*** Sent via Developersdex http://www.codecomments.com ***

No comments:

Post a Comment