shrink file

  • why does shrinking a data file cause the log file to grow?

  • also, why is it some log file will shrink right away and others won't at all or take time to shrink?

  • On the second point....

    If you issue the DBCC SHRINKFILE command for the log file, SQL Server will mark a shrinkpoint in the log but no actual shrinking will take place until log records are freed by either backing up or truncating the log.

    More in BOL....

    Tim

  • Also on the second point, if it is SQL 7 the point is marked but the virtual logs sometimes do not free until transactions take place then it may fre itself or you will need to force.

  • ya it is a 7.0 database.

    I issue a dbcc shrinkfile for the log and I have truncate log on checkpoint enabled. After the dbcc shrinkfile is ran I issue a checkpoint but it does not shrink right away.

    I find that some log files shrink right away but most take a while.

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

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