Shrink the log file of database which is in transactional replication

  • I want to shrink the log file of database which is in transactional replication?

    Can I?

    Any msdn link any help.

    Thanks

  • Just I need to understand what circumstances you want to shrink the log file. Do you have transaction log backup going on? Are you in need of space released to the operating system.

  • Thanks

    Within 3-4 days the log drive will full,Transaction log backup is configured but this database is in replication so Can I shrink the log file..

    Thanks

  • forsqlserver (4/3/2012)


    Thanks

    Within 3-4 days the log drive will full,Transaction log backup is configured but this database is in replication so Can I shrink the log file..

    Yes you can.

    Log file shrinking is allowed for replicated databases.

  • Shrinking is not a good practice. Even it is for a transaction log also. You have to plan to add more space.

  • baabhu (4/3/2012)


    Shrinking is not a good practice. Even it is for a transaction log also.

    Could you please elaborate the points for not doing the shrink on log files...

  • Just to validate, you do have log backups in place? If you're not backing up the log frequently enough, you may be seeing excessive growth. Make sure you are backing up the logs and if you are, consider upping the frequency of the backups.

    Shrinking logs is not as bad for the system as shrinking data files, but it should still be a rare event.

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

  • are you saying the log continues to grow even though you are running log backups?

    If so what is the value of log_reuse_wait_desc in master.sys.databases

    ---------------------------------------------------------------------

  • Thanks...I will shrink.

    Thanks

  • sqlzealot-81 (4/3/2012)


    baabhu (4/3/2012)


    Shrinking is not a good practice. Even it is for a transaction log also.

    Could you please elaborate the points for not doing the shrink on log files...

    http://www.sqlservercentral.com/articles/Administration/64582/

    ---------------------------------------------------------------------

  • Please read through this: http://www.sqlservercentral.com/articles/Transaction+Log/72488/

    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 11 posts - 1 through 10 (of 10 total)

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