Monday, August 29, 2016

SAP Hana procedure, Could not create catalog object: insufficient privilege on creating a Stored Procedure

"insufficient privilege" is a common error while struggling with SAP Hana.
Easiest way is to configure a trace for your user.

This I was creating a stored procedure and got this error.

[42227]{251259}[51/87698283] 2016-08-29 16:15:48.131475 i Authorization SQLFacade.cpp(01415) : UserId(141949) is not authorized to do SELECT on ObjectId(2,0,oid=11254798)
[42227]{251259}[51/87698283] 2016-08-29 16:15:48.131572 i Authorization SQLFacade.cpp(01961) :



Select * from objects where object_oid = '11254798';
Select * from users where user_id = 141949;

User was SYS_REPO and object was table type i use in procedure output DAILY_REPLICATION.

PROCEDURE "MYUSER"."RFX_Business_Scenario::chk_lastweek_withno_data" ( out OUTPUT_TABLE "MYUSER"."DAILY_REPLICATION" )


I gave select to _SYS_REPO on myschema and created my procedure successfully.

GRANT SELECT ON SCHEMA MYSCHEMA TO _SYS_REPO WITH GRANT OPTION;


In logs u can see user trying to do these jobs is SYS_REPO.

User _SYS_REPO tried to execute 'CREATE PROCEDURE

No comments:

Post a Comment