Question

Mayzing on Sat, 22 Oct 2016 11:09:13


I am trying to import a bacpac exported from SQL Azure v12 database but been failing due to database credential to connect to storage account use for extended events. 

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 SQL0: The source contains users that rely on an external authentication provider that is not supported by the target. These users will be treated as users without logins.
Warning SQL72012: The object [chasqlxxx_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 [chasqlxxx_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 'https://xxxxxxx.blob.core.windows.net/extended-events'.
Error SQL72045: Script execution error.  The executed script:
CREATE DATABASE SCOPED CREDENTIAL [https://xxxxxxx.blob.core.windows.net/extended-events]
    WITH IDENTITY = N'SHARED ACCESS SIGNATURE';
Error SQL72014: .Net SqlClient Data Provider: Msg 319, Level 15, State 1, Line 2 Incorrect syntax near the keyword 'with'. If this statement is a common table expression, an xmlnamespaces clause or a change tracking context clause, the previous statement must be terminated with a semicolon.
Error SQL72045: Script execution error.  The executed script:
CREATE DATABASE SCOPED CREDENTIAL [https://xxxxxxxx.blob.core.windows.net/extended-events]
    WITH IDENTITY = N'SHARED ACCESS SIGNATURE';

 (Microsoft.SqlServer.Dac)


Sponsored



Replies

Lydia Zhang on Tue, 25 Oct 2016 09:54:31


Hi Mayzing,

Based on the error message that you have post, the import process fails in CREATE DATABASE SCOPED CREDENTIAL.

Do you have database scoped credential in the Azure V12 database? If that is the case, as stated in this article, the database scoped credential feature is only supported in SQL Server 2016 and Azure SQL databases.

In your scenario, you can import .bacpac file to SQL Server 2016. However, if you persist to move Azure SQL database to SQL Server 2014, please check the sys.database_credentials view in Azure SQL database and remove database scope credentials with DROP DATABASE SCOPED CREDENTIAL command, then regenerate .bacpac file and import it to SQL Server.

Thanks,
Lydia Zhang

MSDN Community Support
Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.