Error SQL72018: SqlDatabaseWorkloadGroup could not be imported - SQLPackage.exe

Taranjeet Malik 476 Reputation points
2024-02-12T23:21:48.19+00:00

Hi We're trying to move a Dedicated SQL Pool DB (DW DB) from one tenant to another using SQLPackage.exe. The extraction of the source DW DB completed successfully, however, when publishing / importing the same to target DW Server, we're seeing the following error: .\SqlPackage : *** An error occurred during deployment plan generation. Deployment cannot continue. At line:1 char:1 .\SqlPackage /Action:Publish /p:IgnorePermissions=True /SourceFile:de ... CategoryInfo : NotSpecified: (*** An error oc...annot continue.:String) [], RemoteException FullyQualifiedErrorId : NativeCommandError Error SQL72018: SqlDatabaseWorkloadGroup could not be imported but one or more of these objects exist in your source. Errors occurred while modeling the target database. Deployment can not continue. I've checked the source and there's isn't any Workload Groups configured in the source. Any pointers please? Thanks Taranjeet Singh

Azure SQL Database
Azure Synapse Analytics
Azure Synapse Analytics
An Azure analytics service that brings together data integration, enterprise data warehousing, and big data analytics. Previously known as Azure SQL Data Warehouse.
4,696 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Taranjeet Malik 476 Reputation points
    2024-02-13T02:15:06.8966667+00:00

    We found the root cause...it was permissions issue. Used the /DiagnosticsFile:C:\Diag\diag.txt parameter with the SQLPackage command to generate diagnostic logs that indicated this: Error detected when reverse engineering the database. Severity:'Error' Prefix:'' Error Code:'0' Message:An error occurred while attempting to reverse engineer elements of type Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlDatabaseWorkloadGroup: Batch Command during reverse engineer failed with Error Code: -2146232060 Line Number: 1 Error Message: User does not have permission to perform this action.. Microsoft.Data.Tools.Diagnostics.Tracer Error: 19 : 2024-02-13T11:33:34 : Microsoft.SqlServer.Dac.DacServicesException: An error occurred during deployment plan generation. Deployment cannot continue. The error indicates that user account specified in the SQLPackage command is unable to create Schema objects. So, used the SQL Server Management Studio to see if the has rights to create a table in target DW DB and received permissions error while doing so. Assigned the user DBO rights on target DW DB and that resolved the problem.


  2. phemanth 8,645 Reputation points Microsoft Vendor
    2024-02-13T04:24:34.5266667+00:00

    @Taranjeet Malik
    Welcome to Microsoft Q&A platform and thanks for posting your question.

    I'm glad that you were able to resolve your issue and thank you for posting your solution so that others experiencing the same thing can easily reference this! Since the Microsoft Q&A community has a policy that "The question author cannot accept their own answer. They can only accept answers by others "I'll repost your solution in case you'd like to accept the answer.

    • Ask: Hi We're trying to move a Dedicated SQL Pool DB (DW DB) from one tenant to another using SQLPackage.exe. The extraction of the source DW DB completed successfully, however, when publishing / importing the same to target DW Server, we're seeing the following error: .\SqlPackage : *** An error occurred during deployment plan generation. Deployment cannot continue. At line:1 char:1 .\SqlPackage /Action:Publish /p:IgnorePermissions=True /SourceFile:de ... CategoryInfo : NotSpecified: (*** An error oc...annot continue.:String) [], RemoteException FullyQualifiedErrorId : NativeCommandError Error SQL72018: SqlDatabaseWorkloadGroup could not be imported but one or more of these objects exist in your source. Errors occurred while modeling the target database. Deployment can not continue. I've checked the source and there's isn't any Workload Groups configured in the source. Any pointers please.
    • Solution: We found the root cause...it was permissions issue. Used the /DiagnosticsFile:C:\Diag\diag.txt parameter with the SQLPackage command to generate diagnostic logs that indicated this: Error detected when reverse engineering the database. Severity:'Error' Prefix:'' Error Code:'0' Message:An error occurred while attempting to reverse engineer elements of type Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlDatabaseWorkloadGroup: Batch Command during reverse engineer failed with Error Code: -2146232060 Line Number: 1 Error Message: User does not have permission to perform this action.. Microsoft.Data.Tools.Diagnostics.Tracer Error: 19 : 2024-02-13T11:33:34 : Microsoft.SqlServer.Dac.DacServicesException: An error occurred during deployment plan generation. Deployment cannot continue. The error indicates that user account specified in the SQLPackage command is unable to create Schema objects. So, used the SQL Server Management Studio to see if the has rights to create a table in target DW DB and received permissions error while doing so. Assigned the user DBO rights on target DW DB and that resolved the problem.

    If I missed anything please let me know and I'd be happy to add it to my answer, or feel free to comment below with any additional information. If you have any other questions, please let me know. Thank you again for your time and patience throughout this issue.

    ---Please don’t forget to Accept Answer and Yes for "was this answer helpful" wherever the information provided helps you, this can be beneficial to other community members.