<p>Can we have the database and transaction logs on the same drive? What will be its consequences if it is not recommended?</p>

[{'answer_id': 43262, 'author': 'T Percival', 'author_id': 954, 'author_profile': 'https://Stackoverflow.com/users/954', 'pm_score': 2, 'selected': False, 'text': '<p>The only downside is that it causes more thrashing on the disk, so worse performance.</p>\n\n<p>A single write will require 2 seeks (between: write transaction log, write data, commit log). Having the transaction log on a separate disk means as few as zero seeks, because the drive heads can remain on the transaction log and the data.</p>\n'}, {'answer_id': 43264, 'author': 'Nir', 'author_id': 3509, 'author_profile': 'https://Stackoverflow.com/users/3509', 'pm_score': 2, 'selected': False, 'text': "<p>The problem with having both on the same drive is that if the drive fails you lose both.</p>\n\n<p>If they are on different drives and the drive containing the data fails you can apply the log to the last backup so you don't lose any data.</p>\n"}, {'answer_id': 43273, 'author': 'erlando', 'author_id': 4192, 'author_profile': 'https://Stackoverflow.com/users/4192', 'pm_score': 0, 'selected': False, 'text': "<p>An company I worked for earlier had transaction logs and datafiles side by side on the same drive, in the same folder on several servers.</p>\n\n<p>This didn't cause any problems datawise.</p>\n\n<p>As others have noted it may well have impact on performance. And if you lose the drive you lose both.</p>\n"}, {'answer_id': 43471, 'author': 'Jakub Šturc', 'author_id': 2361, 'author_profile': 'https://Stackoverflow.com/users/2361', 'pm_score': -1, 'selected': False, 'text': '<p>In some scenarios you don\'t need transaction log at all. In that case you can switch database to <a href="http://msdn.microsoft.com/en-us/library/aa173563(SQL.80).aspx" rel="nofollow noreferrer">Simple Recovery Mode</a> and you gain performance and simpler administration benefits.</p>\n'}, {'answer_id': 43755, 'author': 'Portman', 'author_id': 1690, 'author_profile': 'https://Stackoverflow.com/users/1690', 'pm_score': 0, 'selected': False, 'text': "<p>Just to add briefly to Ted Percival's comment above...</p>\n\n<p>A hard disk drive will perform fastest if it is doing sequential writes or sequential reads, because the drive head doesn't need to move around. </p>\n\n<p>SQL Server log files happen to be sequential, so if you dedicate a hard drive to ONLY the logs, you will see a noticeable performance improvement.  That said, for smaller databases where performance is not an issue, it doesn't matter. </p>\n\n<p>And as for Nir's comment on drive failures -- hopefully you are handling that at a lower level, by putting both your data and logs on RAID arrays. </p>\n"}]
['https://Stackoverflow.com/questions/43259', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/4021/']