Freigeben über


Running AS Command(XMLA / MDX) as a Batch Job Using SSIS Package

 

- Get ASCMD for right version

2008

2005

 

-Create a file with XMLA / MDX Command and give extension as xmla/mdx

 

-Create one batch file with command text as "d:\asjob\ascmd -S karan2k8-64\sql2005 -i d:\asjob\backup.xmla"

In my instance- ASCMD is located in D Drive ASJob folder that’s why I had given it in Path, AS Xmla file is located located in same folder.

 In order to remove confusion at the time of ASCMD execution better to keep batch files, ascmd.exe and xmla / mdx files in same folder.

In this command-

-S is AS Server Name

-I is Input file with MDX / XMLA Command

 

-Open SSIS, Create New package and Add Process Execute Task

 

-Go to the properties of Process Execute Task and provide the location of batch file as Executable

 

-Ensure that files are located in one directory and right paths had been specified else you will get the error message.

 

Suggestion:

-Keep all Files (bat,ascmd and AS Command ) in one directory

Attached are copies of ascmd for SQL 2005 and SQL 2008

ASCMD.zip

Comments

  • Anonymous
    July 17, 2010
    This Blog Written by you is Very Informational.... we can use that... keep it up.. all good works ---daamin--- <a href="http://www.1clickloans.net" rel="dofollow">Compare Loans</a>

  • Anonymous
    September 06, 2011
    There isn't "ascmd.exe" in SQL Server 2008 R2. Is there other command tool used in AS 2008R2?

  • Anonymous
    September 06, 2011
    You can use SQL 2008 ASCMD with SQL 2008R2. It works. Let me know if you face any issues. Karan

  • Anonymous
    September 06, 2011
    You can use SQL 2008 ASCMD with SQL 2008R2. It works. Let me know if you face any issues. Karan

  • Anonymous
    May 14, 2015
    How do I connect/login to SSAS. Can any one give command for SSAS login.

  • Anonymous
    May 27, 2015
    Hi, I am working on SSAS project and now i am looking for a way to generate some documentation from XMLA code ? I have seen that it's possible to do it with XML, so i think it is possible too in XMLA ! Is there any one who have an idea ? Thank you in advance :)