Friday, October 25, 2013

sysibmadm.dbmcfg gives error sql0444n reason code 4

whilst developping a script to collect database manager and database configuration values from all our servers, we ran into an issue on 2 of our servers recently migrated to DB2 9.7 fp8.

when we accessed sysibmadm.dbmcfg we received error:
SQL0444N  Routine "*_GET_CFG" (specific name "DBM_GET_CFG") is implemented
with code in library or path ".../sqllib/bin/routine/db2dbroutext", function
"*m_get_cfg" which cannot be accessed.  Reason code: "4".  SQLSTATE=42724

if we accessed sysibmadm.dbcfg , this administrative view worked fine,

when we compared the two views / routines behind ...

db2 "select routinename,FENCED from syscat.routines where ROUTINENAME like '%GET_CFG'"

ROUTINENAME                                                                                                                      FENCED
-------------------------------------------------------------------------------------------------------------------------------- ------
DBM_GET_CFG                                                                                                                      Y
DB_GET_CFG                                                                                                                       N

  2 record(s) selected.

we noticed that the DBMCFG routing is fenced and the DBCFG one is not fenced.

after some time we investigated the path to the library ( as you can find in the doc for reason code 4 )
and we noticed the real path( not symlink in sqllib ) was accessible to the instance owner, but not to the fenced user.

i.e <db2 instance owner home folder>/sqllib/bin/routine/db2dbroutext = OK
    <db2_install_path>/bin =NOK

granting rights for the groups and for all users to the path containing the db2 binaries,
chmod 775 db2_install_path

after this the fenced user could access the library path containing the routine definition,
and we could use sysibmadm.dbmcfg 

No comments:

Post a Comment