July 8, 2013 at 4:41 am
there is one ldf file for our database. if we create one more ldf for the same database. then both of these ldfs are shared for transactions or after filling one ldf next one will comes in place.
July 8, 2013 at 4:56 am
m.rajesh.uk (7/8/2013)
there is one ldf file for our database. if we create one more ldf for the same database. then both of these ldfs are shared for transactions or after filling one ldf next one will comes in place.
The transaction log is written to sequentially. This means that if you add another log file, it will only be used once the first one has filled up completely.
Note that there is absolutely no performance gain from having additional transaction log files.
July 8, 2013 at 5:13 am
I created second ldf file with initial size as 2 mb and filegrowth option is set as unrestricted to both ldf files. when i saw after some time the first ldf is 113 mb second ldf is 6 mb. so why it is using secondary ldf.
July 8, 2013 at 6:26 am
It will use the first then the second then the first again then the second again, etc. The log files will only grow if both are full.
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
July 9, 2013 at 9:04 am
GilaMonster (7/8/2013)
It will use the first then the second then the first again then the second again, etc. The log files will only grow if both are full.
Just curious--will SQL server grow both log files according to their auto-growth settings at that point, or just the one it was using at the point it ended up with them both full?
July 9, 2013 at 9:15 am
paul.knibbs (7/9/2013)
GilaMonster (7/8/2013)
It will use the first then the second then the first again then the second again, etc. The log files will only grow if both are full.Just curious--will SQL server grow both log files according to their auto-growth settings at that point, or just the one it was using at the point it ended up with them both full?
Don't recall. Try it and let us know?
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
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply