shrink issue on log shipping RRS feed

  • Question

  • performing shrink issues on the primary in log shipping, what happens secondary?
    Friday, October 8, 2010 5:31 PM

All replies

  • DBCC SHRINKFILE reduces physical size of log file for example.. means 'small log' will be applied on the secondary
    Best Regards, Uri Dimant SQL Server MVP http://dimantdatabasesolutions.blogspot.com/ http://sqlblog.com/blogs/uri_dimant/
    Sunday, October 10, 2010 7:29 AM
  • The shrunken space will also be reflecting in the secondary both logically(inside the logfile) and physically(size of the logfile on disk).
    Thanks, Leks
    Monday, October 11, 2010 5:27 AM
  • Yes, I can confirm this.

    My Primary database had a log file of 20 GB and so did the secondary database in a log shipping configuration.

    There is no method to shrink the secondary database's log file since it is in read only mode.

    So when I ran a  DBCC shrink on the primary database and ran the LSBackup, LSCopy and LSRestore job, it did shrink the log file on the secondary database too.

    So it looks like DBCC shrink commands are executed on the secondary as well.

    Wednesday, October 13, 2010 10:52 PM
  • thats correct. Shrink is logged operation and would be "propogated" to secondary by next log backup.
    Balmukund Lakhani | Please mark solved if I've answered your question
    This posting is provided "AS IS" with no warranties, and confers no rights.
    My Blog: http://blogs.msdn.com/blakhani
    Team Blog: http://blogs.msdn.com/sqlserverfaq
    Wednesday, October 13, 2010 11:54 PM