-567 Rebind Authorization error for Auth ID IBM Db2 native stored procedure

429 views Asked by At

A user is unable to create a native stored procedure via IBM data studio and faces -567 rebind authorization error for a particular auth id say DBAXXYY.The schema name is also same as the authid

But I am able to create the stored procedure successfully without any issues using the same authid.

Could any of you kindly help in determining what privilege does the other user lack and what privilege I have different to him? Also, provide the syntax for any grant privilege that will be needed to create the stored procedure from his end using the same authid DBAXXYY.

I tried providing GRANT BINDADD TO DBAXXYY to that authid but still it didn't work.

Error : Create stored procedure returns SQLCODE: -567, SQLSTATE:42591. DBAXXYY.SP_SAMP: 0: REBIND AUTHORIZATION ERROR USING DBAXXYY AUTHORITY PACKAGE =
LOCATION.DBAXXYY.SP_SAMP.(V1) PRIVILEGE = CREATE IN. SQLCODE=-567, SQLSTATE=42501, DRIVER=4.18.60 DBAXXYY.SP_SAMP - Deploy failed. DBAXXYY.SP_SAMP - Roll back completed successfully.

2

There are 2 answers

2
mao On

The exception states that the user account lacks the CREATEIN privilege on the target schema. There may be other missing privileges, but you will be able to resolve these either by carefully studing the details of each exception, or by comparing your priviliges with those of the other user. Do that by querying the relvant catalog tables.

For the immediate problem, try: GRANT CREATEIN ON SCHEMA ... TO ... (where the first name is the schema name , and the second name is the other user name).

If , on the other hand, your security configuration uses ROLES then you need to grant that privilege to a role which the other user has.

Documentation link, adjust for your version of Db2 and platform.

0
Sudarsan Rajagopalan On

At last I was able to provide the required privilege to the user and he is now able to create the native stored procedure.

I gave the following grant on the collection DBAXXYY to the auth id DBAXXYY and this solved the problem.

GRANT CREATE IN COLLECTION DBAXXYY TO DBAXXYY; COMMIT;