[英]PolyBase on SQL Server 2019: IBM DB2 External tables
I need to make the data from the DB2 10.5 database available as an external table on a PolyBase enabled SQL Server 2019 instance and running into a problem...我需要将 DB2 10.5 数据库中的数据作为启用 PolyBase 的 SQL Server 2019 实例上的外部表提供并遇到问题...
In DB2 version 11.1 IBM added the LIMIT clause (LIMIT ) In DB2 version 10.5 IBM was still using the FETCH clause (FETCH FIRST ROWS ONLY)在 DB2 11.1 版中,IBM 添加了 LIMIT 子句 (LIMIT) 在 DB2 10.5 版中,IBM 仍在使用 FETCH 子句(仅 FETCH FIRST ROWS)
SQL server is miss translating a T-SQL TOP clause into LIMIT instead of the FETCH that this database requires. SQL 服务器未将 T-SQL TOP 子句转换为 LIMIT 而不是该数据库所需的 FETCH。
Has anyone run into this issue before?有没有人遇到过这个问题? If so does anyone have a workaround for this limitation?
如果是这样,是否有人对此限制有解决方法?
If you have control over the Db2 server (or can request changes on it) you can use the Db2 compatibility feature .如果您可以控制 Db2 服务器(或可以请求对其进行更改),则可以使用 Db2 兼容性功能。
Set the registry variable DB2_COMPATIBILITY_VECTOR
:设置注册表变量
DB2_COMPATIBILITY_VECTOR
:
db2set DB2_COMPATIBILITY_VECTOR=MYS
and restart the instance.并重新启动实例。 It will make Db2 recognize
LIMIT
and OFFSET
clauses.它将使 Db2 识别
LIMIT
和OFFSET
子句。 Setting just this bit should not affect other behaviour of the Db2 server.仅设置此位不应影响 Db2 服务器的其他行为。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.