有没有办法告诉处理分区的最后日期/时间?我有很多SSAS数据库,有很多分区,自动化不是,但是在处理分区时会独立记录。
是否有独立的查询和确认方式?我看了@ system.discover_partition_stat和system.discover_partition_dimension_stat,两者都没有回答我的问题。
答案 0 :(得分: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
);
}