Can I make two or more LDF files...

  • Can I make two or more LDF files...of same database,without using logshipping ,mirroring etc.

    Thanks

  • A database can have multiple ldf files. The question is, why would you want to? It gains you nothing.

    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
  • [font="Courier New"]

    Yes, you can add 2 or more log files to a database without loosing log shipping and mirroring but my question to you is why? There isn't any gain you get by creating multiple log files and there are 1 or 2 use cases under extreme conditions where it will be useful. Can you share what are you trying to do here so that we can see what you actually need?

    [/font]

    [font="Courier New"]Sankar Reddy | http://SankarReddy.com/[/url][/font]

  • Dear Gila and Shankar,

    Thanx for reply,actually I want to understood how sql works in backend if more than one log file exist..

    Thanks

  • Pretty much same as when there's only one log file.

    It uses one, then uses the other, then goes back to the first, etc.

    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
  • Thanx

    and if any one is corrupted?

    Thanks

  • Then SQL will throw errors when it hits the corruption, exactly as if will if there's one log file and it gets corrupted.

    There is NO advantage, no benefit to having multiple log files. It doesn't improve performance, it doesn't improve relaibility, SQL uses them sequentially. Having one log file of 10GB and having 2 of 5 GB each is pretty much the same.

    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
  • about the only use for multiple log files would be the following type of scenario

    You have your database log file on drive D:

    The drive runs out of space

    You have free space on drive K:

    You temporarily create a log file on drive K: to alleviate the situation

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

    "Ya can't make an omelette without breaking just a few eggs" 😉

  • My question is we can restrict the first ldf size like to 5 gb and giving to other ldf in another drive.

    will it takes?

    And what is the use of another ldf i.e, only when the space is not available in the present drive is that only reason .

Viewing 9 posts - 1 through 8 (of 8 total)

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