cancel
Showing results for 
Search instead for 
Did you mean: 

[SQL SECURITY <MODE>]

Former Member
0 Kudos

I have couple of questions regarding this [SQL SECURITY<MODE>].

1. Why it is defined.

2.while practicing the same i am not able to write it into the Imperative SQLScript logic programs.
why?

Please suggest.

Regards

Navneet

Accepted Solutions (1)

Accepted Solutions (1)

former_member182114
Active Contributor
0 Kudos

Hi Navneet,

When running the procedure the authorization can be checked by who calls (INVOKER) the procedure or an internal user that activated the objects (DEFINER) which is _SYS_REPO user.

Take a look on help:

CREATE PROCEDURE - SQL Reference - SAP Library

Regards, Fernando Da Rós

Former Member
0 Kudos

Hi Fernando

Thanks for your valuable response.

I still not get the answer of the second one i.e

why it is showing error when i write this syntax in the Imperative SQLScript Logic??
 

former_member182114
Active Contributor
0 Kudos

Hi Navneet,

In order to help you in a better way, please post your code (what you tries to compile) and the error code you are receiving.

Regards, Fernando Da Rós

Former Member
0 Kudos

Hi Fernando

Here is the code sample code i was trying to execute.
If i am removing the comment line from the SQL Security line then it is showing syntax error.

Please suggest.

former_member182114
Active Contributor
0 Kudos

Hi Navneet,

Change your header, add the default schema AFTER sql security definer.


CREATE PROCEDURE CURSOR_PROC

LANGUAGE SQLSCRIPT

SQL SECURITY DEFINER

DEFAULT SCHEMA "NAVENEET"

--READS SQL DATA

AS BEGIN

and it will work.

Regards, Fernando Da Rós

Former Member
0 Kudos

Hi Fernando


It worked.

I didn't know that in this context order can also be a issue.


Thank you for the support.



regards


Navneet





former_member182114
Active Contributor
0 Kudos

Hi Navneet, same for me... Just tested and found the trick

Answers (0)