DBCC SHRINKFILE with TRUNCATEONLY and LogShipping

  • SQL 2008 STD

    Will the DBCC SHRINKFILE with TRUNCATEONLY command e.g DBCC SHRINKFILE(N'TestDB_Log' , 0, TRUNCATEONLY) - on the LOG file of the database cause any issues with LogShipping?

    I mean DBCC ShrinkFile and not any form of Backup with Truncate_Only or similar.

    It is the "Truncate" word that is getting me to just double check.

    thanks

  • The truncate only option is ignored on a log file, it's only valid for data file shrink operations. You've just told SQL to shrink your log as small as possible (target 0). It's not going to break log shipping, but it's a very bad thing to do to a log. All you're going to do is force queries to wait while SQL regrows the log.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass

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

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