导入数据层应用程序时出错

时间:2018-07-09 10:45:13

标签: sql sql-server azure-sql-database

当我尝试将从2016年版本的SQL SERVER实例中获取的bacpac文件导入到SQL SERVER 2014实例时,抛出如下错误

**Could not import package.
Error SQL72014: .Net SqlClient Data Provider: Msg 102, Level 15, State 1, Line 1 Incorrect syntax near 'xxx'.
Error SQL72045: Script execution error.  The executed script:
CREATE DATABASE SCOPED CREDENTIAL [xxx]
    WITH IDENTITY = N'xxxsa';
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 [xxx]
    WITH IDENTITY = N'xxxsa';
 (Microsoft.SqlServer.Dac)**

在导入并尝试使用导入数据层应用程序方法之前,db的兼容性已设置为2014。

1 个答案:

答案 0 :(得分:1)

我刚刚删除了范围凭证,并且效果很好。

DROP DATABASE SCOPED CREDENTIAL [xxx]