在分区之间分离数据库文件和传输日志的用处

发布于 2024-07-25 16:18:40 字数 349 浏览 14 评论 0原文

我工作的一些人正在为 SQL Server 设置新的数据库服务器。 服务器有一个还存储备份的系统驱动器和一个用于存储数据库文件的 RAID 5 阵列。 RAID 5 阵列在逻辑上分为 2 个驱动器。 一个用于实际数据库文件 (MDF),另一个用于事务日志 (LDF)。 引用的原因是最佳实践。

我的问题是这种额外的分区是否毫无意义。 如果数据库和事务日志仍然共享相同的物理资源,那么将它们放在不同的逻辑分区上还有什么意义吗? 我知道将数据库和事务日志文件分离到两个物理上独立的磁盘上有一些重要的原因。 例如,应该提高速度和灾难恢复。 然而,我想不出有什么好处不会因缺乏物理隔离而被抵消。 我对 RAID 的了解还不够,无法确定。

Some guys where I work are setting up a new database server for SQL Server. The server has a system drive that also stores backups and a single RAID 5 array for the database files. The RAID 5 array is logically partitioned into 2 drives. One is for the actual database files (MDF) and the other is for the transaction logs (LDF). The quoted reason is best practices.

My question is whether this extra partitioning is pointless. Is there any purpose to having the database and trans logs on different logical partitions if they are still sharing the same physical resources? I understand there are some great reasons for separating the database and trans log files on to two physically separate disks. For instance, speed and disaster recovery should be improved. However, I can't think of any benefits that aren't negated by the lack of physical separation. I don't know enough about RAID to know for sure.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

陌路黄昏 2024-08-01 16:18:40

你说得很对。 唯一可能出错的情况是分区损坏,这种情况非常罕见(并且可能由您的 RAID 硬件来满足)。

我发现通过引用不同的主轴而不是不同的驱动器来谈论将数据文件与日志文件分离(或者实际上,分离表读取并行化的文件组)更容易。 对于那些了解一点并且知道它很危险的人来说,它变得更加明显:)

You're pretty much on the mark. The only other situation that could go wrong is a partition corruption, and they're incredibly rare (and probably catered for by your RAID hardware).

I find it's easier to talk about separating data files from log files (or, indeed, separating filegroups for table-read parallelisation) by referring to different spindles rather than different drives. It makes it more obvious to those who know a little and know it dangerously :)

情释 2024-08-01 16:18:40

将数据和日志文件分开通常是矫枉过正的。 如果您确实遇到需要它的情况,您就会知道。

但即便如此,只有将它们分离到不同的主轴上才有帮助。 将它们放在同一物理主轴上不会给您带来任何好处。

另一方面,您不会丢失任何东西 - 除了知道与数据库相关的所有内容都在文件夹中而感到安心。

Separating data and log files is usually overkill. If you actually have a situation where you need it, you'll know.

But even then, it only helps if you separate them onto different spindles. Having them on the same physical spindle(s) doesn't gain you anything.

On the other hand, you don't lose anything - except the comfort of knowing that everything related to your database is in this folder.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文