How to make the GRANT?s in the corresponding plan for the userid?

Document ID : KB000015506
Last Modified Date : 14/02/2018
Show Technical Document Details
Question:

When you encounter SQL -551 error message for a product plan

DSNT408I SQLCODE = -551, ERROR: USERID DOES NOT HAVE THE PRIVILEGE TO PERFORM Product Planxxx

.DSNT418I SQLSTATE = 42501 SQLSTATE RETURN CODE

.DSNT415I SQLERRP = DSNXEAAL SQL PROCEDURE DETECTING ERROR

How to make the GRANT’s in the equivalent plan for the userid? 

Answer:

The SQLCODE -551 error is telling you that DB2 does not have the correct GRANT's to execute the plan for authid USERID.

In the CA Database Management for DB2 for z/os  main menu you have this menu item.

General Facilities

_A Product Authorization

 

Look for example for Report Facility Menu after you select it and use the "E" line command.

E__ Report Facility Menu

 

afterwards the screen expand as follows:

___ Report Facility Menu

D__ PRF Product Plan

D__ QMF to PRF Conversio

 

Use "D" on the two above to see the grant.

GRANT EXECUTE ON PLAN PRFRRxxx

GRANT EXECUTE ON PLAN PRFQRxxx

where xxx represent the used product release.

 

Grant execute for the authid USER1 to the two PRF plans you have in your hlq.CDBAPARM(PLANS00)

PRFPLN01=PRFRRxxx PRF Product Plan

PRFPLN02=PRFQRxxx QMF to PRF Conversion Plan

 

GRANT EXECUTE ON PLAN yourRRxxx plan TO USER1 GRANT EXECUTE ON PLAN yourQR171plan TO USER1

Package PRFWSTR is part of collection PRFRRxxx_COM bound into PLAN PRFRRxxx.