sqlplus statement from command line

Just be aware that on Unix/Linux your username/password can be seen by anyone that can run “ps -ef” command if you place it directly on the command line . Could be a big security issue (or turn into a big security issue). I usually recommend creating a file or using here document so you can … Read more

Sql*plus always returns exit code 0?

You have to explicitly tell sqlplus to do that, in your script. Basically, there are two statements that you can use: WHENEVER SQLERROR EXIT SQL.SQLCODE WHENEVER OSERROR EXIT For example: WHENEVER SQLERROR EXIT SQL.SQLCODE begin SELECT COLUMN_DOES_NOT_EXIST FROM DUAL; END; / And for OS errors: WHENEVER OSERROR EXIT FAILURE START no_such_file For more information, see … Read more