Importing .bacpac fails on 'Importing Database' - sql-server-express

I am trying to import a .bacpac file into my SQL Server 2016 Express database, however it's failing on the Importing Database step. Has anyone seen this before? Are there any common causes for it to fail at this step?

Whenever I've run into this problem, it's been because the .bacpac came from a different version of SQL Server than I was running. Last time it was because the backup came from SQL Server 2016 and I was running 2014. Upgraded to 2016 and the backup imported just fine.

Related

SQL Server Import and Export Wizard: Data destination issue

I am trying to get familiar with SQL Server commands and procedures. So I have downloaded from my university's Dreamspark account the Visual Studio 2015 Enterprise Edition.
My idea (call it personal project) was to try and import an excel table with dimensions 34162x465. And then within Visual Studio to try and manipulate it. For that reason I downloaded the SSDT for Visual Studio 2015 in order to use the SQL Server Import and Export Wizard.
I successfully researched and solved the first shortcoming, which was a Microsoft.ACE.OLEDB.12.0 problem.
But then, after I chose the excel file as a source, and when I reached the next step, to pick a destination, I chose SQL Server Native Client 11.0. The problem is that I cannot assign a SQL server because the drop down list is empty.
**I have already set up a local server (C:) and a database in Visual Studio's SQL environment, but I have no idea why the Wizard cannot detect its name.
Apologies if the question sounds ambiguous or I have missed any crucial details. Also, I have searched in various forums and online for similar issues but I couldn't find a solution.

Sql Azure Premium - Importing dacpac error 'Origin.xml'

I'm trying to import my database using an dacpac file to Sql Azure Premium Version and after some minutes I got this message:
"Error encountered during the service operation. Could not load package. 'Origin.xml' is missing from the dacpac package"
I did another import using an small database and work was okay.
Any Idea?
Thanks.
That's quite an old question but I just encountered the same issue. The problem was that .bacpac was exported with an old version of MSSMS and I tried to import with R2. Exporting with R2 solved the issue.

Create SQL Server 2008 Backup from 2008 R2

I've created a Backup of a Database on a server with SQL Server 2008 R2.
I wish to restore this onto a server that is running SQL Server 2008.
I've received the error:
"The database was backed up on a server running version 10.50.4000.
That version is incompatible with this server, which is running
version 10.00.5500."
Is it possible to produce a version 10.00.5500 compatible backup from 10.50.4000.
If not what other options do I have, or other ways to create the database.
I have tried to use the Copy Database task, but also received errors.
This is not possible. At least, you won't be able to use the backup to restore on an older version.
Nenad Zivkovic provided a good link and there are several ways out of this situation listed:
Upgrade the older version of SQL Server to be at the same level as the newer SQL Server.
Script out the objects from the newer database and then usp a bcp process to extract the data from the newer database and import it into the older database.
Use the SQL Server Import and Export Wizard to build an SSIS package to move the data (it will move the data only).
Build a custom SSIS package to do the data move.
Use replication to move the data from the newer database to the older one.
Use some other form of scripting, such as with PowerShell, to keep the databases in sync.
(Source: http://www.mssqltips.com/sqlservertip/2675/why-cant-i-restore-a-database-to-an-older-version-of-sql-server/)

Latest recommendations for Import\Export of SQl Server bacpac files [duplicate]

This question already has answers here:
Azure SQL Database Bacpac Local Restore
(6 answers)
Closed 9 years ago.
I'm trying to get up and running with Windows Azure but finding the database side extremely frustrating. I need to export my local database to a bacpac file from SQL 2008 and then import into Azure. I would also like to be able to export from Azure and then import to my local database for debugging.
I have found a few tutorials online for achieving this but every time I get part way through one of them I eventually hit a section that requires a step where the information or download is marked as outdated! it seems to have changed quite a bit over time and I can't find an up to date resource
Can anyone provide an updated link on how to do this?
Thanks
I had the same issues, all documentation on importing/exporting .bacpac mostly reference SQL 2012. I needed to export a sql 2008 R2 express database to azure as well as to be able to export from azure to my local devlopment environment.
I found the SQL Database Migration Wizard v3.9.9 & v4.0.12 to do the trick.
Download Link: http://sqlazuremw.codeplex.com/releases/view/32334
Also download the documentation and it will go through the migration of .bacpac to and from the azure and your local server. What is great about the tool is it will perform a compatibility check on the database to ensure it is ready to deploy to azure.
There is also another command line tool I investigated sqlpackage.exe that can be downloaded as part of Microsoft SQL Server Data Tools
Download Link: http://msdn.microsoft.com/en-us/data/hh297027
Below is an example of exporting a .bacpac file:
sqlpackage.exe /a:Export /ssn:SERVERNAME\sqlexpress /sdn:SOURCEDATABASENAME /su:DATABASEUSER /sp:DATABASEPASSWORD /tf:c:\SOURCEDATABASENAME.bacpac
I needed to export a SQL Azure database and then import it into a local SQL 2008 R2 server (Note I am also using Visual Studio 2010). Microsoft certainly went out of their way to make this a painful task, however, I was able to do it by doing the following:
Goto think link http://msdn.microsoft.com/en-us/jj650014 and install the SQL Server Data Tools for Visual Studio 2010
This will install on your local drive. In my case here is where it put it: C:\Program Files (x86)\Microsoft SQL Server\110\DAC\bin
Browse to this via the command line or powershell
You are going to want to execute the SqlPackage.exe
Open up this link to see a list of all the parameter options for SqlPackage.exe (http://msdn.microsoft.com/en-us/library/hh550080(v=vs.103).aspx)
Here is my command line that I needed to execute to import a .bacpac file into my local SQL 2008 R2 server:
.\SqlPackage.exe /a:Import /sf:C:\mydatabasefile.bacpac /tdn:NorthWind /tsn:BINGBONG
/tdn is the name of the database you want your bacpac file to restore to.
/tsn is the name of your SQL server.
You can see all these parameter descriptions on the link from #5.

Issue while restoring a Database Backup file

I get the below mentioned while restoring a database back-up file to my system. Actually the back-up has been taken in other system and I'm trying to restore that file to my systems' sql server. Could anybody assist me in explaining what the error is and how to rectify? Please...
Error:
"System.Data.SqlClient.SqlError: The database was backed up on a server running version 10.50.1600. That version is incompatible with this server, which is running version 10.00.2531. Either restore the database on a server that supports the backup, or use a backup that is compatible with this server. (Microsoft.SqlServer.Smo)"
Thank You.
You SQL Server where you want to restore the database is older then the origin.
So to restore this database, you have to use a newer version.
Go to downloads.microsoft.com and get the SQL Express version of the latest, install it on any machine and restore. You can even install on the same machine.
If you cant udpate your SQL Server, you can connect both DB's then and use DTS to move the data back to your "old sql system".