2010-09-27 63 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 
       ); 
     }