Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SQL Server Administration (2005)
 tempdb

Author  Topic 

private1010
Starting Member

15 Posts

Posted - 2008-06-16 : 20:31:56
Hi All
if temdb grows and use all the disk space and then after log backup or other clean up process its size got reduced but it is still holding the space it was grown upto. In this case what would be ideal to do restart server/services or is it possible to reduce the space alocated to tempdb through properties.

any help will be appreciated.

Thanks

dewacorp.alliances

452 Posts

Posted - 2008-06-16 : 21:21:06
You may need to run shrinkdb on that table and sized to the size that you want.
Go to Top of Page

private1010
Starting Member

15 Posts

Posted - 2008-06-18 : 21:56:04
Is it advisable to run shrinkdb for system databases or would it work for system databses. i never tested it........ any one test it beofore??????????
Go to Top of Page

rmiao
Master Smack Fu Yak Hacker

7266 Posts

Posted - 2008-06-18 : 22:30:22
You can just shrink tempdb's log file.
Go to Top of Page

private1010
Starting Member

15 Posts

Posted - 2008-06-18 : 23:33:37
but in my case issue is size of tempdb data file............. it was grown upto 50GB then i restart the server and it is now at 22MB. what i am trying to find out is there is any otehr way to get the disk space without restarting the services/server.
Go to Top of Page

rmiao
Master Smack Fu Yak Hacker

7266 Posts

Posted - 2008-06-21 : 17:13:42
You can shrink tempdb data file too.
Go to Top of Page

sachinsamuel
Constraint Violating Yak Guru

383 Posts

Posted - 2008-06-22 : 02:44:20

1) You can shrink the data files as mentioned by experts above.

Or

2) Restart the database server. As tempdb is a temporary database, SQL Server will recreated it on restart.

Or

3)
a) Restart SQL Server with minimal configuration.

b) ALTER DATABASE tempdb MODIFY FILE
(NAME = 'tempdev', SIZE = target_size_in_MB)
--Desired target size for the data file

ALTER DATABASE tempdb MODIFY FILE
(NAME = 'templog', SIZE = target_size_in_MB)
--Desired target size for the log file

c) Stop SQL Server by pressing Ctrl-C at the command prompt window, restart SQL Server as a service, and then verify the size of the Tempdb.mdf and Templog.ldf files.


For more information please visit http://support.microsoft.com/kb/307487

Hope this helps.

regards
Sachin

Don't sit back because of failure. It will come back to check if you still available. -- Binu
Go to Top of Page
   

- Advertisement -