Sql-Server

由於快照代理失敗,SQL Server 事務複製失敗

  • December 6, 2013

我正在嘗試在 2 個 SQL Server 2012 命名實例之間設置事務複製。我已經按照分步手冊創建了一個出版物。但是,一旦我查看複製監視器,我就會收到以下錯誤:

2013-12-05 13:08:23.29 Copyright (c) 2008 Microsoft Corporation.
2013-12-05 13:08:23.29 The timestamps prepended to the output lines are expressed in terms of UTC time.
2013-12-05 13:08:23.29 User-specified agent parameter values:
2013-12-05 13:08:23.29 --------------------------------------
2013-12-05 13:08:23.29 -Publisher SRV1\SQL2012
2013-12-05 13:08:23.29 -PublisherDB DB_PUB
2013-12-05 13:08:23.29 -Publication DB_Pub
2013-12-05 13:08:23.29 -Distributor SRV1\SQL2012
2013-12-05 13:08:23.29 -DistributorSecurityMode 1
2013-12-05 13:08:23.29 -XJOBID 0xE8D827CC232A234FAC049095C03EBA66
2013-12-05 13:08:23.29 --------------------------------------
2013-12-05 13:08:23.29 Connecting to Distributor 'SRV1\SQL2012'
2013-12-05 13:08:23.35 The replication agent had encountered an exception.
2013-12-05 13:08:23.35 Source: Replication
2013-12-05 13:08:23.35 Exception Type: Microsoft.SqlServer.Replication.ConnectionFailureException
2013-12-05 13:08:23.35 Exception Message: A connection was successfully established with the server, but then an error occurred during the pre-login handshake. (provider: SSL Provider, error: 0 - The certificate chain was issued by an authority that is not trusted.)

我想知道什麼可能導致這種類型的錯誤?

我認為這可能會對某人有所幫助,因為我已經找到了導致我的問題的原因。在我們本地公司的活動目錄控制器中使用的是自簽名證書,我對 AD 的詳細資訊並不感興趣,但我在伺服器的事件查看器管理器中發現了太多錯誤。

因此,一旦我停止使用 Windows 身份驗證在 SQL Server Management Studio 中進行操作以創建複製,並使用具有 SA 級別的 SQL 憑據 - 錯誤就消失了。希望這會對​​某人有所幫助。

聽起來您可能已經設置Force Encryption了實例。在 SQL Server 配置管理器中,您可以通過展開SQL Server 網路配置,然後右鍵點擊協議為 YOURINSTANCENAME並選擇屬性來查看此設置(伺服器端加密強制)。您將在那裡看到切換強制加密的選項,以及證書配置的選項卡。

在此處輸入圖像描述

我絕不是說要禁用強制加密(如果這確實是你的問題,我猜有人設置它是有原因的),但你需要確保這兩者之間的通信配置正確。 這是一篇很好的知識庫文章,似乎可以解釋您遇到的問題。

引用自:https://dba.stackexchange.com/questions/54518