针对集群数据库进行编程
我有一个使用 ADO.NET 针对 MS SQL Server 或 Oracle 运行的 C# 应用程序。
假设客户想要使用某种数据库集群或同步复制来实现弹性和/或性能。
我假设我的应用程序代码不必考虑这一点是否正确?即数据库完整性规则和锁定的遵守与标准单一数据库完全相同?我可能会掉进什么洞吗?
谢谢安迪
I have a C# application that works against MS SQL Server or Oracle using ADO.NET.
Let's say a customer wants to use some kind of database clustering or synchronous replication for purposes of resilience and/or performance.
Am I correct in assuming that my application code does not have to take any account of this? i.e. that database integrity rules and locking are honoured exactly the same as they are for a standard single database? are there any holes I might fall into?
Thanks
Andy
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
是的。
Yes.
通常,您唯一需要担心的是连接字符串。具体来说,您需要使用集群名称而不是节点名称。
这是一个小问题,但如果您错过了它,则可能会破坏 HA 对和/或负载平衡集群的作用。
Typically the only thing you have to worry about is the connection string. Specifically you need to go against the cluster name instead of the node name.
Its a minor point but if you miss it, you can undermine the point of your HA Pair and or Load balancing cluster.