cancel
Showing results for 
Search instead for 
Did you mean: 

Insufficient privilege .hdbprocedure file

former_member226419
Contributor
0 Kudos

Hi,

I am scheduling stored procedure using .xsjob but when I am trying to create .hdbprocedure file and giving below code , its says ' could not create catalog object Insufficient privilege'.

code in .hdbprocedure

PROCEDURE "BEST"."sumeet10::update_store_master" ( )

  LANGUAGE SQLSCRIPT

  SQL SECURITY INVOKER

  --DEFAULT SCHEMA <default_schema_name>

  --READS SQL DATA AS

  as

BEGIN

update "BEST"."store_transaction"

set "Amount" = "Amount"+("Amount")*0.1

where "Particulars" = 'TV';

END;

Same update statement when I am trying to run in SQL console, it is successful.

Br

Sumeet

Accepted Solutions (1)

Accepted Solutions (1)

lbreddemann
Active Contributor
0 Kudos

As you schedule the execution of this procedure via xsjob and the security model is "INVOKER" you have to ensure that the user account that executes the procedure in the end does have the required privileges.

Please check which user executes the job in the XS Administration Took,

former_member226419
Contributor
0 Kudos

Hi Lars,

I am using the SYSTEM id to assign roles and below are the roles I have already assigned to it but still its showing error.

What else I need to do?

Br

Sumeet

former_member226419
Contributor
0 Kudos

Done.

GRANT INSERT ON SCHEMA <schema> TO _SYS_REPO WITH GRANT OPTION.


Br

Sumeet

lbreddemann
Active Contributor
0 Kudos

I don't see why you would want _SYS_REPO to perform any inserts into tables in your application schema...

Did you check which user runs the job that you scheduled?

former_member226419
Contributor
0 Kudos

Hi Lars,

I am using 'SYSTEM' ID to insert records and this ID only execute this job. Everything is done successfully . And job status shoing 'ACTIVE'. But i cannot see records inserted into the same.

And the job is showing in 'SCHEDULED' state.

Am I missing something?

Br

Sumeet

Answers (0)