![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi, I want to create an SSIS package to process all non processed partitions automatically. The loop task can do this job, but how to identify which partitions is not currently processed? does an XML/A command can do this? if yes, which one? or I have to write a script using the AMO object model? any sample is welcome :-) thanks. Jerome. |
#3
| |||
| |||
|
|
I am not aware of anything that gives you a nice list of partitions and their state, but you can get this information from an XML/A command. The DISCOVER_XML_METADATA command seems to pretty much list out all the properties that are available in AMO. To to the point where, if you do not include any restrictions, it will even list server settings. The following is an example that list the metadata for one of the partitions in the Adventure Works sample database. You will find a "State" element under the partition that indicates if the partition is processed. The restrictions are optional, there is a list of all the possible restrictions in BOL. http://msdn2.microsoft.com/en-us/library/ms126291.aspx Discover xmlns="urn:schemas-microsoft-com:xml-analysis" RequestType>DISCOVER_XML_METADATA</RequestType Restrictions RestrictionList DatabaseID>Adventure Works DW</DatabaseID CubeID>Adventure Works DW</CubeID MeasureGroupID>Fact Internet Sales 1</MeasureGroupID PartitionID>Internet_Sales_2002</PartitionID /RestrictionList /Restrictions Properties PropertyList /PropertyList /Properties /Discover If you are comfortable working with XML this should give you all the data you need. I think personally I would lean towards using AMO. Especially because you could use the CaptureXML and CaptureLog properties to generate XML/A that could process all the partitions in a single batch. I have an example of using these properties on my blog, I did it in PowerShell script, but the basic commands would be very similar to scripting in SSIS. http://geekswithblogs.net/darrengosb.../GenerateXmlaB yName.aspx -- Regards Darren Gosbell - SQL Server MVP Blog: http://www.geekswithblogs.net/darrengosbell In article <etGcrp2nGHA.2164 (AT) TK2MSFTNGP03 (DOT) phx.gbl>, willgart_A_ (AT) hotmail_A_ (DOT) com says... Hi, I want to create an SSIS package to process all non processed partitions automatically. The loop task can do this job, but how to identify which partitions is not currently processed? does an XML/A command can do this? if yes, which one? or I have to write a script using the AMO object model? any sample is welcome :-) thanks. Jerome. |
#4
| |||
| |||
|
|
well... I think I'll create an XSLT file to convert the metadata document into an XML/A process command, then I simply execute the resulting XML/A command file I think its the better way. "Darren Gosbell" <jam (AT) newsgroups (DOT) nospam> wrote in message news:MPG.1f1675f25bf4699c989965 (AT) news (DOT) microsoft.com... I am not aware of anything that gives you a nice list of partitions and their state, but you can get this information from an XML/A command. The DISCOVER_XML_METADATA command seems to pretty much list out all the properties that are available in AMO. To to the point where, if you do not include any restrictions, it will even list server settings. The following is an example that list the metadata for one of the partitions in the Adventure Works sample database. You will find a "State" element under the partition that indicates if the partition is processed. The restrictions are optional, there is a list of all the possible restrictions in BOL. http://msdn2.microsoft.com/en-us/library/ms126291.aspx Discover xmlns="urn:schemas-microsoft-com:xml-analysis" RequestType>DISCOVER_XML_METADATA</RequestType Restrictions RestrictionList DatabaseID>Adventure Works DW</DatabaseID CubeID>Adventure Works DW</CubeID MeasureGroupID>Fact Internet Sales 1</MeasureGroupID PartitionID>Internet_Sales_2002</PartitionID /RestrictionList /Restrictions Properties PropertyList /PropertyList /Properties /Discover If you are comfortable working with XML this should give you all the data you need. I think personally I would lean towards using AMO. Especially because you could use the CaptureXML and CaptureLog properties to generate XML/A that could process all the partitions in a single batch. |
![]() |
| Thread Tools | |
| Display Modes | |
| |