简体   繁体   English

SQL Server数据库镜像和ASP.Net应用程序

[英]Sql Server database mirroring and ASP.Net applications

使用SQL Server数据库镜像,我们是否需要处理ASP.Net应用程序中的某些内容,还是只需要更改web.config中的连接字符串?

Depends on the configuration of the mirroring; 取决于镜像的配置; as to whether you have automatic failover setup, etc. 关于是否具有自动故障转移设置等

If you have failover enabled, the connection string will stay the same as it should just point to the virtual IP of the failover using DNS or directly. 如果启用了故障转移,则连接字符串将保持不变,只是使用DNS或直接指向故障转移的虚拟IP。

If not, you may have to change it to whichever host is active at that point. 如果没有,您可能必须将其更改为当时处于活动状态的主机。

As far as the application is concerned, it just needs to know where it gets it's data from and this is the connection string from web.config. 就应用程序而言,它只需要知道从哪里获取数据,这就是来自web.config的连接字符串。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM