Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
当使用 TSQL 在 SQL Server 2005 中发生故障转移时,如何连接到主体数据库.....故障转移后,主体数据库变为镜像,但我仍然如何使用 SQL 命令连接到新主体
您需要更改连接字符串以连接到新主体。
有两种主要方法可以做到这一点:
在第一个连接字符串中包含故障转移详细信息,因此系统将尝试原始主体,连接失败,然后尝试故障转移。
手动或在故障转移时更改连接字符串,以直接使用故障转移服务器的详细信息。