New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Azure SQL Database Deployment task failing - Could not deploy package #3131
Comments
Hi @gleizerowicz |
@gleizerowicz Do you still face the issue? Please send the complete logs to "RM_Customer_Queries at Microsoft dot com" or post here itself in case you do. |
Yes we are still facing the issue. I sent the logs on Nov 22. I will resend. |
I'm also experiencing this issue - at least I think it's the same (note i've sort of obfuscated the links in the log below)
|
@gleizerowicz Sorry but I am not getting your logs on RM_Customer_Queries. |
I've been using VSTS for all of 2 days. Can you give me instructions for accessing "debug logs" and i'll get right onto it. Wait ......... you're just talking about the build logs. Ok - they're on their way... Thanks. |
Hi @kcliffe |
@rajatagrawal-dev Thanks. Logs on the way... |
It seems that the task is failing at the point where it is executing the SqlPackage.exe command. This suggests that one or more of the parameters to this command are invalid. Please try the following.
"C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\SQLDB\DAC\130\SqlPackage.exe" /SourceFile:"<path_to_dacpac>" /Action:Publish /TargetServerName:"<server_name.database.windows.net>" /TargetDatabaseName:"<database_name>" /TargetUser:"<server_username>" /TargetPassword:"<server_password>" /TargetTimeout:120 Correct the path to sqlpackage.exe also to point it to its location on your system.
|
@rajatagrawal-dev Thanks. I tried option 2 first, no luck. I then ran option 1 on my local dev box. I receive an error: Googling that gives: The release definition I've selected auto-detect for the firewall options (as advised for hosted servers?). The credentials I'm using are from a publishsettings file so i believe they're correct? |
The task requires the credentials for the azure SQL server on which the DB resides. You must have specified these credentials when you created the server. Also, can you try creating a dacpac with target platform as Microsoft Azure SQL Database V12 and check if you can deploy that? |
Can you also try the 3 points I mentioned above in one of my comments (3 comments above) and get back to us with the results? |
Sorry for the delay. I got the SqlPackage command successfully deploying from my dev box - i hadn't added myself to the Azure Sql firewall rules. It's using the same credentials I've been providing to the deployment task (unfortunately?) In summary:
|
Update: I have a successful deployment. I thought I'd just try again creating a new task from scratch. I'm not aware of what i might have changed - apart from possibly the publish profile i elected to use. I'll send logs for comparison? |
@rajatagrawal-dev I was able to execute the same command successfully locally against the same Azure SQL Server with the same package and parameters, and it is still failing with the same errors as before. This time I created a new release definition with one task and hardcoded all of the parameter values to keep things simple. Latest log file is attached. |
@rajatagrawal-dev I found my issue based on this: #2123 and by actually reading the SqlPackage docs. My database project has a variable, and if none are supplied in the command line arguments then SqlPackage will fail. This issue is resolved for me. If you have variables, you must supply values in the "Additional SqlPackage.exe Arguments" box: Docs for additional arguments: https://msdn.microsoft.com/en-us/library/hh550080(v=vs.103).aspx |
Hi - we're using the Azure SQL Database Deployment task in VSTS to deploy a dacpac, and getting a vague error "*** Could not deploy package".
All logs look normal (finding SqlPackage.exe, the dacpac file, the publish profile, adding/deleting the firewall rule for the hosted build agent). The last 3 log entries we get:
With verbose logging turned on, the best info I can get is that the generic error handler in the deployment script is getting hit
The text was updated successfully, but these errors were encountered: