Re:logfiles grow non-stop in SQL2000
- From: Hari Prasad<hari_prasad_k@xxxxxxxxxxx>
- Date: Wed, 30 Mar 2005 21:42:06 -0800
Hi Chris,
Looks like the recovery model for your database is FULL or BULK_LOGGED.Please change the recovery model for the database to
SIMPLE if your database is non production. Use the below command to set the database to SIMPLE.
ALTER database <DBNAME> set recovery SIMPLE
If you do not have the 65 G to take a backup or if you do not want the transaction log backup. You could truncate the transaction
log and shrink the LDF file.
backup log <dbname> with truncate_only
go
DBCC SHRINKFILE (db1_log1_logical_name,truncatÂeonly)
If you need the transaction log backup do:-
backup log <dbname> to disk='d:\backup\dbname.trn'
go
DBCC SHRINKFILE (db1_log1_logical_name,truncatÂeonly)
Now execute the below command to see log file size and usage.
DBCC SQLPERF(LOGSPACE)
Note:
If you need to keep the recovery model to FULL then schedule a transaction log backup in frequent intervals (atleast 30 minutes once).
This will keep the log file size under control.
Thanks
Hari
SQL Server MVP
____________________________________
Christos Kritikos Wrote:
Hello,
I am running SQL 2000 Enterprise (with all the updates) on a Win2000 Std
Server. This DB is part of a webiste that includes users loging-in etc - so
the DB is accessed by the webservers.
The logfiles for the most frequently-used databases grow non-stop. If I
don't do anything about it they will just grow until I run out of disk space!
I tried to limit the maximum logfile size (through enterprise manager) but
the result is that the DB becomes inaccessible when the logfile hits the
limit. Is this normal? I am reading some documents that SQL sever is supposed
to re-use the unnecessary part of the logfiles. How come this doesn't happen?
I went through KB 317375 (Transaction Log Grows Unexpectedly or Becomes Full
on SQL Server). It lists a number of reasons that may cause this problem. How
can I figure out if some of these conditions apply in my case? Just by
reading through them it seems as if they don't apply, but I may be mistaken.
Million thanks for the help. I have been struggling with this for days!
christos
Sent via SreeSharp NewsReader http://www.SreeSharp.com
.
- Follow-Ups:
- Re:logfiles grow non-stop in SQL2000
- From: Christos Kritikos
- Re:logfiles grow non-stop in SQL2000
- Prev by Date: Re: logfiles grow non-stop in SQL2000
- Next by Date: SQL Server 2000 Workgroup Edition
- Previous by thread: Re: logfiles grow non-stop in SQL2000
- Next by thread: Re:logfiles grow non-stop in SQL2000
- Index(es):
Relevant Pages
|