在本文之后,我正在尝试将辅助数据库加入我的 SQL Server 2012 可用性组:
当我尝试这样做时,本地 SQL Server Windows 事件日志给出错误 1407:
The remote copy of database "<DBNAME>" is not related to the local copy of the database
我已按照所有步骤操作并使用 NORECOVERY 创建了最近的备份和恢复。
目标 SQL 服务器的错误日志给出了以下错误:
AlwaysOn: The local replica of availability group '<AGNAME>' is going offline because the corresponding resource in the Windows Server Failover Clustering (WSFC) cluster is no longer online. This is an informational message only. No user action is required.
The state of the local availability replica in availability group '<AGNAME>' has changed from 'SECONDARY_NORMAL' to 'RESOLVING_NORMAL'. The replica state changed because of either a startup, a failover, a communication issue, or a cluster error. For more information, see the availability group dashboard, SQL Server error log, Windows Server Failover Cluster management console or Windows Server Failover Cluster log.
The state of the local availability replica in availability group '<AGNAME>' has changed from 'RESOLVING_NORMAL' to 'NOT_AVAILABLE'. The replica state changed because of either a startup, a failover, a communication issue, or a cluster error. For more information, see the availability group dashboard, SQL Server error log, Windows Server Failover Cluster management console or Windows Server Failover Cluster log.
集群及其所有节点都在线。AG 仪表板不提供任何其他信息来帮助诊断问题。
打开所有防火墙并没有解决问题。
Windows 事件日志给出了这一行:
The database 'DelphiOBUDB' is marked RESTORING and is in a state that does not allow recovery to be run.
但是,当您还原数据库并根据教程指南指定 NORECOVERY 标志时,数据库将处于还原模式。
如何将数据库加入我的可用性组?