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 ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| 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! |
| |||
| 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! >. > |
| |||
| 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! >>. >> >. > |
| |||
| 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! > >>. > >> > >. > > |
| ||||
| 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! > >>. > >> > >. > > |