Deploying Azure SQL DACPAC succeed but truly failed
See original GitHub issueI have the following report from VS Release Management:
When I go see the logs, I have the following:
2016-08-23T17:44:33.2521753Z ##[command]Import-Module -Name C:\Program Files (x86)\Microsoft SDKs\Azure\PowerShell\ServiceManagement\Azure\Azure.psd1 -Global
2016-08-23T17:44:34.2951803Z ##[command]Set-AzureSubscription -SubscriptionName Microsoft Azure Enterprise -SubscriptionId d8fabf37-7a70-4e1d-8677-292627ff0556 -Certificate ******** -Environment AzureCloud
2016-08-23T17:44:34.7021831Z ##[command]Select-AzureSubscription -SubscriptionId d8fabf37-7a70-4e1d-8677-292627ff0556
2016-08-23T17:44:34.8111846Z DacpacFilePath= Find-VstsFiles LegacyPattern C:\a\e1e41692b\xxxxxxxxxxxx\DB\xxxxxxx.DB.dacpac
2016-08-23T17:44:35.1011859Z packageFile= C:\a\e1e41692b\xxxxxxxxxx\DB\xxxxxx.DB.dacpac
2016-08-23T17:44:36.5644721Z ##[debug][Azure RDFE Call] Creating firewall rule 09e753b3-5585-45db-b123-23e2f548e3fe
2016-08-23T17:44:38.5047565Z ##[debug][Azure RDFE Call] Firewall rule 09e753b3-5585-45db-b123-23e2f548e3fe created
2016-08-23T17:44:39.5060271Z Publishing to database '<DATABASE>' on server 'xxxxxxxxxxxxxxx.database.windows.net'.
2016-08-23T17:44:40.5720086Z Initializing deployment (Start)
2016-08-23T17:44:56.8253318Z *** The column [dbo].[Role].[IsMembershipRole] on table [dbo].[Role] must be added, but the column has no default value and does not allow NULL values. If the table contains data, the ALTER script will not work. To avoid this issue you must either: add a default value to the column, mark it as allowing NULL values, or enable the generation of smart-defaults as a deployment option.
2016-08-23T17:44:57.3903355Z Initializing deployment (Complete)
2016-08-23T17:44:57.4133346Z Analyzing deployment plan (Start)
2016-08-23T17:44:57.5003360Z Analyzing deployment plan (Complete)
2016-08-23T17:44:57.5053362Z Updating database (Start)
2016-08-23T17:45:00.4424194Z An error occurred while the batch was being executed.
2016-08-23T17:45:00.4544174Z Updating database (Failed)
2016-08-23T17:45:00.4694169Z *** Could not deploy package.
2016-08-23T17:45:00.4704160Z Warning SQL72015: The column [dbo].[Role].[IsMembershipRole] on table [dbo].[Role] must be added, but the column has no default value and does not allow NULL values. If the table contains data, the ALTER script will not work. To avoid this issue you must either: add a default value to the column, mark it as allowing NULL values, or enable the generation of smart-defaults as a deployment option.
2016-08-23T17:45:00.4704160Z Error SQL72014: .Net SqlClient Data Provider: Msg 50000, Level 16, State 127, Line 6 Rows were detected. The schema update is terminating because data loss might occur.
2016-08-23T17:45:00.4714165Z Error SQL72045: Script execution error. The executed script:
2016-08-23T17:45:00.4714165Z IF EXISTS (SELECT TOP 1 1
2016-08-23T17:45:00.4724164Z FROM [dbo].[Role])
2016-08-23T17:45:00.4724164Z RAISERROR (N'Rows were detected. The schema update is terminating because data loss might occur.', 16, 127)
2016-08-23T17:45:00.4734171Z WITH NOWAIT;
2016-08-23T17:45:00.4934174Z ##[debug][Azure RDFE Call] Deleting firewall rule 09e753b3-5585-45db-b123-23e2f548e3fe on azure database server: xxxxxxxxxxxxxxxxxxxxx
2016-08-23T17:45:02.0672536Z ##[debug][Azure RDFE Call] Firewall rule 09e753b3-5585-45db-b123-23e2f548e3fe deleted on azure database server: xxxxxxxxxxxxxxxxxxxxxx
The update of the database definitely failed with an error. However, it seem that RM flagged it as successful. So that build was deployed and, with the missing column, was non-fonctionnal.
Is it a problem on our side or RM side?
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:13 (12 by maintainers)
Top Results From Across the Web
What the hell!? I can't deploy my dacpac to Azure SQL!
Deployment will not be running from your application processes (hence you don't need to give it excessive rights) but from a deployment process ......
Read more >SQL deployment fails in Azure pipelines
My deployment of AzureSQL database now fails regularly with the following message: Unable to connect to master or target server 'test1'.
Read more >Error when deploying DACPAC via Azure DevOps Pipelines
I have tried to deploy from my local machine and it is successful using the same sql credentials. Additionally I have confirmed that...
Read more >DacServices Deployment of dacpac to Azure SQL Database ...
The deployment fails with the below error : A connection was successfully established with the server, but then an error occurred during the ......
Read more >Publishing SQL Server databases from SSDT packages
Azure SQL Server firewall settings; SSDT project settings ... create_new_database ) - true if database should be re-created every time you deploy.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hello @MaximRouiller The fix will be deployed in all Scale Units in next couple of weeks
Thanks @MaximRouiller In case issue persists please send across details requested above at RM_Customer_Queries (at) microsoft (dot) com