主服务器出现错误时,不同的连接字符串

时间:2021-04-26 15:41:55

has anybody some Idea how to create at my website (running on sitecore) two connectionStings and switch between them base on server error?

有人知道如何在我的网站(运行在sitecore上)创建两个连接,并根据服务器错误在它们之间切换吗?

When I have two DB servers. Server A and Server B (there is a replication between all databases). My website is primary connected to server A. I need to find some solution how to connect website to Server B for when server A will be for example turned off or will not response from any other way.

当我有两个DB服务器时。服务器A和服务器B(所有数据库之间都有一个复制)。我的网站主要连接到服务器A。我需要找到一些解决方案,如何连接到服务器B,例如当服务器A被关闭或不响应时。

Thanks a lot.

非常感谢。

1 个解决方案

#1


3  

You can use a failover partner in your connection string:

您可以在连接字符串中使用故障转移伙伴:

Data Source=MainServer;Failover Partner=SecondaryServer;

Refer to section 3.8 of the scaling guide (PDF link here)

请参阅《缩放指南》第3.8节(PDF链接)

#1


3  

You can use a failover partner in your connection string:

您可以在连接字符串中使用故障转移伙伴:

Data Source=MainServer;Failover Partner=SecondaryServer;

Refer to section 3.8 of the scaling guide (PDF link here)

请参阅《缩放指南》第3.8节(PDF链接)