DB2 CLI Describe error issued if the DB2 BIND or GRANT commands have notbeen performed


The following error message may be issued when attempting to access DB2 using SAS/ACCESS if the appropriate DB2 DBA binding and granting have not been performed.

ERROR: CLI describe error: [IBM][CLI Driver][DB2/6000] SQL0551N "user" does not have the privilege to perform operation "EXECUTE" on object "NULLID.SYSSH100". SQLSTATE=42501

This error may be issued when the DB2 binds have not been executed for this particular version of the client. You may receive this NULLID error after you upgrade a client but then neglect to issue the binds for a CLI application (SAS is a CLI application) for that new version. The DB2 Commmand Line Processor (CLP) is not a CLI program, and so you would not see the error there.

This error may also be surfaced if the default authorization, being used inside the CLP, is different from the one inside SAS. This is unlikely, but something you should. Try to connect explicitly in both the CLP and inside SAS:

CLP : connect to db2csa user myuser using mypwd
SAS : proc sql; connect to db2 (database=db2csa user=myuser using=mypwd);

then issue a "select count(*) from table". This will ensure that both applications are using the same authorization.

In order to bind the CLI to the database, your DBA must issue (or have already issued) the following commands from the client’s bnd directory:

db2 connect to <database> user <userid> using <password>
db2 bind @db2ubind.lst blocking all grant public
db2 bind @db2cli.lst blocking all grant public

This needs to be done for each database that is accessed from SAS since SAS uses the DB2 CLI interface, and needs to be done for any CLI application to access DB2 databases.

The userid must have grant and bind privileges. Refer to the IBM DB2 documentation for more details.

SAS 8.2 used CLI 2.x calls, whereas SAS 9 uses CLI 5.x calls. Perhaps IBM stores those in different packages, which may cause a difference in behavior.