Reputation: 93
I have a new SSAS 2016 tabular model (1200 compatibility level). I am trying to set up a SQL Agent job to process the model daily. However, when the job runs, it is throwing the following error:
XmlaException. The { text node at line 7, column 17 cannot appear inside the Command element (namespace urn:schemas-microsoft-com:xmla-analysis) under Envelope/Body/Execute. This element can only have text nodes containing white-space characters.
The command is:
{
"refresh": {
"type": "full",
"objects": [
{
"database": "Finance"
}
]
}
}
This works ok when I execute it in SSMS, but fails when run via a SQL agent job.
Upvotes: 3
Views: 4594
Reputation: 1
I was also facing the same problem because of conflict between Compatibility levels.... The best solution I found is to use proxy agent having the credentials of SSAS tabular mode and run as Type Sql Server Analysis Services Query and using proxy agent to run as
Upvotes: 0
Reputation: 93
I have discovered what the problem was. It turned out that the SQL Server engine was version 2014, while SSAS was 2016. This is what was causing the problem. I was trying to process the 2016 SSAS tabular model using SQL 2014 SQL Agent. Once I realised this, I used the 2016 agent instead and the job is now working.
Upvotes: 2
Reputation: 2051
It looks like the command you are attempting to execute is in TMSL (Tabular Model Scripting Languge) but SQL Agent is expecting XMLA.
This site describes how to get the equivalent command in XMLA http://biinsight.com/how-to-automate-ssas-tabular-model-processing/
Upvotes: 0