Fix ORA-38814: ALTER SESSION SET EDITION must be first statement of transaction

advertisements

_____________________________________________________________________________________________________________________

The Eucharistic Miracles of the World

Error Description:
“alter session set edition” command fails with following error message.
ERROR:
ORA-38814: ALTER SESSION SET EDITION must be first statement of transaction
Solution Description:
There should not be any open transaction before the alter session set edition command. Either you should commit or rollback the open transactions before submitting the alter session set edition command.
 
See an example below.
In below example the procedure add_det procedure will insert the row in the table and which will not the commit the transaction. So, one transaction is open in that session. The immediate alter session set editioncommand will fail with ORA-38814 error. You have to either commit or rollback the transaction to proceed with the alter session command.
 
SQL> alter session set edition=release1;
 
Session altered.
 
SQL> exec add_det('Rins','+18787878787');
 
PL/SQL procedure successfully completed.
 
 
SQL> alter session set edition=ora$base;
ERROR:
ORA-38814: ALTER SESSION SET EDITION must be first statement of transaction
 
 
SQL> commit;
 
Commit complete.
 
SQL> alter session set edition=ora$base;
 
Session altered.

_____________________________________________________________________________________________________________________

Website Stats

0 comments:

Post a Comment

Labels

Oracle (629) Script (86) General (77) Unix (47) Blog (23) Technology (19) gadget (6) games (6) Business (3) OCI (3) SQL* Loader (3) Datapump (2)
 

acehints.com Copyright 2011-23 All Rights Reserved | Site Map | Contact | Disclaimer