SQL Server 2005 中发生故障转移时如何连接到主体数据库?

发布于 2024-08-26 10:43:29 字数 96 浏览 9 评论 0原文

当使用 TSQL 在 SQL Server 2005 中发生故障转移时,如何连接到主体数据库......故障转移后,主体数据库成为镜像,但我仍然如何使用 SQL 命令连接到新主体

How can I connect to a principal database when a failover occurs in SQL server 2005 using TSQL.....after failover a pricipal database becomes mirror but still how can i connect to the new pricipal using SQL command

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

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

发布评论

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

评论(1

国粹 2024-09-02 10:43:29

您需要更改连接字符串才能连接到新主体。

有两种主要方法可以执行此操作:

  1. 在第一个连接字符串中包含故障转移详细信息,以便系统将尝试连接原始主体,连接失败,然后尝试故障转移。

  2. 手动或在故障转移时更改连接字符串,以直接使用故障转移服务器的详细信息。

    手动或在故障转移时更改连接字符串,以直接使用故障转移服务器的

You need to change your connecction string to connect to the new principal.

There are two main ways to do this:

  1. Include the failover details in the first connection string, so the system will attempt to the original principal, fail to connect and then try the failover.

  2. Change the connection string either manually or on a failover, to use the failover server's details directly.

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