2010-09-27 61 views
2

有沒有辦法告訴上次處理分區的日期/時間?我有很多SSAS數據庫,有很多分區,自動化不是,但是在處理分區時會獨立記錄。SSAS 2008日期/時間度量分區或上次處理的維度?

是否有獨立的方式來查詢和確認?我看過@ system.discover_partition_stat和system.discover_partition_dimension_stat,這兩者都不回答我的問題。

回答

0

我結束了使用Microsoft.AnalysisServices命名空間:

http://msdn.microsoft.com/en-us/library/microsoft.analysisservices.aspx

下面是一個例子:

 /// <summary> 
     /// simply refreshes the partition information from the server, then checks a property. In testing, this property has been accurate. Initially, I assumed an unprocessed partition would send back a null datetime. No, what I've been getting back instead is : 1699-12-30 18:00:00.0000000 
     /// </summary> 
     /// <param name="partition"></param> 
     /// <returns></returns> 
     public static DateTime? GetPartitionLastDateProcessed(Microsoft.AnalysisServices.Partition partition) 
     { 
      partition.Refresh(); 

      return 
       (
        partition.LastProcessed 
       ); 
     }