SQL*Plus User's Guide and Reference Release 8.1.5 A66736-01 |
|
Command Reference, 51 of 52
Exits SQL*Plus if an operating system error occurs (such as a file I/O error).
WHENEVER OSERROR {EXIT [SUCCESS|FAILURE|n|variable|:BindVariable][COMMIT|ROLLBACK] |CONTINUE [COMMIT|ROLLBACK|NONE]}
Refer to the following list for a description of each term or clause:
EXIT [
SUCCESS|FAILURE|
n
|
variable
|
:BindVariable
]
Directs SQL*Plus to exit as soon as an operating system error is detected. You can also specify that SQL*Plus return a success or failure code, the operating system failure code, or a number or variable of your choice. See EXIT in this chapter for details.
CONTINUE
COMMIT
ROLLBACK
NONE
If you do not enter the WHENEVER OSERROR command, the default behavior of SQL*Plus is to continue and take no action when an operating system error occurs.
If you do not enter the WHENEVER SQLERROR command, the default behavior of SQL*Plus is to continue and take no action when a SQL error occurs.
The commands in the following command file cause SQL*Plus to exit and COMMIT any pending changes if a failure occurs when writing to the output file:
SQL> WHENEVER OSERROR EXIT SQL> START no_such_file OS Message: No such file or directory Disconnected from Oracle8......
|
Copyright © 1999 Oracle Corporation. All Rights Reserved. |
|