Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

running a store procedure PL/SQL: ORA-01031:

francy77Feb 1 2021

Hi all,
I'm trying to select records from a table, using a store procedure, but I get:
Errore(13,10): PL/SQL: ORA-01031: privilegi insufficienti
at Line 13 there is :
select k_id into id from schema1.t_table_var where k_id=12;

In schema1 i granted
grant insert,update, delete on t_table_var to ico

and if I try to run the query directly (non in a pl/sql procedure) I can get the results; Besides if i try to make a select to another table but in the schema schema1) I can get the result....... I'm getting crazy;

So what I have to do in order to use a table inside a different schema, in a pl/sql procedure?

This post has been answered by Frank Kulash on Feb 1 2021
Jump to Answer

Comments

Christopher Jones-Oracle

cur.execute() will execute one SQL or PL/SQL call by sending it to the DB for execution.


Your code appears to be

1) passing in two statements. You need to pass each statement separately.  The BEGIN/END block counts as one statement.

2) passing a SQL*Plus SET command.  This is neither a SQL or PL/SQL statement so the DB won't understand it.

1 - 1

Post Details

Added on Feb 1 2021
3 comments
268 views