Skip to Main Content

APEX

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!

How to call and exit SQLcl from DOS command line as part of DOS script

PhilMan2Nov 10 2024

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.

This post has been answered by Davor Maric on Nov 11 2024
Jump to Answer
Comments
Post Details
Added on Nov 10 2024
2 comments
214 views