0

I hope you are all good

I am doing or importing a bacpac file from azure SQL to SQL on-premisse with SSMS

and I am receiving this error.

Somebody get me help or give me a north

enter image description here

Details Could not load schema model from package. (Microsoft.SqlServer.Dac)


Program Location:

at Microsoft.SqlServer.Dac.DacPackage.LoadModel(IPackageSource packageSource, Boolean ignoreUnresolvedExternalErrors) at Microsoft.SqlServer.Dac.Extensions.DacExtensions.GetCollationString(IPackageSource packageSource) at Microsoft.SqlServer.Dac.Extensions.DacExtensions.GetCollationString(BacPackage package) at Microsoft.SqlServer.Management.Dac.DacWizard.CreateDatabaseOnTargetWorkItem.DoWork() at Microsoft.SqlServer.Management.TaskForms.SimpleWorkItem.Run()

===================================

The store schema does not contain the Element class SqlXmlCompressionOption. (Microsoft.Data.Tools.Schema.Sql)


Program Location:

at Microsoft.Data.Tools.Schema.SchemaModel.DataSchemaModel.ModelEntityFactory.CreateElement(String elementClassName, String nameString, Int32 line, Int32 column) at Microsoft.Data.Tools.Schema.SchemaModel.DataSchemaModel.PossibleElementState.ReadElement() at Microsoft.Data.Tools.Schema.SchemaModel.DataSchemaModel.ModelContentsState.ProcessStartElement() at Microsoft.Data.Tools.Schema.SchemaModel.XmlDeserializerEngine.ReadData(DeserializerState initialState, Boolean keepCurrentReaderPosition) at Microsoft.Data.Tools.Schema.SchemaModel.DataSchemaModel.DeserializeXml(TextReader input, ErrorManager errors, String source, Action3 constructorParametersSetter) at Microsoft.Data.Tools.Schema.SchemaModel.DataSchemaModel.DeserializePackage(SqlPackage package, ErrorManager errors, Action3 constructorParametersSetter) at Microsoft.SqlServer.Dac.DacPackage.DeserializePackage(SqlPackage package, DacSchemaModelStorageType modelStorageType, ErrorManager errorManager, DataSchemaModelHeader& header) at Microsoft.SqlServer.Dac.DacPackage.LoadModel(IPackageSource packageSource, Boolean ignoreUnresolvedExternalErrors)

SQL on premise Version (sql server 2019)

enter image description here

SQL Azure Version enter image description here

9
  • try to install the dacfx latest version: learn.microsoft.com/en-us/sql/tools/sqlpackage/…
    – MBuschi
    Commented Aug 9, 2022 at 9:41
  • Good morning, thank you very much for your help, but I downloaded the latest version of DAC Error continue SqlPackage /Action:Import /SourceFile:"D:\AzureFiles\DatabaseClient-2022-07-31-10-11.bacpac" /TargetConnectionString:"Data Source=NB114;Initial Catalog=DatabaseClient; Integrated Security=true;" Importing into database 'DatabaseClient' on server 'NB114'. Creating deployment plan Initializing deployment *** Error when importing database: Error generating deployment plan. Deployment cannot continue. The repository schema does not contain the Element SqlXmlCompressionOption class. Commented Aug 9, 2022 at 13:18
  • I noticed that the model.xml file generated by bacpac has more than 1000 tags in this format <Element Type="SqlXmlCompressionOption" /> <Element Type="SqlXmlCompressionOption" /> <Element Type="SqlXmlCompressionOption" /> <Element Type="SqlXmlCompressionOption" /> <Element Type="SqlXmlCompressionOption" /> <Element Type="SqlXmlCompressionOption" /> <Element Type="SqlXmlCompressionOption" /> <Element Type="SqlXmlCompressionOption" /> <Element Type="SqlXmlCompressionOption" /> <Element Type="SqlXmlCompressionOption" /> <Element Type="SqlXmlCompressionOption" /> Commented Aug 9, 2022 at 13:26
  • Are you using the latest version of SSMS?
    – MBuschi
    Commented Aug 10, 2022 at 6:31
  • Probably this XML compression is a new feature of Azure SQL Database...
    – MBuschi
    Commented Aug 10, 2022 at 7:04

1 Answer 1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.