cancel
Showing results for 
Search instead for 
Did you mean: 

Problem activating HANA SP5 Decision Table

Former Member
0 Kudos

I am getting following error while activating a decision table on HANA SP5. I am logged in as user SYSTEM to HANA, who has CREATE ANY on _SYS_BIC. Not sure what privilege is missing? Any help will be appreciated.

Repository: Encountered an error in repository runtime extension;error preparing statement CREATE PROCEDURE "_SYS_BIC"."pricing/PROMO_PRICING" LANGUAGE SQLSCRIPT ASnBEGINntemp = SELECT "GUEST_SEGMENT","OFFER_DISCOUNT","GUEST_ID", CASE WHEN "GUEST_SEGMENT" = 'G' THEN 1nWHEN "GUEST_SEGMENT" = 'S' THEN 2nWHEN "GUEST_SEGMENT" = 'B' THEN 3nnELSE "OFFER_ID"nENDn AS "calc_OFFER_ID" ,"OFFER_ID" FROM "_SYS_BIC"."pricing/PROMO_PRICING/CV";UPDATE "PRICING"."PROMOTIONAL_OFFER"  as t SET "OFFER_ID" = (SELECT DISTINCT "calc_OFFER_ID" FROM :temp WHERE ( :temp."OFFER_DISCOUNT" is NULL OR :temp."OFFER_DISCOUNT" = t."OFFER_DISCOUNT") and ( :temp."OFFER_ID" is NULL OR :temp."OFFER_ID" = t."OFFER_ID") ); nnnEND;n for oid {tenant: , package: pricing, name: PROMO_PRICING, suffix: hdbruldec}: insufficient privilege: Not authorized at ptime/query/checker/query_check.cc:1966

Accepted Solutions (0)

Answers (3)

Answers (3)

italo_naia
Participant
0 Kudos

Hi All,

  I get the same, anyone solve this?

 

  _SYS_REPO already have Grant for my Schema.

Thank you.

0 Kudos

Hi,

Does _SYS_REPO has all Select, Execute and Update Permissions for your schema ?

Regards,

Abhinav Kumar

Former Member
0 Kudos

Hi,

I am also getting an error..

Repository: Encountered an error in repository runtime extension;error preparing statement CREATE PROCEDURE "_SYS_BIC"."user01/DE_TEST" LANGUAGE SQLSCRIPT ASnBEGINnUPDATE "EFASHION_TUTORIAL"."SHOP_FACTS" SET "MARGIN"=n(CASE WHEN "ARTICLE_ID" = 155939 THEN MARGIN*2nnELSE "MARGIN"nENDn);nnnnEND;n for oid {tenant: , package: user01, name: DE_TEST, suffix: hdbruldec}: insufficient privilege: Not authorized at ptime/query/checker/query_check.cc:1966

I have all the privileges but still not able create a decision table.

Please help.

Regards

Ashutosh

Former Member
0 Kudos

HI,

I got the same error as mentioned above. i have done following things to remove it:-

Grant select on schema "ABC" to _SYS_REPO with grant option

Grant execute on schema "ABC" to _SYS_REPO with grant option

This solved the issue for me...

Thnkss

Kulwinder

Former Member
0 Kudos

Hi Kulwinder,

I have tried this also but again the same error.

Thanks

Ashutosh

Former Member
0 Kudos

Hi Ashutosh,

Give UPDATE privilege as well, it will work. because in decision tables we have two types.

1) Which update values

2) Which returns values.

By default _SYS_REPO will have 'SELECT' privilege on your schema.

in 1 case you need EXECUTE and UPDATE privileges

in 2 case only EXECUTE privilege will be enough.

Regards,

Venkat

Former Member
0 Kudos

Hi Venkat,

Thanks a lot it works .

Regards

Ashutosh

raghavendra_k1
Explorer
0 Kudos

hii venkat I am also getting the same problem

can i  have the UPDATE previlage  syntax? pls

Former Member
0 Kudos

Hi Raghavendra

You can use following SQL commands to grant required privileges to _SYS_REPO for the activation of Decision Table:

grant select on schema “ABC” to _SYS_REPO with grant option;

grant update on schema “ABC” to _SYS_REPO with grant option;

grant execute on schema “ABC” to _SYS_REPO with grant option;

Regards

Anees


former_member246281
Discoverer
0 Kudos

Thanks Anees,

It work now !!!

Cheers,
Saleem

Former Member
0 Kudos

You are welcome Saleem

Former Member
0 Kudos

You can run in one line GRANT SELECT,UPDATE ON SCHEMA SCHEMA_ABC TO _SYS_REPO WITH GRANT OPTION .

And no need to add EXECUTION on this case.

Former Member
0 Kudos

Hi, Were you able to work around this issue ?

Thanks,

Sameer

0 Kudos

Hi Shashi,

It seems to be an authorization problem. Please grant the relevant permissions to the Schema which contains the physical tables which forms Decision Table Data Foundation.

The broad steps to grant the permissions is as follows:

1) Under HANA system, select Security --> Users

2) Select User _SYS_REPO

3) Select SQL Privileges Tab

4) Add the Schema(s) which form the Decision Table Data Foundation (Schema(s) which contains physical tables on which Decision Table is modeled)

5) Grant the required Select, Execute and Update Permissions.

This should solve the problem. In case you face any difficulty, please reply back.

Regards,

Abhinav Kumar