Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Log File for Database 'Tempdb' is full

Status
Not open for further replies.

niallo32

IS-IT--Management
Apr 29, 2004
404
IE
I have SQL Server running on a Windows 2000 Server. I am getting an error message in the Event Viewer - "The Log File for Database 'Tempdb' is full. Backup the transaction log for the database to free up some log space.".

How do I proceed?

Thanks,
 
There are two issues here.

1. You are not allowing the TEMPDB log to grow fast or large enough. Make sure TEMPDB is set to autogrow and then set a size or percentage to grow by. (I use size).

2. Clearing the TEMPDB log is easy. Stop and start the services. Every time the services are stopped and restarted TEMPDB is rebuilt from scratch.

-SQLBill
 
Another solution for clearing the log file is using the BACKUP LOG TEMPDB WITH TRUNCATE_ONLY.

-SQLBill

Posting advice: FAQ481-4875
 
Thanks a lot for the prompt reply SQLBill, just to clarify, I need to go into SQL Service Manager and stop the
Services there?

 
Do I issue this command from 'Query Analyser' -> BACKUP LOG TEMPDB WITH TRUNCATE_ONLY. ??

Cheers,


 
Yes. That's the easiest way to do it. You want to stop MSSQLServer and SQLServerAgent services.

-SQLBill
 
And yes, run that command from Query Analyzer.

Refer to the BOL for more information.

-SQLBill

BOL=Books OnLine=Microsoft SQL Server's HELP
Installed as part of the Client Tools
Found at Start>Programs>Microsoft SQL Server>Books OnLine

Posting advice: FAQ481-4875
 
Thanks again, I did'nt know that existed so it'll be a handy reference.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top