Sample Header Ad - 728x90

Data-tier .bacpac import keeps failing

2 votes
0 answers
1082 views
Within a container, I have SqlServer running in a docker container. It was created like so:
run -e "ACCEPT_EULA=Y" -e "MSSQL_SA_PASSWORD=$1" -p 1433:1433 --name sql1 -v sql1-sqlvolume:/var/opt/mssql -d mcr.microsoft.com/mssql/server:2017-latest
I then use SSMS to import a data-tier application. Then in the wizard I import from disk and verify all the data until it then runs the import. With Sql Server Settings:
Data file path: /var/opt/mssql/data
Log file path: /var/opt/mssql/data
But every time, it fails with this:
Creating database on target - Success
Importing database - Error
Creating deployment plan - Error
Initializing deployment - Error
Refreshing Object Exporer - Success
The Error is: =================================== Object reference not set to an instance of an object. (Microsoft.Data.Tools.Schema.Sql) ------------------------------ Program Location: at Microsoft.Data.Tools.Schema.Sql.Deployment.SqlDeploymentPlanGenerator.DeploymentScriptDomGenerator.GenerateFragment(Int32 operation, IModelElement element) at Microsoft.Data.Tools.Schema.Sql.Deployment.SqlDeploymentPlanGenerator.DeploymentScriptDomGenerator.GenerateSteps(Int32 operation, IModelElement element) at Microsoft.Data.Tools.Schema.Sql.Deployment.OrderedStepGenerator.Add(DeploymentScriptDomGenerator scriptDom, IModelElement element, Int32 operation) at Microsoft.Data.Tools.Schema.Sql.Deployment.Analyzers.PlanMediator.BuildDependencyOrderedSteps(Int32 operation, List1 classOrder, List1 operationOrder, Dictionary2 changes, Boolean preserveGraphs, Dictionary2& relating, Dictionary`2& related) at Microsoft.Data.Tools.Schema.Sql.Deployment.Analyzers.PlanMediator.BuildOperations() at Microsoft.Data.Tools.Schema.Sql.Deployment.SqlDeploymentPlanGenerator.OnGeneratePlan() at Microsoft.Data.Tools.Schema.Sql.Deployment.SqlDeploymentPlanGenerator.GeneratePlan(List`1 drops) at Microsoft.Data.Tools.Schema.Sql.Deployment.SqlDeployment.BuildPlan() at Microsoft.Data.Tools.Schema.Sql.Deployment.SqlDeployment.Controller.CreatePlan() at Microsoft.SqlServer.Dac.DeployOperation.c__DisplayClass3.c__DisplayClass5.b__1() at Microsoft.Data.Tools.Schema.Sql.Dac.OperationLogger.Capture(Action action) at Microsoft.SqlServer.Dac.DeployOperation.c__DisplayClass3.b__0(Object operation, CancellationToken token) at Microsoft.SqlServer.Dac.Operation.Microsoft.SqlServer.Dac.IOperation.Run(OperationContext context) at Microsoft.SqlServer.Dac.ReportMessageOperation.Microsoft.SqlServer.Dac.IOperation.Run(OperationContext context) at Microsoft.SqlServer.Dac.OperationExtension.CompositeOperation.Microsoft.SqlServer.Dac.IOperation.Run(OperationContext context) at Microsoft.SqlServer.Dac.OperationExtension.CompositeOperation.Microsoft.SqlServer.Dac.IOperation.Run(OperationContext context) at Microsoft.SqlServer.Dac.DeployOperation.Microsoft.SqlServer.Dac.IOperation.Run(OperationContext context) at Microsoft.SqlServer.Dac.OperationExtension.Execute(IOperation operation, DacLoggingContext loggingContext, CancellationToken cancellationToken) at Microsoft.SqlServer.Dac.DacServices.InternalDeploy(IPackageSource packageSource, Boolean isDacpac, String targetDatabaseName, DacDeployOptions options, CancellationToken cancellationToken, DacLoggingContext loggingContext, Action`3 reportPlanOperation, Boolean executePlan) at Microsoft.SqlServer.Dac.DacServices.ImportBacpac(BacPackage package, String targetDatabaseName, DacImportOptions importOptions, Nullable`1 cancellationToken) at Microsoft.SqlServer.Dac.DacServices.ImportBacpac(BacPackage package, String targetDatabaseName, DacAzureDatabaseSpecification creationDefaults, Nullable`1 cancellationToken) at Microsoft.SqlServer.Management.Dac.DacWizard.ImportDatabase.DoWork() at Microsoft.SqlServer.Management.TaskForms.SimpleWorkItem.Run() Can anybody see what I am doing wrong here? ====== UPDATE: The .bacpac is created from a db running in Azure Cloud. This also happens when using 2019-latest.
Asked by Eric (121 rep)
May 27, 2020, 11:21 AM
Last activity: May 27, 2020, 12:59 PM