One way I have managed such scenarios as below is to keep a "repository" of files on the Rundeck server (it can be a Git repo etc) that I can selectively copy to a remote node and execute. So for the example below, you could copy sql fils(s) to a remote node, then use a remote command or script to execute the SQL, and optionally 'cat' the results if you want to be able to review the results of the operation (ddl/dml update) within the Rundeck logs themselves. I wouldn't necessarily suggest that you 'cat' a large sql result file.
If you want to be able to fail the rundeck job if the SQL does not run successfully, you could add some job steps after SQL execution to parse the sql log for "common" SQL execution errors (i.e. for Oracle, search for "ORA-", etc).
The best way to detect error, however, is if the program you are executing (i.e. sqlplus for Oracle) can return a non-zero status code, which will automatically fail the Rundeck job.
Many ways to skin this cat, and the flexibility is nice...
-Fred