truncate ldf file in sql 7.0

  • I have several db's in my sql server 7.0, and most of the ldf file are about 8gb insize and i am running out of space, i am doing daily full backups in simple recover mode, how do i truncate ldf files to get more free space.

  • If you run DBCC SQLPERF(LOGSPACE) you should see that the used percentage is low.

    run sp_helpdb database name

    Then run the following

    DBCC SHRINKFILE paste in the log file logical name

    that should shrink the files down. bear in mind though, that the log file grows to that size because of data insertions, maintenance etc. The logs will grow again. If you find yourself constantly shrinking database files, I would consider increasing the drive space as you only incur extra IO's when extending the file size.

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply