Forum Discussion
BACPAC: Could not import package. SQL72012
Hi,
I have the exact same problem. Done the same upgrades as you and even upgraded my local SQL Server to the latest service pack (2016 sp1).
Did you find any permanent solution for this? Have tried the above with no luck.
Br,
Fredrik
Hi Fredrik,
yes!
It turned out that when I imported the same database into another SQL Azure Server, I received the following error:
Could not import package.
Error SQL72014: .Net SqlClient Data Provider: Msg 468, Level 16, State 9, Procedure vwSomeView, Line 3
Cannot resolve the collation conflict between "SQL_Latin1_General_CP1_CI_AS" and "Latin1_General_CI_AS" in the UNION operation.
Error SQL72045: Script execution error. The executed script:
CREATE VIEW [dbo].[vwSomeView] ...
So, this lead me to the solution. Obviously, in my database, I added some new columns and that was done in with a different collation. That caused my errors.
To make it short, my solution had 2 parts:
1. https://www.sqlservercentral.com/Forums/PrintTopic1886371.aspx
2. I needed to convert all columns to the same collation, similar as here:
ALTER TABLE MyTable ALTER COLUMN [MyColumn1] varchar(MAX) COLLATE Latin1_General_CI_AS NULL
Since this would mean a lot of effort I found a Stored Procedure script that runs through all tables and generates that ALTER script from https://stackoverflow.com/questions/18122773/change-collations-of-all-columns-of-all-tables-in-sql-server
After These two steps, I regenerated the BACPAC and I was able to Import that database.
I hope I find some time to publish that in my blog in the next days to make a detailled description about my scenario.
Hope that helps?!
br, Toni
- DeletedDec 17, 2018
Thank you so much!
I used
sp_configure 'contained database authentication', 1; GO RECONFIGURE; GO
to enables contained databases on the instance of the Database Engine
https://docs.microsoft.com/en-us/sql/database-engine/configure-windows/contained-database-authentication-server-configuration-option?view=sql-server-2017
- kanchan_Feb 27, 2020Copper Contributor
Hello Sir please tell me where do we run this reconfigure code ....on the target server where we r trying to import the bacpac file....Pls answer.Thanks
I ran the same code on target server where we r trying to import the bacpac file but again the same error.
please suggest..thanks