blogs.conchango.com

welcome to the conchango blogging site
Welcome to blogs.conchango.com Sign in | Join | Help
in Search

SSIS Junkie

SSAS: Faulty readme for ascmd.exe

I've said before that I'm really impressed with ascmd.exe however I've just come across a problem in the documentation that has held me up for a while.

ascmd allows you to parameterize xmla scripts from the command-line using the -v option. This is really useful as it means you could, for example, use the same script to process any cube and just parameterize the script with the name of the cube.

The documentation states the following:

Using System-Reserved Scripting Variables in Scripts, Queries, or Statements

System-defined scripting variables can also be used within an XMLA script, an MDX query, or a DMX statement. The following examples illustrate sample command-line invocations of the ascmd command-line utility that use scripting variables. More complete examples appear later in this document to illustrate usage scenarios.

  • C:\>ascmd –S <server name> –i process.xmla -v cube=<CubeID>

process.xmla (simplified)

<Batch>
    <Parallel>
         <Process>
             <Object>
                  <DatabaseID>($ASCMDDBNAME)</DatabaseID>
                  <CubeID>($CUBE)</CubeID>
            . . .
         </Process>
    </Parallel>
</Batch>

If you take that command-line and script and try and plug it into your own environment however it won't work. Why? Quite simply its because you define a parameter in an XMLA script using the syntax $(ParamName), and NOT ($ParamName) as as has been stated above.

Hopefully that will save you the time that I've just spent finding it out for myself! I have told Microsoft about the error using the feedback link at the bottom of the readme so by the time you come to read this it might have been corrected!

-Jamie

 

 

Published 21 June 2006 10:05 by jamie.thomson

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

 

Tom De Cort said:

Hi Jamie,

Question to you: I use the ascmd to create local cubes (where the 'where' clauses of my named queries are filled in through variables). I don't know if you ran already into this but it seems you can't use '=' in your variable values. I've read the readme file but they don't mention anything about this...

Should I dive into their code or you know a solution to this?

Greets,

Tom

February 23, 2007 16:42
 

Tom De Cort said:

I meant new cubes instead of local cubes off course

-Tom

February 23, 2007 16:48
 

jamie.thomson said:

Hi Tom,

Can't help here I'm afraid. I've never tried to do this.

-Jamie

February 23, 2007 16:56
 

Nigel said:

Also, I use to love ascmd, however, I had a simple script that ran on multiple computers against multiple AS boxes and it worked fine a month ago.  Now against all systems, even after installing and uninstalling ascmd, I receive errors on all queries and ascmd just never works any more, so now I am not impressed with the product.

Copyright (C) 2006 Microsoft Corporation.  All Rights Reserved.

<return xmlns="urn:schemas-microsoft-com:xml-analysis"><root xmlns="urn:schemas-

microsoft-com:xml-analysis:empty"><Exception xmlns="urn:schemas-microsoft-com:xm

l-analysis:exception" /><Messages xmlns="urn:schemas-microsoft-com:xml-analysis:

exception"><Error ErrorCode="3238985741" Description="The Select text node at li

ne 7, column 22 cannot appear inside the Command element (namespace urn:schemas-

microsoft-com:xml-analysis) under Envelope/Body/Execute. This element can only h

ave text nodes containing white-space characters." Source="Microsoft SQL Server

2005 Analysis Services" HelpFile="" /></Messages></root></return>

November 13, 2008 01:21

Leave a Comment

(required) 
(optional)
(required) 
Submit

This Blog

Syndication

News

Powered by Community Server (Personal Edition), by Telligent Systems