I am using AMO to manage partitions.
I am trying to create a partition then use the Update method to create the new partition.. snippet of code below:
65 //create the new partition
66 Partition newPartition = mg.Partitions.Add(partitionName, partitionName);
67 newPartition.StorageMode = StorageMode.Molap;
68 newPartition.Source = new QueryBinding(db.DataSources[0].ID, bindingQuery);
69 XmlaWarningCollection warnings = new XmlaWarningCollection();
70
71 newPartition.Update(UpdateOptions.Default,UpdateMode.Create,warnings);
72 //TODO: Deal with warnings
Every time I run it, it just hangs on the Update method. It seems to be looping.. the query execution will only stop when I restart the SSAS Service.
No errors, no log entries, no Event Log entries.... nada, zilch, vacuum, nothing......
Any ideas anyone?
BTW: This is the SP2 CTP.. I think this might be a bug...|||It sounds like a bug, it should not hang indefinitely. It would be a good idea to post this on the connect site if it is not already there.
In the mean time, have you tried calling Update() at the cube level, not on the partition object? This is the pattern that the AmoAdventureWorks sample uses (one of the AMO samples distributed with SQL Server), they don't actually call update on the partitions or measure groups, calling update at the cube level causes the changes to all the child objects to get persisted.
|||OK.. I'll give that a whirl... I do seem to be spending an awful lot of time at the connect site lately...|||Changed the code to the following:
65 //create the new partition
66 Partition newPartition = mg.Partitions.Add(partitionName, partitionName);
67 newPartition.StorageMode = StorageMode.Molap;
68 newPartition.Source = new QueryBinding(db.DataSources[0].ID, bindingQuery);
69 XmlaWarningCollection warnings = new XmlaWarningCollection();
70
71 cube.Update(UpdateOptions.ExpandFull,UpdateMode.CreateOrReplace);
72 //newPartition.Update(UpdateOptions.Default,UpdateMode.Create,warnings);
73 //TODO: Deal with XmlaWarningCollection warnings
But the answer is still no.. it hangs on the update cube method too.. I can see a CommandBegin in the trace with the following XMLA:
<Create AllowOverwrite="true" xmlns="http://schemas.microsoft.com/analysisservices/2003/engine">
...
and the details for the new partition is indeed included in the XMLA...but nothing happens .. it is still hanging... no errors, no logs.. the CPU for the SSAS service is zero with the memory stationary.
When I try to look at anything to do with the SSAS database in the SQL Server Management studio, it just hangs.
This is getting serious!
|||This is probably a silly question, but can I just confirm that you are in fact using the Enterprise edition of SQL Server? Partitions are an Enterprise only feature and if you try to deploy them to a Standard edition server you will get unpredictable results.
I don't know if you have tried this yet, but I have seen one other case where we had symptoms similar to this, simple "alter" statements were causing the server to "hang". We were lucky that this was a dev environment and deleting the database first and then fully re-deploying appeared to fix this, but I have not yet been able to identify what triggered this behaviour.
|||This is currently the developer edition, SP2 CTP which I am using as a local dev environment. I don't yet have a proper server environment in which to run tests.
From my understanding developer edition has alll the functionality of the Enterprise edition (?)
|||You are correct. The Developer edition has the same functionality as the Enterprise edition.
I don't know if this is possible, but could you create a partition manually and trace the xmla that is generated using profiler and then run your program and trace that and see if the xmla that is produced is different? That might help highlight something that you might need to add or change to get things working.
No comments:
Post a Comment