dbTalk Databases Forums  

Shrink Tempdb

microsoft.public.sqlserver.clients microsoft.public.sqlserver.clients


Discuss Shrink Tempdb in the microsoft.public.sqlserver.clients forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Rogers
 
Posts: n/a

Default Shrink Tempdb - 02-05-2007 , 01:07 PM






Dear Professional,

One quick question, is there any way we can shrink tempdb database and don't
need to restart SQL Server services?

Thanks in advance



Reply With Quote
  #2  
Old   
Andrew J. Kelly
 
Posts: n/a

Default Re: Shrink Tempdb - 02-05-2007 , 06:48 PM






Here are the supported ways to shrink tempdb.

http://www.support.microsoft.com/?id=307487

--
Andrew J. Kelly SQL MVP

"Rogers" <naissani (AT) hotmail (DOT) com> wrote

Quote:
Dear Professional,

One quick question, is there any way we can shrink tempdb database and
don't need to restart SQL Server services?

Thanks in advance




Reply With Quote
  #3  
Old   
Rogers
 
Posts: n/a

Default Re: Shrink Tempdb - 02-07-2007 , 08:32 AM



Is there any I can shrink tempdb data file but don't want to restart the
services?

Thanks

"Andrew J. Kelly" <sqlmvpnooospam (AT) shadhawk (DOT) com> wrote

Quote:
Here are the supported ways to shrink tempdb.

http://www.support.microsoft.com/?id=307487

--
Andrew J. Kelly SQL MVP

"Rogers" <naissani (AT) hotmail (DOT) com> wrote in message
news:%23ftnxjVSHHA.996 (AT) TK2MSFTNGP02 (DOT) phx.gbl...
Dear Professional,

One quick question, is there any way we can shrink tempdb database and
don't need to restart SQL Server services?

Thanks in advance






Reply With Quote
  #4  
Old   
Hari Prasad
 
Posts: n/a

Default Re: Shrink Tempdb - 02-17-2007 , 06:17 PM



Hello,

You could use DBCC SHRINKFILE.

use tempdb
go
-- this command shrinks the data file
dbcc shrinkfile (tempdev, 'target size in MB')
go
-- this command shrinks the log file
dbcc shrinkfile (templog, 'target size in MB')
go

Thanks
Hari

"Rogers" <naissani (AT) hotmail (DOT) com> wrote

Quote:
Is there any I can shrink tempdb data file but don't want to restart the
services?

Thanks

"Andrew J. Kelly" <sqlmvpnooospam (AT) shadhawk (DOT) com> wrote in message
news:%232yM8hYSHHA.1000 (AT) TK2MSFTNGP05 (DOT) phx.gbl...
Here are the supported ways to shrink tempdb.

http://www.support.microsoft.com/?id=307487

--
Andrew J. Kelly SQL MVP

"Rogers" <naissani (AT) hotmail (DOT) com> wrote in message
news:%23ftnxjVSHHA.996 (AT) TK2MSFTNGP02 (DOT) phx.gbl...
Dear Professional,

One quick question, is there any way we can shrink tempdb database and
don't need to restart SQL Server services?

Thanks in advance








Reply With Quote
  #5  
Old   
Rogers
 
Posts: n/a

Default Re: Shrink Tempdb - 02-19-2007 , 09:05 AM



Thanks hari, but this command is secure and not harmful to run in the
production box right.


"Hari Prasad" <hari_prasad_k (AT) hotmail (DOT) com> wrote

Quote:
Hello,

You could use DBCC SHRINKFILE.

use tempdb
go
-- this command shrinks the data file
dbcc shrinkfile (tempdev, 'target size in MB')
go
-- this command shrinks the log file
dbcc shrinkfile (templog, 'target size in MB')
go

Thanks
Hari

"Rogers" <naissani (AT) hotmail (DOT) com> wrote in message
news:u29%23VTsSHHA.480 (AT) TK2MSFTNGP02 (DOT) phx.gbl...
Is there any I can shrink tempdb data file but don't want to restart the
services?

Thanks

"Andrew J. Kelly" <sqlmvpnooospam (AT) shadhawk (DOT) com> wrote in message
news:%232yM8hYSHHA.1000 (AT) TK2MSFTNGP05 (DOT) phx.gbl...
Here are the supported ways to shrink tempdb.

http://www.support.microsoft.com/?id=307487

--
Andrew J. Kelly SQL MVP

"Rogers" <naissani (AT) hotmail (DOT) com> wrote in message
news:%23ftnxjVSHHA.996 (AT) TK2MSFTNGP02 (DOT) phx.gbl...
Dear Professional,

One quick question, is there any way we can shrink tempdb database and
don't need to restart SQL Server services?

Thanks in advance










Reply With Quote
  #6  
Old   
Mark Broadbent
 
Posts: n/a

Default Re: Shrink Tempdb - 02-20-2007 , 08:56 AM



if you do so during period of no activity there should not be any problems.
Schedule a job out of hours.

"Rogers" <naissani (AT) hotmail (DOT) com> wrote

Quote:
Thanks hari, but this command is secure and not harmful to run in the
production box right.


"Hari Prasad" <hari_prasad_k (AT) hotmail (DOT) com> wrote in message
news:%235SHLKvUHHA.1000 (AT) TK2MSFTNGP05 (DOT) phx.gbl...
Hello,

You could use DBCC SHRINKFILE.

use tempdb
go
-- this command shrinks the data file
dbcc shrinkfile (tempdev, 'target size in MB')
go
-- this command shrinks the log file
dbcc shrinkfile (templog, 'target size in MB')
go

Thanks
Hari

"Rogers" <naissani (AT) hotmail (DOT) com> wrote in message
news:u29%23VTsSHHA.480 (AT) TK2MSFTNGP02 (DOT) phx.gbl...
Is there any I can shrink tempdb data file but don't want to restart the
services?

Thanks

"Andrew J. Kelly" <sqlmvpnooospam (AT) shadhawk (DOT) com> wrote in message
news:%232yM8hYSHHA.1000 (AT) TK2MSFTNGP05 (DOT) phx.gbl...
Here are the supported ways to shrink tempdb.

http://www.support.microsoft.com/?id=307487

--
Andrew J. Kelly SQL MVP

"Rogers" <naissani (AT) hotmail (DOT) com> wrote in message
news:%23ftnxjVSHHA.996 (AT) TK2MSFTNGP02 (DOT) phx.gbl...
Dear Professional,

One quick question, is there any way we can shrink tempdb database and
don't need to restart SQL Server services?

Thanks in advance












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



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.