Skip to Main Content

Oracle Database Discussions

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!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Run select query result as a cron job ? Force commit distributed transactions !

User_A5EG3Sep 5 2022

I would like to schedule a cron job to execute the result of select query output, schedule this "force commit" every day before my export job kicks in.
Precisely the below SQL Query & its outcome to be automated

select 'commit force '''||local_tran_id||''';' 
from DBA_2PC_PENDING where state='prepared';                    

'COMMITFORCE'''||LOCAL_TRAN_ID||''';'
--------------------------------------
commit force '5.20.61510';
commit force '15.4.1124117';


SQL> commit force '5.20.61510';
commit force '15.4.1124117';
Commit complete.
Comments
Post Details
Added on Sep 5 2022
1 comment
354 views