I use SQLcl 23.x to run .sql scripts and commands via JS script.
I see intermittent errors java.sql.SQLRecoverableException: Closed Connection
, unrelated to what script or command I am running. This is most likely due to firewall/network instabilities, but is there a setting, like timeout, which can make this less frequent? or an easy way to recover and re-run the last command?
My JS code is something like this:
sqlcl.setStmt("<command or script>");
sqlcl.run();
if (ctx.getProperty("sqldev.error")) {
throw new Error(ctx.getProperty("sqldev.last.err.message"));
}
Best regards,
Plamen