How do you process AS objects from the command-line?

Hello,

Quick question. How do you process AS objects from the command-line.

I've read this: http://msdn2.microsoft.com/en-us/library/ms186673.aspx and asusme I need to issue such an XMLA command but I don't which command-line tool enables me to do it.

Natural assumption is that its SQLCMD (seeing as you can do this from SSMS) but I thought I'd better check.

Thanks

-Jamie




Answer this question

How do you process AS objects from the command-line?

  • identyfikator

    Just Visual Studio 2005. :)

    Perhaps SP1 will bring us this, or I would just register for the beta tool until then.



  • Ray Hastings

    Thanks for the reply Andrew.

    I guess there's no tool provided out-of-the-box that does this then

    Regards

    Jamie



  • xx_Moe_Man_xx

    Dave,

    As and when this becomes an issue for us I'll let you know. My question was just me being inquisitive really rather than us having a particular need. Currently we use an SSIS package as you suggested.

    I'm surprised this isn't provided currently mind you. Good to see we're on the same page regarding getting it though.

    -Jamie



  • Timothy Cox

    Jamie Thomson wrote:

    Dave,

    As and when this becomes an issue for us I'll let you know. My question was just me being inquisitive really rather than us having a particular need. Currently we use an SSIS package as you suggested.

    I'm surprised this isn't provided currently mind you. Good to see we're on the same page regarding getting it though.

    -Jamie

    If anyone is interested and doesn't already know...this is now available here: http://www.microsoft.com/downloads/details.aspx FamilyId=E719ECF7-9F46-4312-AF89-6AD8702E4E6E&displaylang=en

    -Jamie



  • windblower6

    In the shipping product this is an important, missing piece to the scripting story. You currently have three options.

    1) execute it interactively with SSMS

    2) execute it as a step in a SQL job. There is a new type of "step" in a job which is an Analysis Services DDL statement (aka an XMLA script).

    3) within an SSIS package using the Execute Analysis Services DDL task. It is fairly easy to write a simple one-task package which takes its input from a file and then invoke that package from the command line using dtexec.exe. It took me only 10 min to write one.

    But you are right. It would be very nice to have a version from the command-line. And *in-fact* one is coming. It is called "ascmd" and will be a sample in the Web-Release 2 of the SQL2K5 Samples that is currently scheduled be available in the April timeframe. When it ships it will be in C# source so you can tailor it if you wish to, but we've gone to great pains to have a very rich set of functionality right out of the box.

    "ascmd" was developed as part of the Project REAL work here at Microsoft (see http://www.microsoft.com/sql/bi/ProjectREAL

    We have a version currently in beta that we have been sharing with customers. Contact me at dwickert@microsoft.com if you are interested and I will forward to the person administering the beta, or you can just wait for WR2 Samples MSI.

    _-_-_ Dave



  • Paul Kenny

    Dave Wickert wrote:

    2) execute it as a step in a SQL job. There is a new type of "step" in a job which is an Analysis Services DDL statement (aka an XMLA script).

    Dave,

    As a very very pointless digression, do you really think processing a cube constitutes a DDL statement. To my mind populating a structure with data is a DML statement.

    Just a thought...

    -Jamie



  • JoshR

    Hi Jamie,

    Here's one interesting way I found, using cscript to point to the web service.

    cscript //nologo xmla.wsf /url:"http://localhost/olap/msmdpump.dll" /c:"Adventure Works DW" /d:measures /r:"catalog=Adventure Works DW" /out:discover-measures.html /v

    http://www.activeinterface.com/b2005_11_21.html

    For our project, I just built a series of SSIS packages with AMO scripts. I have a package to build shared dimensions and packages to build measure group partitions by day. These are executed using DTEXEC, and wrapped into nested command scripts for reusability.

    I prefer AMO to XML/A..

    Another way would be to create a SQL Job with an XML/A task and schedule it from the command line.

    Finally, there is a beta XML/A tool mentioned here.

    http://geekswithblogs.net/darrengosbell/archive/2006/01/25/67025.aspx



  • How do you process AS objects from the command-line?