Insufficient privilege for read only transaction
0
votes
1
answer
262
views
I am using Oracle and SQL Developer and here is a problem I ran into. I have created a table called T_TEST and I am trying to create a read only transaction to it from another user. This is my procedure:
CREATE PROCEDURE reader
AS
BEGIN
SET TRANSACTION READ ONLY;
SELECT SUM(value) FROM SYSTEM.T_TEST;
COMMIT;
END;
And this is the result that I get:
ORA-01031: insufficient privileges
The user itself has this privileges:
GRANT CONNECT TO admin1;
GRANT CREATE SESSION TO admin1;
GRANT SELECT ON T_TEST TO admin1;
Which is enough for this query to work:
SELECT SUM(value) FROM SYSTEM.T_TEST;
However, when I wrap it up in a transaction, as I showed, it fails. So what privileges am I lacking here?
Asked by Владислав Крутенко
(3 rep)
Oct 24, 2021, 04:24 PM
Last activity: May 27, 2025, 05:04 AM
Last activity: May 27, 2025, 05:04 AM