SQL Server 2019 PolyBase 连接到 SQL Server 2016 - 错误

SQL Server 2019 PolyBase connection to SQL Server 2016 - Error

我试图在 SQL Server 2019 和 SQL Server 2016 之间设置链接服务器,但我一直收到如下错误:

CREATE EXTERNAL DATA SOURCE PolyBaseSQL
    WITH ( 
    LOCATION = 'sqlserver://NYCSQL10.nydomain.net\ACT:1488',
    -- PUSHDOWN = ON | OFF,
      CREDENTIAL = SQLServerCredentials
    );
    GO

错误:

Msg 105001, Level 16, State 1, Line 25
External access operation failed because the location URI is invalid. Revise the URI and try again

有人做过类似的事情吗?

grajee

https://social.msdn.microsoft.com/Forums/sqlserver/en-US/df4841e5-57f3-451a-94c9-486cab2a431b/sqlserver-2019-polybase-external-access-operation-failed-because-the-location-uri-is-invalid?forum=sqldatabaseengine

我刚刚在 MSDN 论坛上回答了你的问题,但我想我也应该在这里回答。

从 SQL 2019 到 SQL 2016/17 创建外部 table 工作正常。您遇到的问题是 LOCATION 参数就是这样;您的 SQL 实例所在的物理服务器的位置。如果要连接到默认实例以外的实例,则需要使用 CONNECTION_OPTIONS 参数。

所以像这样:

CREATE EXTERNAL DATA SOURCE PolyBaseSQL
WITH 
( 
   LOCATION = 'sqlserver://NYCSQL10.nydomain.net',
   -- PUSHDOWN = ON | OFF,
   CONNECTION_OPTIONS = 'Server=NYCSQL10\ACT:1488'
   CREDENTIAL = SQLServerCredentials
);
GO

希望对您有所帮助。