I'm using Oracle 21C and APEX 24.1 I'm converting a DOS backup script from oracle.apex.APEXExport to SQL.EXE (SQLcl). I would like to call SQLcl for a single-use so that it will return to the DOS script after the single function is executed. In DOS, I used to use:
:; Export application 104 - The Library App.
java oracle.apex.APEXExport -db localhost:1521/xepdb1 -user %APEX_user% -password %db_password% -applicationid 104
:; Prepend the exported file with %FileCore%
REN f104.sql %App104%
However, APEXExport is depreciated, so it seems I have to use SQLcl. I understand how to log in to SQLcl. I use:
C:\app\product\sqlcl\bin\sql jdbc:oracle:thin:SYSTEM/my_password@localhost/XEPDB1
Also, to backup a single application I use:
apex export -Applicationid 104
My question is how can I login in to SQLcl, execute the export function, and then exit SQLcl so that control is returned to DOS? Thanks for looking at this.