Running XMLA processing from Command line SQL 2008

  • Hi,

    I am setting up job scheduling through a third party app that does not speak directly with SQL server jobs.

    My (hopefully) last big hurdle is to find a way to run the XMLA processing scripts from a command line. Only info I can find on it seems to refer to VS 2005 and an ascmd tool.

    Does any one have any tips to help me run an XMLA script from the command line?

    Thankyou,

    James

  • Hello James,

    We've done this in the past but now call an SSIS package that controls the processing.

    For the command line processing we called a .xmla file with the following syntax.

    "E:\Utilities\ascmd.exe" -i "E:\XMLA Queries\Portal\Process Dims.xmla" -S "<ServerName>"

    The contents of the Process Dims.xmla would be something like:

    <Batch xmlns="http://schemas.microsoft.com/analysisservices/2003/engine">

    <Parallel>

    <Process xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ddl2="http://schemas.microsoft.com/analysisservices/2003/engine/2" xmlns:ddl2_2="http://schemas.microsoft.com/analysisservices/2003/engine/2/2">

    <Object>

    <DatabaseID>Adventure Works DW 2008</DatabaseID>

    <DimensionID>Dim Customer</DimensionID>

    </Object>

    <Type>ProcessFull</Type>

    </Process>

    <Process xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ddl2="http://schemas.microsoft.com/analysisservices/2003/engine/2" xmlns:ddl2_2="http://schemas.microsoft.com/analysisservices/2003/engine/2/2">

    <Object>

    <DatabaseID>Adventure Works DW 2008</DatabaseID>

    <DimensionID>Dim Product</DimensionID>

    </Object>

    <Type>ProcessFull</Type>

    </Process>

    </Parallel>

    </Batch>

    Hope this helps.

    Marc

    Marc BeacomManaging Partner DatalereTAP the Power of Data(tm)

  • Thanks Mark,

    That is what I was looking for, but I was having trouble getting the actual ascmd.exe file. From searching I founf it is in a sample package you can download from MicroSoft, but all the links to it I found were broken, and referenced VS 2005. Searching the MS site for it got no hits. We finally found some sample package for Visial Studio 2005 (we are using 2008). you have to get the folder and compile the project (based on whether you will run it on 32 o64 bit) and need SDK installed on the system you will compile this on.

    Then moved the ascmd.exe file over to the server and I can now run my XMLA scripts from the command line.

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply