Question

Here is my commandline:

C:\mydir>msdeploy.exe -verb:sync -Source:dbDacFx="C:\mydir\my.data.dacpac" -dest:dbDacFx="Data Source=myserver;Database=my.data;user id=sa;password=secret",wmsvc="https://www.mysite.co.nz",username=myuser,password=anothersecret -verbose

And here is the output:

Info: Using ID 'fad3c5de-98e8-413e-a21f-f3c86038790e' for connections to the remote server.
Verbose: Pre-authenticating to remote agent URL 'https://www.mysite.co.nz:8172/msdeploy.axd' as 'myuser'.
Verbose: Performing synchronization pass #1.
Verbose: Pre-authenticating to remote agent URL 'https://www.mysite.co.nz:8172/msdeploy.axd' as 'myuser'.
Verbose: No backup was executed.
Verbose: Received response from agent (HTTP status 'OK').
Info: Adding MSDeploy.dbDacFx (MSDeploy.dbDacFx).
Verbose: The dependency check 'DependencyCheckInUse' found no issues.
Verbose: The current synchronization pass is missing stream content for 1 objects.
Info: Using ID 'f1cb17ef-04f0-43f3-9759-e7ba58fba703' for connections to the remote server.
Verbose: Performing synchronization pass #2.
Verbose: Pre-authenticating to remote agent URL 'https://www.mysite.co.nz:8172/msdeploy.axd' as 'myuser'.
Info: Adding MSDeploy.dbDacFx (MSDeploy.dbDacFx).
Info: Adding database (data source=myserver;database=my.data;user id=sa)
Verbose: Waiting 120 seconds for the DACFx process to complete.
Verbose: The HTTP connection (ID='f1cb17ef-04f0-43f3-9759-e7ba58fba703', type ='GetTraceStatus') is being kept alive while the request is processed.
Verbose: The HTTP connection (ID='f1cb17ef-04f0-43f3-9759-e7ba58fba703', type ='GetTraceStatus') is being kept alive while the request is processed.
Verbose: Received response from agent (HTTP status 'OK').
Error Code: ERROR_CANNOT_PROCESS_DACPAC_OUTPUT
More Information: The output received from executing dacpac in a seperate process was not valid xml.  Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_CANNOT_PROCESS_DACPAC_OUTPUT.
Error: Data at the root level is invalid. Line 20, position 10.
Error count: 1.

It has taken an painfully long time to get this this point, and I had to resort to embedding usernames and passwords all through the command instead of using NTLM authentication. Now something is getting some invalid XML and I don't know where to go from here.

I'm trying to deploy database changes automatically from Team City. We administer all the servers, is sqlpackage.exe an easier bet?

Was it helpful?

Solution 2

Okay, I've confirmed that as soon as I removed the SqlCmd variables from my dacpac, it started giving me meaningful responses. I suspect @GrayPockets saw the same behaviour as me, just with a different cause.

I have been able to successfully deploy the dacpac, but immediately hit another roadblock in that we can't specify options such as BlockOnPossibleDataLoss for the dbDacFx provider using MSDeploy.

So, I guess technically I've answered my question, but I'm still going to discard MSDeploy until Microsoft cleans up this mess of half-implemented tools.

OTHER TIPS

I had this problem, and it ended up being a permissions issue.

The user only had db_datareader, db_datawriter, and execute.

I needed to give the SSDT user db_owner, then I was able to get past this error.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top