![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi all, Is there a way that I can create a partition within a cube dynamically? For example, I want to create a partition Sales2006 and push all 2006 data into this partition. Is there a way that I can create this partition either via TSQL or within a DTS package and then populate it with 2006 data? Many thanks Immy |
#3
| |||
| |||
|
|
The underlying mechanisms is via DSO (AS2K) or AMO (AS2K5). There is no direct TSQL equivalent. Depending on if this is AS2K or AS2K5, I'd point you to different facilities. For AS2K, there are lots of examples out there for creating a partitions programmatically. Probably the easiest way (if you want to solve this by writing a VB program), is to get a copy of the SQL 2000 Resource Kit and on it is a utility called "Metadata Scripter". It is an addin to Analysis Manager which allowed you to right click on a partition and then "save it as a VB program" which called DSO to create the partition. You could use that as a starting point for a VB program which took some info and created a partition for you. Second, again for AS2K, look at the DSO/XML utility http://www.microsoft.com/downloads/d...DisplayLang=en For AS2K5, you can something similar (but using AMO, the new management facility). You can also do this via XMLA scripting. If you create the partition using SQL Management Studio (SSMS), then right-click on it, you can see that you have an option to generate a "Create" script. Since this is just a text file, you can manipulate it anyway you wish. To execute an XMLA script, you can either use the SSIS Execute Analysis Services DDL task (which takes the XMLA script itself), To see how to use it, look in the SQL2K5 Samples install for the "AdvWorksSync" sample. It creates partitions on-the-fly sychronizing the Adventure Works DW RDBMS and AS partitions. Or you can create a SQL Agent job (there is a new type of "step" in SQL Agent.which is an XMLA script, just like you can add a TSQL step to a SQL Agent job). Lastly, with the next release of the SQL2K5 Samples install , there will be a new command-line utility called "ASCmd" to execute an XMLA script. -- Dave Wickert [MSFT] dwickert (AT) online (DOT) microsoft.com Program Manager BI Systems Team SQL BI Product Unit (Analysis Services) -- This posting is provided "AS IS" with no warranties, and confers no rights. "Immy" <imtiaz_ullah (AT) hotmail (DOT) com> wrote in message news:ucTiIZTFGHA.2648 (AT) TK2MSFTNGP11 (DOT) phx.gbl... Hi all, Is there a way that I can create a partition within a cube dynamically? For example, I want to create a partition Sales2006 and push all 2006 data into this partition. Is there a way that I can create this partition either via TSQL or within a DTS package and then populate it with 2006 data? Many thanks Immy |
#4
| |||
| |||
|
|
DAVE!!! You're a diamond! Many thanks for all this information. I'm sure it's going to help me out. Apologies for not adding my system info (I usually add that!) but it is AS2K, but we will be moving to 2K5 very quickly. Best Regards Immy "Dave Wickert [MSFT]" <dwickert (AT) online (DOT) microsoft.com> wrote in message news:e38UF7TFGHA.3100 (AT) tk2msftngp13 (DOT) phx.gbl... The underlying mechanisms is via DSO (AS2K) or AMO (AS2K5). There is no direct TSQL equivalent. Depending on if this is AS2K or AS2K5, I'd point you to different facilities. For AS2K, there are lots of examples out there for creating a partitions programmatically. Probably the easiest way (if you want to solve this by writing a VB program), is to get a copy of the SQL 2000 Resource Kit and on it is a utility called "Metadata Scripter". It is an addin to Analysis Manager which allowed you to right click on a partition and then "save it as a VB program" which called DSO to create the partition. You could use that as a starting point for a VB program which took some info and created a partition for you. Second, again for AS2K, look at the DSO/XML utility http://www.microsoft.com/downloads/d...DisplayLang=en For AS2K5, you can something similar (but using AMO, the new management facility). You can also do this via XMLA scripting. If you create the partition using SQL Management Studio (SSMS), then right-click on it, you can see that you have an option to generate a "Create" script. Since this is just a text file, you can manipulate it anyway you wish. To execute an XMLA script, you can either use the SSIS Execute Analysis Services DDL task (which takes the XMLA script itself), To see how to use it, look in the SQL2K5 Samples install for the "AdvWorksSync" sample. It creates partitions on-the-fly sychronizing the Adventure Works DW RDBMS and AS partitions. Or you can create a SQL Agent job (there is a new type of "step" in SQL Agent.which is an XMLA script, just like you can add a TSQL step to a SQL Agent job). Lastly, with the next release of the SQL2K5 Samples install , there will be a new command-line utility called "ASCmd" to execute an XMLA script. -- Dave Wickert [MSFT] dwickert (AT) online (DOT) microsoft.com Program Manager BI Systems Team SQL BI Product Unit (Analysis Services) -- This posting is provided "AS IS" with no warranties, and confers no rights. "Immy" <imtiaz_ullah (AT) hotmail (DOT) com> wrote in message news:ucTiIZTFGHA.2648 (AT) TK2MSFTNGP11 (DOT) phx.gbl... Hi all, Is there a way that I can create a partition within a cube dynamically? For example, I want to create a partition Sales2006 and push all 2006 data into this partition. Is there a way that I can create this partition either via TSQL or within a DTS package and then populate it with 2006 data? Many thanks Immy |
![]() |
| Thread Tools | |
| Display Modes | |
| |