Quantcast
Channel: SCN : Discussion List - SAP HANA Developer Center
Viewing all articles
Browse latest Browse all 6412

Not authorized error using sequence in procedure

$
0
0

Hi folks,

 

When I run this SQL via SQL editor it works fine;

 

INSERT INTO "MySchema"."CATEGORY" (CategoryID, Category) VALUES ("MySchema"."SEQ_CATEGORY".NEXTVAL, 'TEST5');

 

When I place this into a hdbprocedure and debug I get 'insufficient privilege not authorized'.

 

PROCEDURE "MySchema"."myPath::test" ( )

  LANGUAGE SQLSCRIPT

  SQL SECURITY DEFINER AS          

BEGIN

INSERT INTO "MySchema"."CATEGORY" (CategoryID, Category) VALUES ("MySchema"."SEQ_CATEGORY".NEXTVAL, 'TEST5');

END;

 

I have full access to this schema and if I change the insert so that it does not use sequence it inserts fine into this schema.  But when I add the sequence I get authorization error.  Do I need to give additional access to some other system user in order to do this?

 

Thanks,

-Patrick


Viewing all articles
Browse latest Browse all 6412

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>