症狀
假設您在資料表上啟用 [變更資料Capture (CDC) ] 功能,以在 Microsoft SQL Server 中執行記錄掃描。 pollinginterval 參數會在 sys.sp_cdc_scan 預存程序中從秒 (秒) 轉換為小時 (小時) 。 不過,當 pollinginterval 參數大於 3600 秒) (>一小時時,您會注意到轉換的結果不正確。
注意
宣告 @pollinginterval bigint, @seconds bigint, @minutes bigint, @hours bigint
set @pollinginterval = 3600
選取 @seconds = @pollinginterval % 60
選取 @minutes = ( (@pollinginterval - @seconds) / 60) % 60
select @hours = (@pollinginterval - (@minutes * 60) - @seconds) / 60
--- 下行的下一次嘗試
--- select @hours = (@pollinginterval - (@minutes * 60) - @seconds) / 60 /60
選取 @hours, @minutes, @seconds
解決方式
此問題已在下列 SQL Server 累積更新中修正:
關於 SQL Server 的累積更新:
SQL Server 的每個新累積更新都包含所有 Hotfix 和先前累積更新的所有安全性修正程式。 查看 SQL Server 的最新累積更新:
狀態
Microsoft 已確認這是「適用對象」一節中列出的 Microsoft 產品中的問題。
參考資料
了解 Microsoft 用來說明軟體更新的術語。