Link IBM i (AS/400) 到 SQL 服务器

Link IBM i (AS/400) to SQL Server

我尝试使用以下驱动程序将 AS/400 链接到 SQL 服务器:“IBM DB2 for i IBMDASQL OLE DB Provider”、“IBM DB2 for i IBMDA400 OLE DB Provider”和“IBM DB2 for i IBMDARLA OLE DB Provider”。连接测试成功,但是当我 运行 这个 SQL:

SELECT DISTINCT COLUMN_NAME FROM AS400.MyCatalog.SYSIBM.SQLCOLUMNS

SELECT * 
FROM OpenQuery(AS400, 'SELECT DISTINCT COLUMN_NAME FROM SYSIBM.SQLCOLUMNS');

我收到以下错误:

OLE DB provider "IBMDARLA" for linked server "AS400" returned message "CPF4326: Commitment definition *N not valid for open of SQLCOLUMNS.".

Msg 7306, Level 16, State 2, Line 1
Cannot open the table "Tmxloop.SYSIBM.SQLCOLUMNS" from OLE DB provider "IBMDARLA" for linked server "AS400".

Completion time: 2022-03-29T10:46:59.3399022-04:00

如何让至少一个连接接受我的 SQL 查询?

使用驱动程序

"IBM DB2 for i IBMDASQL OLE DB Provider"

在 Providers 下将驱动程序“IBMDASQL”更新为“Allow inprocess

现在 SQL 可以工作了

SELECT DISTINCT COLUMN_NAME FROM AS400.MyCatalog.SYSIBM.SQLCOLUMNS