在 IBM 数据服务器管理器中解释 DB2 失败

Explain for DB2 in IBM Data Server Manager fails

我正在使用 IBM 数据服务器管理器中的 SQL 编辑器对 DB2 执行查询。有问题的查询工作正常。但是,当我单击 "Explain" 生成访问计划时,我得到

"Access Plan Graph Cannot Be Generated"

诊断文本是

The SQL statement failed. Explanation: The SQL statement resulted in an error with SQLCODE: -204 and SQLSTATE: 42704. User response: The DB2 documentation contains more information about the SQLCODE and how to resolve the error. "DB2ADMIN.TABLENAME" is an undefined name.. SQLCODE=-204, SQLSTATE=42704, DRIVER=3.66.46

查询类似于

select col1, col2 from tablename where pred=value

为什么会失败?需要更改什么?

错误代码 -204 提示表名未知 ("undefined name")。似乎即使查询在不使用完全限定名称 (schemaname.tablename) 的情况下成功运行,IBM 数据服务器管理器中的解释功能也需要全名才能工作。

将查询更改为 "select col1, col2 from schemaname.tablename where pred=value" 导致解释成功,并且它显示了一个很好的访问计划图。