Question

I'm getting the following error message when trying to restore a (known good) .bacpac file to a new SQL Server 2014 (Express) instance through the "Import Data-tier Application" wizard:

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

Unable to connect to target server. (Microsoft.Data.Tools.Schema.Sql)


Program Location:

at Microsoft.Data.Tools.Schema.Sql.Deployment.SqlDeploymentEndpointServer.OnInit(ErrorManager errors, String targetDBName) at Microsoft.Data.Tools.Schema.Sql.Deployment.SqlDeployment..ctor(SqlDeploymentConstructor constructor) at Microsoft.Data.Tools.Schema.Sql.Deployment.SqlDeploymentConstructor.ConstructServiceImplementation() at Microsoft.SqlServer.Dac.DacServices.CreatePackageToDatabaseDeployment(String connectionString, IPackageSource packageSource, String targetDatabaseName, DacAzureDatabaseSpecification creationDefaults, DacDeployOptions options, ErrorManager errorManager) 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)

The error specifically doesn't make sense because it successfully creates the database, as reported here (and manually confirmed). It just doesn't import the data.

Operation Failed Image

Googling hasn't turned up anything. Anybody else run into this? Any workarounds? Give up and go back to 2012?

Was it helpful?

Solution

I never did figure this out, but uninstalling 2014 and dropping back to 2012 seemed to fix it. For now, I'm chalking it up to a bug in 2014. It's not even at the beta stage yet, so I suppose it's not surprising that there are still significant bugs. (Still, isn't it interesting how so many other companies manage to release software on a much more aggressive schedule than MS, with each release being so much more stable?)

OTHER TIPS

I had same problem with SQL Server 2016RC2, export data from SQL Server 2014 and try to import on 2016RC2. For export and import I used SQL Management Studio 2014. That was the problem. When I installed SQL Management Studio 2016RC2 and use it for import the problem disappeared. In my case it was important to use same version of SQL Management Studio as the server on which the data is imported.

I had the same error, trying to import an export file from a V11 Azure db into a V12 localdb. Importing into the same version db (V11) worked. So my problem was mismatched versions.

I updated my version of SQL Management Studio to v17.8.1 and restores started working with no errors. I've found BACPAC restores have worked best when I run the latest SSMS. If you're not running 17.x or higher, the "Check for updates" feature will NOT tell you 17.x is available, so don't rely on that feature :)

Here's a link to the download:

https://docs.microsoft.com/en-us/sql/ssms/download-sql-server-management-studio-ssms?view=sql-server-2017

Also, make sure you're running the latest and/or matching version of SQL Server. It should be at least the version of SQL that created the BACPAC. Azure SQL is a bit funky here, so just run the latest SQL and SQL Management Studio and you should be fine.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top