[英]Error Accessing LastProcessed Property in SSAS Cube
我有一個程序集,可根據當前用戶設置角色維度數據。 在程序集中,我需要訪問Context.CurrentCube.LastProcessed屬性。 該代碼本身可以正常工作。 除非已重新部署或處理了多維數據集。 然后,有時檢索Context.CurrentCube.LastProcessed屬性會引發以下錯誤:
Microsoft.AnalysisServices.AdomdServer.AdomdException:服務器:用戶取消了該操作。 在Microsoft.AnalysisServices.AdomdServer.CubeCollection..ctor(String mpCubeName)處,Microsoft.AnalysisServices.AdomdServer.CubeDef.get_LastProcessed()
位於d:\\ Projects \\ reporting \\ Reporting_Cube_Addons \\ Permissions.cs:line 181中的Reporting.TryGetLastProcessDate()
我已經將該行包裝在try catch中,具有后備值:
public static DateTime TryGetLastProcessDate() { DateTime last; try { last = Context.CurrentCube.LastProcessed; } catch (Exception ex) { log("Failed to retrieved lastProcess Date. Error:"); log(ex.ToString()); last = new DateTime(2015, 01, 01); } return last; }
但是,即使已捕獲到異常,多維數據集似乎仍然停止工作。
關於我可能做錯了什么的任何想法? 還有其他更多的故障安全方法來檢索最后處理的日期嗎?
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.