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 IS FUll

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2007-03-20 : 09:53:59
Amey writes "Dear All,

IF The Tempdb of log file is full and i am having no other diskspace and i have to free the space from tempdb i don't want to stop and restart the sql server how can i do ? i cant stop and restart the server how can i free the space from the tempdb?

Reply me......"

pareshmotiwala
Constraint Violating Yak Guru

323 Posts

Posted - 2007-03-20 : 12:35:35
hmm...
this is interesting. If there is no space on your hard drives, how are you having all other databases running? or they are not running?
If they are running these databases are probably on a different drive. You could use another file with your tempdb on this drive.

If the other databases are locked due to lack of space, you have bigger problem..

but try this:

USE [tempdb]
GO
DBCC SHRINKFILE (N'tempdev' , 0, TRUNCATEONLY)
GO
Go to Top of Page

DMcCallie
Yak Posting Veteran

62 Posts

Posted - 2007-03-23 : 14:01:42
BACKUP LOG tempdb With Truncate_only
Go to Top of Page

MohammedU
Posting Yak Master

145 Posts

Posted - 2007-03-23 : 15:07:39
Log file full error will cause the procedure/query to fail which is causing the log file to full.
And you use BACKUP LOG command which is mentioned by DMcCallie to truncate the log but the real question is what caused it and how to fix it...
So find the procedure/query which casued log file to full and fix it...and make sure you have enough free space for tempdb ...


MohammedU
Go to Top of Page
   

- Advertisement -