Hallo,
ich versuche gerade über die Microsoft.AnalysisServices.dll einem exeistierenden Measure eine Partition hinzuzufügen. Der Code läuft auch fehlerfrei durch aber leider erscheint die Partition nicht im SQL-Management-Studio. Hat jemand einen Tipp woran es liegen könnte. Nachfolgend mein Code zur Erstellung der Partition.
												| 1:2:
 3:
 4:
 5:
 6:
 7:
 8:
 9:
 10:
 11:
 12:
 13:
 14:
 15:
 16:
 17:
 18:
 19:
 20:
 21:
 22:
 23:
 24:
 25:
 26:
 27:
 28:
 29:
 30:
 31:
 32:
 33:
 34:
 35:
 36:
 37:
 38:
 39:
 40:
 
 | using ssas = Microsoft.AnalysisServices;
 ssas.Partition AsPartition = null;
 
 try
 {
 
 ssas.QueryBinding sql_source_query = new Microsoft.AnalysisServices.QueryBinding(datasoure, xmla_query);
 
 ssas.ProactiveCaching as_pr_caching = new Microsoft.AnalysisServices.ProactiveCaching();
 
 as_pr_caching.SilenceInterval = TimeSpan.FromSeconds(-1);
 
 as_pr_caching.Latency = TimeSpan.FromSeconds(-1);
 
 as_pr_caching.SilenceOverrideInterval = TimeSpan.FromSeconds(-1);
 
 as_pr_caching.ForceRebuildInterval = TimeSpan.FromSeconds(-1);
 
 as_pr_caching.Source = new ssas.ProactiveCachingInheritedBinding();
 
 AsPartition = new Microsoft.AnalysisServices.Partition(partition_name);
 
 AsPartition.ID = partition_name;
 
 AsPartition.DataSource.Name = datasoure;
 
 AsPartition.DataSource.ID = datasoure;
 
 AsPartition.Source = sql_source_query;
 
 AsPartition.StorageMode = Microsoft.AnalysisServices.StorageMode.Molap;
 
 AsPartition.ProcessingMode = Microsoft.AnalysisServices.ProcessingMode.Regular;
 
 AsPartition.ProactiveCaching = as_pr_caching;
 
 AsPartition.Update(ssas.UpdateOptions.ExpandFull);
 
 }
 | 
		
	  
Code zum einfügen der erstellten Partition in die DB
		                     
             C#-Quelltext
                        C#-Quelltext                    
           	 										| 1:2:
 3:
 4:
 5:
 6:
 7:
 8:
 9:
 10:
 11:
 12:
 13:
 14:
 15:
 
 | ssas.Server AsServer = null;ssas.MeasureGroup AsMeasure = null;
 
 try
 {
 
 AsServer = new Microsoft.AnalysisServices.Server();
 
 AsServer.Connect(this.OlapConnectionString);
 
 AsMeasure = AsServer.Databases.Find(olap_db).Cubes.Find(cube_id).MeasureGroups.Find(measure_id);
 
 AsMeasure.Partitions.Add(AsPartition);
 
 }
 | 
		
	  
Es gibt keinen Fehler, nur leider taucht die Partition nicht nach einer Aktualisierung im SQL-Management-Studio auf. Die Datenbank, Cube, Measure sowie DataSource sind vorhanden.
mfg
Gerald