How many log files will exist in a SQL Server Database with 4 secondary files?

  • How many log files will exist in a SQL Server Database with 4 secondary files in addition to the primary file - (irrespective of physical location)? I would expect there to be 5 log files, one for each data file, but not sure. On MS site, I saw some info that confused me a little. thanks - Richard

  • log files are written to sequentially, therefore there is only a need for 1 log file, no matter how many data files.

    there is no performance gain to multiple log files.

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

  • So then, the one log file keeps track of all changes to MDF's, and NDF's. That means the log record must have info about which file is being affected with each transaction. thanks, Richard

  • You only need one log file. You can create more, but there's very seldom a good reason to do so.

    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
  • Many Thanks!!!

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

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