Unix Technical Forum

shrinking TEMPDB

This is a discussion on shrinking TEMPDB within the SQL Server Data Warehousing forums, part of the Microsoft SQL Server category; --> hello guys! our tempdb is currently 35gig and still growing. we would like to know the best method to ...


Go Back   Unix Technical Forum > Database Server Software > Microsoft SQL Server > SQL Server Data Warehousing

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-27-2008, 06:09 PM
misheL
 
Posts: n/a
Default shrinking TEMPDB

hello guys!

our tempdb is currently 35gig and still growing. we would
like to know the best method to shrink it.

we tried stopping and starting the service, but we can't
really do that whenever a stored proc is running. is there
anyway to reduce it while a stored proc is running?

HELP!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-27-2008, 06:10 PM
chris
 
Posts: n/a
Default shrinking TEMPDB

try this

use tempdb
backup log tempdb WITH NO_LOG
dbcc shrinkfile (templog,0)
dbcc shrinkfile (tempdev,0)


templog is the name of log file and tempdev is the name
of the data file. Just check first these names in your
sysfiles.

Regards
>-----Original Message-----
>hello guys!
>
>our tempdb is currently 35gig and still growing. we

would
>like to know the best method to shrink it.
>
>we tried stopping and starting the service, but we can't
>really do that whenever a stored proc is running. is

there
>anyway to reduce it while a stored proc is running?
>
>HELP!
>.
>

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-27-2008, 06:10 PM
mishel
 
Posts: n/a
Default shrinking TEMPDB

thanks chris, but that's what we're doing right now. what
i would like to know, if there's a way to shrink the
tempdb while a query is running.

thanks again.

regards,
michelle

>-----Original Message-----
>try this
>
>use tempdb
>backup log tempdb WITH NO_LOG
>dbcc shrinkfile (templog,0)
>dbcc shrinkfile (tempdev,0)
>
>
>templog is the name of log file and tempdev is the name
>of the data file. Just check first these names in your
>sysfiles.
>
>Regards
>>-----Original Message-----
>>hello guys!
>>
>>our tempdb is currently 35gig and still growing. we

>would
>>like to know the best method to shrink it.
>>
>>we tried stopping and starting the service, but we can't
>>really do that whenever a stored proc is running. is

>there
>>anyway to reduce it while a stored proc is running?
>>
>>HELP!
>>.
>>

>.
>

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 02-27-2008, 06:10 PM
Rob Anderson
 
Posts: n/a
Default Re: shrinking TEMPDB

What is happening in the query that is causing so much disk space to be
eaten up?

"mishel" <mishel@diplomats.com> wrote in message
news:097d01c36e12$b84d3480$a401280a@phx.gbl...
> thanks chris, but that's what we're doing right now. what
> i would like to know, if there's a way to shrink the
> tempdb while a query is running.
>
> thanks again.
>
> regards,
> michelle
>
> >-----Original Message-----
> >try this
> >
> >use tempdb
> >backup log tempdb WITH NO_LOG
> >dbcc shrinkfile (templog,0)
> >dbcc shrinkfile (tempdev,0)
> >
> >
> >templog is the name of log file and tempdev is the name
> >of the data file. Just check first these names in your
> >sysfiles.
> >
> >Regards
> >>-----Original Message-----
> >>hello guys!
> >>
> >>our tempdb is currently 35gig and still growing. we

> >would
> >>like to know the best method to shrink it.
> >>
> >>we tried stopping and starting the service, but we can't
> >>really do that whenever a stored proc is running. is

> >there
> >>anyway to reduce it while a stored proc is running?
> >>
> >>HELP!
> >>.
> >>

> >.
> >



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 02-27-2008, 06:10 PM
Kevin
 
Posts: n/a
Default Re: shrinking TEMPDB

Generally heavy TEMPDB use is caused by very large sorts or joins. - check
for appropriate indexing to support the stored procedure.

--
Kevin Connell, MCDBA
--------------------------------------------------
The views expressed here are my own
and not of my employer.
----------------------------------------------------
"mishel" <mishel@diplomats.com> wrote in message
news:097d01c36e12$b84d3480$a401280a@phx.gbl...
> thanks chris, but that's what we're doing right now. what
> i would like to know, if there's a way to shrink the
> tempdb while a query is running.
>
> thanks again.
>
> regards,
> michelle
>
> >-----Original Message-----
> >try this
> >
> >use tempdb
> >backup log tempdb WITH NO_LOG
> >dbcc shrinkfile (templog,0)
> >dbcc shrinkfile (tempdev,0)
> >
> >
> >templog is the name of log file and tempdev is the name
> >of the data file. Just check first these names in your
> >sysfiles.
> >
> >Regards
> >>-----Original Message-----
> >>hello guys!
> >>
> >>our tempdb is currently 35gig and still growing. we

> >would
> >>like to know the best method to shrink it.
> >>
> >>we tried stopping and starting the service, but we can't
> >>really do that whenever a stored proc is running. is

> >there
> >>anyway to reduce it while a stored proc is running?
> >>
> >>HELP!
> >>.
> >>

> >.
> >



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 03:01 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com