Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Need help on writing XMLA script to automate cube

Author  Topic 

itsdhar
Starting Member

4 Posts

Posted - 2012-07-24 : 08:04:18
Hi

I have a requirement to process cube dynamically as like below:

We have data from 2005 onward and we need to process it.

So we have decided to go with partitions in such way

2005&06 as one partition, 2007&08 as one partition,2009&10 as one partition,2011 as one partition and 2012(i.e current year) should be created with monthly partitions. and then if we get year 2013 then it should delete 2012&2011 partitions and it have to create one partition for this 2 years. Again 2013 have to create with monthly partitions.

(or Previous years with yearly partitions and current year with monthly partitions is also fine)

Coming to Process it have to process last yearly or 2 years partition and current year monthly partitions.

We are thinking to achieve this with xmla script.

Please help me to write xmla script.

Components we are using: SQL Analysis Server 2012(64-bit), Windows server 2008 R2(64-bit)

Thanks,
Dharani

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2012-07-24 : 09:31:50
you might be better off using ssis package to determine the years of data and then creating and processing dimensions. you can use analysis services processing task,ddl task etc for achieving same in ssis

see

http://www.sqlbiinfo.com/2012/01/ssas-processing-ssis.html

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

itsdhar
Starting Member

4 Posts

Posted - 2012-07-26 : 03:03:06
Hi,

I gone through the blog which you given me,

I think my case might be different

I have data from 2005, I need to create partitions in such way that it have to create yearly partitions up to 2011 and if it is current year(i.e 2012) then it has create monthly partitions like below

? (Here in this case I have data from 2010)



This property currently we are achieving with .net code, but now we are decided to go with xmla script.

If 2013(New Year) comes then it have delete 2012 monthly partitions and create with 2012 year partition, then monthly partitions should create for 2013(i.e Current year)

And we don't have SQL server database we have only Oracle database, SSAS.

Please let me know if I can achieve this.

Thanks in advance

Dharani
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2012-07-26 : 09:53:24
quote:
Originally posted by itsdhar

Hi,

I gone through the blog which you given me,

I think my case might be different

I have data from 2005, I need to create partitions in such way that it have to create yearly partitions up to 2011 and if it is current year(i.e 2012) then it has create monthly partitions like below

? (Here in this case I have data from 2010)



This property currently we are achieving with .net code, but now we are decided to go with xmla script.

If 2013(New Year) comes then it have delete 2012 monthly partitions and create with 2012 year partition, then monthly partitions should create for 2013(i.e Current year)

And we don't have SQL server database we have only Oracle database, SSAS.

Please let me know if I can achieve this.

Thanks in advance

Dharani


yep...i understand your scenario is different. But still the approach to be followed is something similar to that in link. Only difference would be logic to create partitions and also you would have an additional step to delete the existing monthly partitions.

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
   

- Advertisement -