导出Azure SQL数据库时出现错误SQL71501 [英] Error SQL71501 on exporting Azure SQL Database

查看:264
本文介绍了导出Azure SQL数据库时出现错误SQL71501的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

导出Azure SQL数据库时出现一个奇怪的错误.在最近进行一些模式更改之前,导出一直可以正常工作,但是现在却出现错误SQL71501.

I'm getting a strange error when exporting an Azure SQL Database. Exports had been working fine until some recent schema changes, but it's now giving me Error SQL71501.

数据库为V12,兼容级别130(尽管master数据库仍为兼容级别120).

The database is V12, Compatibility Level 130 (although the master database is still Compatibility Level 120).

问题似乎是由新的表值函数引起的,该函数使用内置的

The problem seems to be caused by a new table-valued function, which uses the built in STRING_SPLIT function. There were already stored procedures using STRING_SPLIT and they don't seem to have affected the export, but the function (which compiles OK, and is working fine) seems to cause a problem with the export.

下面的函数是真实函数的简化版本,但是会导致相同的问题.

The function below is a simplified version of the real one, but causes the same problem.

CREATE FUNCTION [dbo].[TestFunction](
    @CommaSeparatedValues VARCHAR(MAX)
)
RETURNS TABLE
AS
    RETURN

    SELECT      c.ClientId,
                c.FullName

    FROM        dbo.Client c

    INNER JOIN  STRING_SPLIT(@CommaSeparatedValues, ',') csv
    ON          c.ClientId = csv.value

导入/导出历史记录"刀片中给出的完整错误消息如下:

The complete error message given in the Import/Export history blade is as follows:

服务操作期间遇到错误.

Error encountered during the service operation.

在用作数据包一部分的架构中找到一个或多个不受支持的元素.

One or more unsupported elements were found in the schema used as part of a data package.

错误SQL71501:验证元素[dbo]时出错.[TestFunction]:函数:[dbo].[TestFunction]对对象[dbo]的引用未解决.[STRING_SPLIT].

Error SQL71501: Error validating element [dbo].[TestFunction]: Function: [dbo].[TestFunction] has an unresolved reference to object [dbo].[STRING_SPLIT].

错误SQL71501:验证元素[dbo]时出错.[TestFunction]:功能:[dbo].[TestFunction]包含对对象的未解析引用.对象不存在或引用不明确,因为它可以引用以下任何对象:[dbo].[Client].[csv],[dbo].[STRING_SPLIT].[csv]或[dbo]. [STRING_SPLIT].[值].

Error SQL71501: Error validating element [dbo].[TestFunction]: Function: [dbo].[TestFunction] contains an unresolved reference to an object. Either the object does not exist or the reference is ambiguous because it could refer to any of the following objects: [dbo].[Client].[csv], [dbo].[STRING_SPLIT].[csv] or [dbo].[STRING_SPLIT].[value].

推荐答案

这是Microsoft SQL小组的Xiaochen.我们已经在解决此问题.该修复程序将在接下来的几周内部署到导出服务.同时,此修复程序已在最新的DacFX 16.4(

This is Xiaochen from Microsoft SQL team. We are already working on the fix of this issue. The fix will be deployed to the export service in next few weeks. In the same time, the fix is already available in the latest DacFX 16.4 (https://blogs.msdn.microsoft.com/ssdt/2016/09/20/sql-server-data-tools-16-4-release/). Before we fix this issue in the service, you can download the DacFX 16.4 and use sqlpackage to work around.

这篇关于导出Azure SQL数据库时出现错误SQL71501的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆