DBCC Shinkfile not works

  • Hi,

    One of the production database ABC had full backup yesterday, but the log size shows in the Taskpad was not reduced. This morning is 8877MB. I use DBCC SHRINKFILE (InSightAmKgODS_Log, 1000), tried to reduce it's size to 1000MB, but the results was only increased used space.

    I checked the website and found "The DBCC SHRINKFILE commands will not move data and reduce the file size if the EstimatedPages value equals the MinimumSize " and which is my situation : my minimumsize =1265, estimatedpages=1264.

    What I can do now?

  • check out article number 272318.

  • Jennifer,

    A full backup will not affect log size or log usage. DBCC SHRINKFILE won't work either unless you have unused space in your log. You need to truncate the log before attempting to shrink it.

    If you are not taking log backups (and don't intend to), you can issue

    BACKUP LOG ABC WITH TRUNCATE_ONLY

    then run the DBCC SHRINKFILE. If you do take log backups, then do so before running the shrinkfile, and your log should shrink.

    If your database is on SQL 7.0, the log may not shrink immediately.

    Steve Phelps

    SQL Server DBA

    American Fidelity Group

  • I had be told that using the BACKUP LOG with TRUNCATE_ONLY option was not recommended if you were using a Full or Bulk logged recovery model. The reason being that it breaks the sequential chain of transaction log backups. Has anyone had any issues with using this approach to shrink their log files?

  • I would recommend to take a full backup of the database, LOG backup, check if anyone is using the database. If no one is using then, use BACKUP LOG with TRUNCATE_ONLY. Then Use DBCC SHRINKFILE (InSightAmKgODS_Log, 1000).

    I did this yesterday even as well for one of the new boxes, when the log file shot upto 24GB & filled the disk instead of 200-500MB.

    .

Viewing 5 posts - 1 through 4 (of 4 total)

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