none
SSAS command on SQL agent fails. RRS feed

  • Question

  • while run below cmd in sql agent,

    {

      "refresh": {
        "type": "automatic",
        "objects": [
          {
            "database": "SalesMartTabularLast3Months"
          }
        ]
      }
    }


    Error: Message

    Executed as user: OJC\userX. Microsoft.AnalysisServices.Xmla.XmlaException: Invalid query syntax. A valid MDX or DAX query was expected.   at Microsoft.AnalysisServices.Xmla.XmlaClient.CheckForSoapFault(XmlReader reader, XmlaResult xmlaResult, Boolean throwIfError)   at Microsoft.AnalysisServices.Xmla.XmlaClient.CheckForError(XmlReader reader, XmlaResult xmlaResult, Boolean throwIfError)   at Microsoft.AnalysisServices.Xmla.XmlaClient.SendMessage(Boolean endReceivalIfException, Boolean readSession, Boolean readNamespaceCompatibility)   at Microsoft.AnalysisServices.Xmla.XmlaClient.SendMessageAndReturnResult(String& result, Boolean skipResult)   at Microsoft.AnalysisServices.Xmla.XmlaClient.ExecuteStatement(String statement, String properties, String& result, Boolean skipResult, Boolean propertiesXmlIsComplete)   at Microsoft.AnalysisServices.Xmla.XmlaClient.Execute(String command, String properties, String& result, Boolean skipResult, Boolean propertiesXmlIsComplete)   at Microsoft.SqlServer.Management.Smo.Olap.SoapClient.ExecuteStatement(String stmt, StatementType stmtType, Boolean withResults, String properties, String parameters, Boolean restrictionListElement, String discoverType, String catalog)   at Microsoft.SqlServer.Management.Smo.Olap.SoapClient.SendCommand(String command, Boolean withResults, String properties)   at OlapEvent(SCH_STEP* pStep, SUBSYSTEM* pSubSystem, SUBSYSTEMPARAMS* pSubSystemParams, Boolean fQueryFlag).  The step failed.

    Wednesday, November 14, 2018 6:43 AM

Answers

  • {
      "refresh": {
        "type": "automatic",
        "objects": [
          {
            "database": "SalesMartTabularLast3Months"
          }
        ]
      }
    }

    above is working...   servername: localhost\tabular    (missing instance name)

    • Proposed as answer by Pirlo Zhang Thursday, November 15, 2018 2:20 AM
    • Marked as answer by KIRUBAKARAN J A Thursday, November 15, 2018 5:05 AM
    Wednesday, November 14, 2018 8:11 AM

All replies

  • Microsoft.AnalysisServices.Xmla.XmlaException: Invalid query syntax. A valid MDX or DAX query was expected.  
    A SSAS Job step supports XML/A and MDX commands, but not JSON for Tabular Mode Cubes; see Create an Analysis Services Job Step => Limitations and Restrictions

    Olaf Helper

    [ Blog] [ Xing] [ MVP]

    Wednesday, November 14, 2018 7:03 AM
  • {
      "refresh": {
        "type": "automatic",
        "objects": [
          {
            "database": "SalesMartTabularLast3Months"
          }
        ]
      }
    }

    above is working...   servername: localhost\tabular    (missing instance name)

    • Proposed as answer by Pirlo Zhang Thursday, November 15, 2018 2:20 AM
    • Marked as answer by KIRUBAKARAN J A Thursday, November 15, 2018 5:05 AM
    Wednesday, November 14, 2018 8:11 AM
  • Hi KIRUBAKARN J A,

    Thanks for sharing the solution with us.

    Please mark an appropriate reply as answer to close this thread if possible.

    Thanks,

    Pirlo Zhang 


    MSDN Community Support<br/> Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact <a href="mailto:MSDNFSF@microsoft.com">MSDNFSF@microsoft.com</a>.

    Thursday, November 15, 2018 2:21 AM