• anoop.mig29 (3/19/2013)


    hi i know that shrinking data base increase fragmentation , so logically shrinking data files would two result in fragmentation but does shrinking log file increases fragmentation. i hope answer is NO.

    Index fragmentation, no. However, lots of shrink/grow/shrink/grow will cause log fragmentation. You shouldn't be regularly shrinking your logs. Once off, yes. Regular, no.

    Please read through this - Managing Transaction Logs[/url]

    Second question is rebuilding an index reduces fragmentation but it increase size of database.I have seen increase in size of log file but does data file size to increases .

    Yes it can. If there's not enough space in the database for the new index, the data file will grow.

    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