2013-10-03 38 views
0

我試圖加入一個次要DB到我的SQL Server本文以下2012可用性組:數據庫的遠程複製「<DBNAME>」不涉及到數據庫的本地副本

Join a Secondary Database to an Availability Group (SQL Server)

當我嘗試這個本地的SQL服務器的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標誌按照教程指引DB留在恢復模式。

如何將數據庫加入我的可用性組?

+0

在http://dba.stackexchange.com/ –

+0

可能會更好地詢問這個問題。儘管刪除備份歷史看起來很有前途,但並沒有幫助。 http://blogs.technet.com/b/sql_server_isv/archive/2010/10/26/how-to-clean-up-old-database-backup-history.aspx –

回答

0

該問題與刪除數據庫在重新運行powershell腳本以重新創建可用性組之前有關。

我也看到了試圖使用相同的DB名字時,這個錯誤:

Add-SqlAvailabilityDatabase : The connection to the primary replica is not active. The command cannot be processed. 

答案是執行PowerShell腳本來創建使用新的和不同的數據庫名稱的數據庫和可用性組。

相關問題