https://github.com/famousdraw

SQL0440N returned using table function ENV_GET_SYSTEM_RESOURCES

SQL0440N returned using table function ENV_GET_SYSTEM_RESOURCES

https://www.ibm.com/support/pages/sql0440n-returned-using-table-function-envgetsystemresources

Troubleshooting


Problem

It is possible to recieve error SQL0440n on a routine like "ENV_GET_SYSTEM_RESOURCES" when running a query similar to the following: Example: SELECT CPU_ONLINE, CPU_HMT_DEGREE, CPU_USER, CPU_SYSTEM, CPU_IOWAIT, CPU_IDLE, MEMORY_TOTAL, MEMORY_FREE, MEMORY_SWAP_TOTAL, MEMORY_SWAP_FREE, VIRTUAL_MEM_TOTAL, VIRTUAL_MEM_FREE                 FROM table(SYSPROC.ENV_GET_SYSTEM_RESOURCES());   DB2 Database Error: ERROR [42884] [IBM][DB2/AIX64] SQL0440N  No authorized routine named "ENV_GET_SYSTEM_RESOURCES" of type "FUNCTION" having compatible arguments was found.

Cause

The reason for this maybe because of a function missing from the database, due to it having been migrated or upgrade to V9.7 Fixpack 6 or later. The SQL0440n error is a good indication that the table function is missing.

Diagnosing The Problem

To verify in fact the table function is missing run:

db2 "select substr(funcschema,1,12)as funcs, substr(funcname,1,30) as name from syscat.functions where funcname='function name in question' order by 1,2";

Replace 'function name in question' with the function name that received the SQL0440N, in this case it would be ENV_GET_SYSTEM_RESOURCES so it would like this:


db2 "select substr(funcschema,1,12)as funcs, substr(funcname,1,30) as name from syscat.functions where funcname='ENV_GET_SYSTEM_RESOURCES' order by 1,2";

Resolving The Problem

If the query:

db2 "select substr(funcschema,1,12)as funcs, substr(funcname,1,30) as name from syscat.functions where funcname='ENV_GET_SYSTEM_RESOURCES' order by 1,2";

comes back with no records:

FUNCS NAME


------------ ------------------------------

0 record(s) selected.

Then you may need to run:

db2updv97 -d dbname

Where dbname is as at put the name of the database in question.
 

------------------------------------------------------------------------------------------
如果你觉得文章有用,欢迎打赏

 

 

 

posted on   红色MINI  阅读(57)  评论(0编辑  收藏  举报

相关博文:
阅读排行:
· 被坑几百块钱后,我竟然真的恢复了删除的微信聊天记录!
· 没有Manus邀请码?试试免邀请码的MGX或者开源的OpenManus吧
· 【自荐】一款简洁、开源的在线白板工具 Drawnix
· 园子的第一款AI主题卫衣上架——"HELLO! HOW CAN I ASSIST YOU TODAY
· Docker 太简单,K8s 太复杂?w7panel 让容器管理更轻松!

导航

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

统计

点击右上角即可分享
微信分享提示