Stefan, In my scripts I use CaptureXM
Stefan,
In my scripts I use CaptureXML logic to work with SSAS:
oServer.CaptureXml() = True
Do what I want with SSAS database here
oServer.CaptureXml() = False
' Execute what I captured before
oResults = oServer.ExecuteCaptureLog(True, False)
That ExecuteCaptureLog has 2 parameters:
transactional
Type: System.Boolean
Indicates whether the capture log will be executed within a transaction.
parallel
Type: System.Boolean
Indicates whether the capture log entries will be executed in parallel.
So first parameter identifies that everything what was captured should be executed in transaction log.
So, you should include your drop partitions statement in the same single Capture XML and test. I have not tested this, but I think this will cause problems - for example if you create partition in same XML as process it, most likely script will complain that partition does not exists. I have not tried this, but to be honest I just assumed that I have to split script in these logical parts. Please test and lets us know what you find.
As alternative - if you are using SSAS 2008+, you might consider having query database and process database. Then you could detach/attach databases to have minimal downtime for users. Of course, all users connections will be dropped at the point of detach!