Link to home
Start Free TrialLog in
Avatar of AnHao
AnHao

asked on

The log file for database 'tempdb" is full. Backup the transaction log for the database to free up. Error 9002, sererity 17, state 6.

My database is SQL server 2000. My database size is 27GB. My tempdb size is 100MB including tempdb.mdf=98MB and tempdb.ldf=3MB). Both tempdb.mdf and tempdb.ldf files are auto grow by 10% with unrestricted size. The free hard disk is 12GB. Users can not query. Please give me your advice.
Avatar of reb73
reb73
Flag of Ireland image

When you can get all users out, run the following commands -

USE tempdb
BACKUP TRANSACTION tempdb WITH TRUNCATE_ONLY
CHECKPOINT
DBCC SHRINKFILE(1, 10240)  -- reduces tempdb.mdf to 10GB
It would be advisable to run these statements in a scheduled SQL job every weekend to keep the tempdb size down on an ongoing basis..
ASKER CERTIFIED SOLUTION
Avatar of Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3]
Flag of Luxembourg image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial