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.