When you create a second location for a transaction log, how does SQL handle it? How do I make sure the database starts to write transactions to the new file? I created the second log file because we have run out of disk space.
Creating an additional file for databases and transaction logs can not only provide additional space, it can also improve database performance. Note that performance can improve for a database when you create multiple files on distinct hard disk or RAID devices. But performance will
improve for a transaction log when you do the same thing. Why? As it turns out, transaction logs only write to the last active page of the transaction log at any given moment. Thus, the transaction log can only write on one file at any given time. SQL Server will automatically start to write to the new file as space on the original file is consumed. You will not need to do any sort of manual switch over. Also, make sure you have a good backup routine in place, so your transaction log will be frequently cleaned out. In my production systems, my rule of thumb is to do a full database backup nightly and transaction log backups every 15 minutes.
By submitting your personal information, you agree that TechTarget and its partners may contact you regarding relevant content, products and special offers.
Do you have comments on this Ask the Expert Q&A? Let us know.