The following error message can be issued when attempting to register a DB2 table in SAS Management Console and the user does not have the proper DB2 SELECT permissions.
ERROR: CLI error trying to establish connection: [IBM][CLI Driver] SQL30082N Security processing failed with reason "24" ("USERNAME AND/OR PASSWORD INVALID"). SQLSTATE=08001
ERROR: Error in the LIBNAME statement.
Testing outside of SAS using the DB2 Command Line Processor issues this error:
ERROR: CLI describe error: IBM CLI Driver DB@ SQL0551N Z521 does not have privilege to perform operation SELECT on object
The problem is that the query being sent to the database requires SELECT permissions. The user/SAS Administrator who is registering the DB2 tables does NOT have DB2 SELECT permissions on that table or tables, which generates these errors both inside and outside of SAS.
SAS does not import the SAS metadata from the DB2 catalog tables (SYSIBM.SYSTABLES and others). Instead it queries the actual table, similar to this code:
To resolve the error, the user registering DB2 tables to the metadata server MUST have SELECT permissions for the table.