两个数据库可以共享相同的文件吗?
我正在设计一个应用程序并考虑一些有关数据库系统的选项,因为我不熟悉 Microsoft sql server。
我想知道是否可以让两个数据库共享相同的文件,如下所示: https://i.sstatic.net/dtU2F.png
这个想法是数据位于一个raid系统,这样它会给我们一些安全性,这样我们就可以节省同步两个数据库的精力,并节省一些存储设备的钱。
此外,我们一次只需要一个数据库,辅助数据库仅供第一个数据库发生故障时使用。
这可能吗? (我也愿意接受不同的方法,主要问题只是数据库冗余,我们的应用程序必须保证这一点)
I'm designing one application and considering some options regarding the database system since i'm not familiar with Microsoft sql server.
I would like to know if its possible to have 2 databases sharing the same files, like this:
https://i.sstatic.net/dtU2F.png
The idea is that the data is in a raid system so it would grant us some safety and this way we would save effort in synchronizing both databases, and save some money in storage equipment.
Also we only need one DB at a time, the secondary one is just for use in case of failure of the first one.
Is this possible? (I'm also open to different approaches, the main problem is just the database redundancy, our application must guarantee that)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
有点可能。你有几个选择。您可以进行 SQL Server 集群,这需要 SAN 并在 2 个实例之间共享数据文件,或者更经济的方法是 SQL 镜像。
集群有 2 个选项“主动/主动”或“主动/被动”,而 MIrroing 始终为“主动/被动”。除了高性能 SAN 之外的任何其他设备上的 SQL 集群无疑都会导致 SQL 出现性能问题。
两种解决方案都具有自动故障转移功能,根据您的需求,我建议镜像作为一个很好的解决方案。
此处对所有选项进行了很好的总结:
Somewhat possible. You have a few options. You can do SQL Server clustering which requires a SAN and shares the data file between the 2 instances, or a more economic approach is SQL mirroring.
Clustering has 2 options Active/Active or Active/Passive where as MIrroing is always Active/Passive. SQL Clustering on anything but a highly performant SAN will no doubt cause performance problems in SQL.
Both solutions have automatic failover and based on your needs, I would recommend Mirroring as a good solution.
A good summary of all your options is here: