How to run .XMLA on Analysis Services script via SQL Server Database Engine?

  • Hello fellow SQL buffs,

    Does anyone know how to execute an .XMLA query on Analysis Services via sqlcmd, or via SQL Server Database Engine?

    I have a script which creates an OLAP cube on AS, but I want to automate it. (Long story as to why)..

    Any ideas?

    Thank you!

  • You can run your xmla query on Management Studio in File->New-> Analysis Services XMLA query.

    If you want to automate it you can run that query in an Analysis Services Execute DDL Task in SSIS and then you can schedule it on a job.

  • I just did this exact thing. The answer is not sqlcmd, but ascmd. From command line, my command looks like this:

    ascmd -i "E:\path\CubeDeploy.xmla" -S Server\Instance

    You can do a lot of things programmatically. In my case, I am automating building of the cube, building of the XMLA script, and deployment.

    Here are some links I used to help me with this:

    MSDN Readme For Ascmd Command-line Utility

    Automating Builds of SSAS Projects in C#

  • I have solved this problem, without using external programs.

    I have posted my stored procedure on the link below, it backups a SSAS database from a SQL Server server.

    How can I pass the server name as parameter for a XMLA script?

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

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