I've used the ssas deployment wizard to generate xmla json. the json starts like this
{"sequence": {"operations": [{
"createOrReplace": {
"object": {
"database": "devopstest"
},
"database": {
"name": "devops test",
"compatibilityLevel": 1400,
"model": {
"culture": "en-US",
"dataSources": [
...
However when i attempt to deploy this via Invoke-ASCmd -ConnectionString $constr -InputFile $inputFilePath -Server $server -ServicePrincipal
I get the following error
Either the user, '<pii>useraccount</pii>', does not have access to the 'devops test' database, or the database does not exist.
The database doesn't exist, as the error points out, but shouldn't it be created? this xmla json was generated by the deployment wizard both via the UI and CLI. I first attempted to deploy via CLI and got the same result. If i run the model through the SSAS deployment wizard UI then the database is created. So why is it that when I run the same model through the CLI of the same exe, or through Invoke-ASCmd
that it won't create the database.
So I figured out my issue. My connection string in my deploymenttargets
file had an intitial catalog value set. If this database didn't exist on the target server, deployments using Invoke-AScmd
and the SSAS deployment wizard CLI would fail. However, using the SSAS deployment wizard GUI would succeed. So I guess what contributed to the confusion was different behaviors of the same application dependent on if it was invoked via CLI or GUI.