Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase 12345»»»

Transaction Log Growth, do you need it? Expand / Collapse
Author
Message
Posted Saturday, January 3, 2009 6:03 PM


SSC-Addicted

SSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-Addicted

Group: General Forum Members
Last Login: Monday, January 20, 2014 3:38 PM
Points: 473, Visits: 8,736
Comments posted to this topic are about the item Transaction Log Growth, do you need it?

~ Without obstacles, you cannot progress ~
http://sqln.blogspot.com/
Post #629390
Posted Monday, January 5, 2009 4:41 AM


UDP Broadcaster

UDP BroadcasterUDP BroadcasterUDP BroadcasterUDP BroadcasterUDP BroadcasterUDP BroadcasterUDP BroadcasterUDP Broadcaster

Group: General Forum Members
Last Login: Wednesday, January 2, 2013 12:15 PM
Points: 1,443, Visits: 711
James,
Well done! an excellent article...

Mark
Post #629683
Posted Monday, January 5, 2009 5:46 AM
Mr or Mrs. 500

Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500

Group: General Forum Members
Last Login: Monday, August 18, 2014 11:11 AM
Points: 596, Visits: 1,687
Multiple log files: I thought the recommendation was one log file per cpu, for performance?


Post #629710
Posted Monday, January 5, 2009 5:56 AM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Yesterday @ 12:58 PM
Points: 2,290, Visits: 2,752
Indianrock (1/5/2009)
Multiple log files: I thought the recommendation was one log file per cpu, for performance?

That's recommended for the data-files of the TempDB... (also keep them the same size)


** Don't mistake the ‘stupidity of the crowd’ for the ‘wisdom of the group’! **
Post #629720
Posted Monday, January 5, 2009 6:05 AM
Mr or Mrs. 500

Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500

Group: General Forum Members
Last Login: Monday, August 18, 2014 11:11 AM
Points: 596, Visits: 1,687
Oh, of course. I made my comment before the coffee was ready, sorry.


Post #629724
Posted Monday, January 5, 2009 8:11 AM
SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Monday, September 8, 2014 1:40 PM
Points: 925, Visits: 999
Good article. One thing to add, if running SQL2K5 or later on Windows 2003 or later, enable instance file initialization. Doing this will minimize the impact of growing the log or data file, especially for larger growth settings.

David



Post #629830
Posted Monday, January 5, 2009 8:30 AM
Mr or Mrs. 500

Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500

Group: General Forum Members
Last Login: Monday, August 18, 2014 11:11 AM
Points: 596, Visits: 1,687
This article indicates Instant File Initialization is only for data files.
http://www.microsoft.com/technet/prodtechnol/sql/2005/physdbstor.mspx

Instant File Initialization

SQL Server 2005 added support for the Windows instant file initialization feature. By default, when a file is created or grows larger, the pages in that file are initialized by writing zeros before the file gets used. This overwrites any existing data that remains on the disk. Instant initialization is only used for data files (not log files) and is enabled when the account running SQL Server has the Windows SE MANAGE VOLUME NAME privilege, which is available only on Microsoft Windows XP, Windows Server 2003 or later versions. This occurs in five scenarios:


During file creation


CREATE DATABASE, including tempdb creation at server startup.


RESTORE DATABASE


During file modification


ALTER DATABASE...MODIFY FILE.


Modifications that result in autogrow activity.



Post #629855
Posted Monday, January 5, 2009 9:00 AM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: Administrators
Last Login: Today @ 12:38 AM
Points: 33,267, Visits: 15,436
Good job, James. A nice explanation that I'll have to remember to run-run periodically.

I thought I heard last year that there's no great benefit to multiple log files, except space management. I wish I had a reference for that now.







Follow me on Twitter: @way0utwest

Forum Etiquette: How to post data/code on a forum to get the best help
Post #629890
Posted Monday, January 5, 2009 10:00 AM
SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Monday, September 8, 2014 1:40 PM
Points: 925, Visits: 999
This article indicates Instant File Initialization is only for data files.


That was an oversight on my part, you are correct. To much R&R over the holiday I guess.

David



Post #629950
Posted Monday, January 5, 2009 10:32 AM


SSC-Addicted

SSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-Addicted

Group: General Forum Members
Last Login: Monday, January 20, 2014 3:38 PM
Points: 473, Visits: 8,736
Steve, and everyone else...

Thanks for the great compliments!

Yes, as mentioned in my article, there is no performance benefit to multiple log files. It seems the only benefit is file management for disk space and other administrative tasks where you would want the log file in a smaller size (i.e. disk mirroring, or limited hard drive space).

BOL: Adding and Deleting Data and Transaction Log Files (http://msdn.microsoft.com/en-us/library/ms191433.aspx), says "SQL Server uses a proportional fill strategy across all the files within each filegroup and writes an amount of data proportional to the free space in the file. This enables the new file to be used immediately. In this way, all files generally become full at about the same time. However, transaction log files cannot be part of a filegroup; they are separate from one another. As the transaction log grows, the first log file fills, then the second, and so on, by using a fill-and-go strategy instead of a proportional fill strategy. Therefore, when a log file is added, it cannot be used by the transaction log until the other files have been filled first."

This is a solid indication that there is no benefit to performance when using multiple transaction log files.

Thanks,
James


~ Without obstacles, you cannot progress ~
http://sqln.blogspot.com/
Post #629978
« Prev Topic | Next Topic »

Add to briefcase 12345»»»

Permissions Expand / Collapse