Sign in with Microsoft
Sign in or create an account.
Hello,
Select a different account.
You have multiple accounts
Choose the account you want to sign in with.

徵狀

請試想下列案例:

  • 您使用的是 Microsoft SQL Server 2012 或 SQL Server 2014。

  • 您擁有在主要複本中啟用 service broker 的資料庫。

  • 您在已啟用 service broker 的主要伺服器中備份資料庫,並在次要伺服器上將其還原。

  • 在主要和次要伺服器之間定義可用性群組的過程中,您會嘗試使用新的可用性群組嚮導或命令來將資料庫加入可用性群組,方法如下: ALTER DATABASE <dbname> 設定 HADR 可用性群組 = <agname>

在這種情況下,會在 SQL Server 錯誤記錄中記錄下列錯誤:

{錯誤:3449,嚴重性:21,狀態: 1. SQL Server 必須關閉,才能復原資料庫(資料庫識別碼1)。 資料庫是無法關閉或系統資料庫的使用者資料庫。 重新開機 SQL Server。 如果資料庫在其他啟動、修復或 restoreSQL 追蹤因伺服器關閉而停止後無法復原。 Trace ID = "1"。 這只是一則資訊訊息;不需要使用者動作。

原因

發生這個問題的原因是,如果已將 service broker 啟用的資料庫備份並還原到從屬伺服器,則不會啟用已還原資料庫中的 service broker。 資料庫在內部仍會保留 service broker id。當您將從屬伺服器上的已還原資料庫新增至可用性群組時,即會啟用 service broker。 在可用性資料庫中檢測到相同的 GUID,並引發下列錯誤(無提示): 9772 "資料庫中的 Service Broker]<dbname>" 無法啟用,因為已啟用 service broker 且具有相同的 ID "。如此一來,當資料庫加入可用性群組時,就會產生錯誤3449,並導致 SQL server 意外關閉。

每個新的 SQL Server 累計更新都包含所有的修正程式,以及前一個累積更新中所包含的所有安全性修正程式。 查看 SQL Server 的最新累計更新:

狀態

Microsoft 已確認本篇文章<適用於>一節所列之 Microsoft 產品確實有上述問題。

Need more help?

Want more options?

探索訂閱權益、瀏覽訓練課程、瞭解如何保護您的裝置等等。

社群可協助您詢問並回答問題、提供意見反應,以及聆聽來自具有豐富知識的專家意見。

Was this information helpful?

How satisfied are you with the translation quality?
What affected your experience?
By pressing submit, your feedback will be used to improve Microsoft products and services. Your IT admin will be able to collect this data. Privacy Statement.

Thank you for your feedback!

×