Hi,
Using oracle 12.2 EE on linux.
If I type
sqlplus <user>/<pwd>
alter session set ISOLATION_LEVEL=SERIALIZABLE;
DECLARE
...
BEGIN
{ code block, selects, ifs, insert, updates}
END;
/
commit;
It works. If I put it in a bash file:
sqlplus -s <user>/<pwd> <<EOF
alter session set ISOLATION_LEVEL=SERIALIZABLE;
DECLARE
...
BEGIN
{ same code block}
END;
/
commit;
EOF
I get in output
Session altered.
DECLARE
*
ERROR at line 1:
ORA-08177: can't serialize access for this transaction
ORA-06512: at line 23
Commit complete.
Why does it work from sqlplus and not from bash? I need these statements to run in repeatable-read mode (so serializable in oracle).
Thanks.