Comments on: How Many Log Files Should My SQL Server Database Have? https://thomaslarock.com/2011/08/how-many-log-files-should-my-sql-server-database-have/ Thomas LaRock is an author, speaker, data expert, and SQLRockstar. He helps people connect, learn, and share. Along the way he solves data problems, too. Mon, 20 Aug 2018 20:28:52 +0000 hourly 1 https://wordpress.org/?v=6.7.2 By: Offshore Outsourcing https://thomaslarock.com/2011/08/how-many-log-files-should-my-sql-server-database-have/#comment-7239 Fri, 10 Aug 2012 09:45:00 +0000 http://thomaslarock.com/?p=6544#comment-7239 not a bad script you have given in your site but it should be not enough plz give some more ok.

]]>
By: Bob Barrows https://thomaslarock.com/2011/08/how-many-log-files-should-my-sql-server-database-have/#comment-2722 Mon, 29 Aug 2011 22:03:25 +0000 http://thomaslarock.com/?p=6544#comment-2722 Thomas, your guess is spot on. It was the only way I could get a log that was properly sized.

My test restore went without a hitch so I’m pretty confident about that.

]]>
By: Thomas LaRock https://thomaslarock.com/2011/08/how-many-log-files-should-my-sql-server-database-have/#comment-2721 Mon, 29 Aug 2011 21:19:16 +0000 http://thomaslarock.com/?p=6544#comment-2721 In reply to Bob Barrows.

Bob,

Not sure I understand how splitting your log into two files helped you, since you didn’t have enough disk space. My guess is that, as an example, you needed 10GB and couldn’t get that on one disk, so you created one log file of 5GB on one disk and another 5GB log file on the second disk. Does that sound right?

Your log file is circular and written to sequentially. Your situation seems to be an interesting one, no question. I don’t want to put words (or anything else) into Paul’s mouth, but from my perspective I would find it trickier for a handful of reasons. First, I have logs in two different locations, making it slightly harder to know where all my database files are. Second, restores have an extra “gotcha” that could go wrong. Third, I wouldn’t know which log files was being used without going to look at it first, which is also extra overhead I wouldn’t have if I used just the one file.

I’m sure I can think of more, but those came to mind first. Thanks for your comment, I will see if Paul can leave a comment as well and let us know about other pitfalls for having more than one log file.

Tom

]]>
By: Thomas LaRock https://thomaslarock.com/2011/08/how-many-log-files-should-my-sql-server-database-have/#comment-2720 Mon, 29 Aug 2011 21:09:49 +0000 http://thomaslarock.com/?p=6544#comment-2720 In reply to Chris Miller.

Chris,

That does sound like a nice feature, and I wouldn’t be surprised if it has been discussed at Microsoft previously. I can look to bring it up again.

Thanks for the comment.

Tom

]]>
By: Bob Barrows https://thomaslarock.com/2011/08/how-many-log-files-should-my-sql-server-database-have/#comment-2719 Mon, 29 Aug 2011 15:51:12 +0000 http://thomaslarock.com/?p=6544#comment-2719 What is the downside to having multiple log files? I’m in a situation where disk space is tight. For a very large database, I need a log file that is larger than the available space on any of the disks on the server. Management has rejected my suggestion to add a disk. So my only solution was to split the log into two files. Paul talked about “making management more tricky” but failed to elaborate. In what way is management trickier?

]]>
By: Chris Miller https://thomaslarock.com/2011/08/how-many-log-files-should-my-sql-server-database-have/#comment-2718 Mon, 29 Aug 2011 13:19:03 +0000 http://thomaslarock.com/?p=6544#comment-2718 Hi all,

I’m a DBA that specialises in both Oracle & SQL Server. You might be aware that Oracle allows you to multiplex your “online redo log files” (the equivalent of the transaction log). The Oracle database will therefore maintain all the copies of the redo log, will write to one if the other is unavailable & will improve recoverability if a disk fails. I suppose the bottom line is that it gives us DBAs another option – more flexibilty which is key when faced with disaster scenarios.

Any comments?

I’ve asked Microsoft if there were any plans to implement multiplexing bit no plans yet.

Thanks,

Chris.

]]>
By: Vanessa https://thomaslarock.com/2011/08/how-many-log-files-should-my-sql-server-database-have/#comment-2717 Mon, 29 Aug 2011 06:24:48 +0000 http://thomaslarock.com/?p=6544#comment-2717 Hey, nice point to share.
I just read an article about Log file and SQL(http://www.todo-backup.com/backup-resource/sql-backup-software/three-sql-server-recovery-models.htm
). Might be a good theory support of your idea.

]]>