SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Need help on writing XMLA script to automate cube
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

itsdhar
Starting Member

4 Posts

Posted - 07/24/2012 :  08:04:18  Show Profile  Reply with Quote
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

India
48037 Posts

Posted - 07/24/2012 :  09:31:50  Show Profile  Reply with Quote
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 - 07/26/2012 :  03:03:06  Show Profile  Reply with Quote
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

India
48037 Posts

Posted - 07/26/2012 :  09:53:24  Show Profile  Reply with Quote
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
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.11 seconds. Powered By: Snitz Forums 2000