Monday, February 11, 2019

Error SQL72014, Error SQL72045, GRANT VIEW ANY COLUMN ENCRYPTION KEY DEFINITION TO PUBLIC; Azure SQL to On promise

Error SQL72014, Error SQL72045, GRANT VIEW ANY COLUMN ENCRYPTION KEY DEFINITION TO PUBLIC;

Azure SQL to On promise 




I have a SQL server 2014 installed on my Local and wanted to have a backup from Azure SQL database so i have followed below steps.

1. Create a ".bacpac" from Azure SQL Database.

2. Import the ".bacpac" file in to Local SQL Server.

While it's creating the new database i got below error.













TITLE: Microsoft SQL Server Management Studio

------------------------------

Could not import package.
Warning SQL0: A project which specifies Microsoft Azure SQL Database v12 as the target platform may experience compatibility issues with SQL Server 2014.
Warning SQL72012: The object [NewDatabase_Data] exists in the target, but it will not be dropped even though you selected the 'Generate drop statements for objects that are in the target database but that are not in the source' check box.
Warning SQL72012: The object [NewDatabase_Log] exists in the target, but it will not be dropped even though you selected the 'Generate drop statements for objects that are in the target database but that are not in the source' check box.
Error SQL72014: .Net SqlClient Data Provider: Msg 102, Level 15, State 1, Line 1 Incorrect syntax near 'COLUMN'.
Error SQL72045: Script execution error.  The executed script:
GRANT VIEW ANY COLUMN ENCRYPTION KEY DEFINITION TO PUBLIC;


 (Microsoft.SqlServer.Dac)

------------------------------
BUTTONS:

OK
------------------------------

 Solution


If you go in to Properties of Azure SQL database you can see there is a Database Role called Public under permission tab once you select it you can see VIEW ANY COLUMN ENCRYPTION KEY DEFINITION is Granted .









What i have done was unchecked those two granted items and followed above steps and it worked for me.

  
Please comment if you have any other experiences































Setting up Docker Containers for Dynamics 365 Business Central

Step 1: Please enable Hyper V and Container features from Programs and Features https://docs.microsoft.com/en-us/virtualization/hy...