Two Log Files in a DB

  • Hi Guys,

    In one of my client DB Server, i have observed in one of DB properties two log files are added. What is the use of adding two log files. Can some one explain on this.

  • There's no good reason for two log files, unless they are on separate drives and there's not enough space for the log on a single drive.

    SQL uses its log files one by one. It will not stripe log records across the two, it will not use them both concurrently.

    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
  • Thanks,

    As i have two log files in my DB, how can we know that which Log File is Active.

  • Run dbcc loginfo()

    Notice the FileId and Status columns. Status 2 means active.

    For example:

    FileId Status

    22539528192282640

    22621442621440000

    325395281920000

    32621442621440000

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

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