The INF_STOP_ON_ERROR option specifies the behavior of Oracle OLAP when an error occurs during the execution of an INFILE statement.
When an error occurs, report the error and stop reading from the file.
When an error occurs, report the error and continue reading from the file.
Example 5-37 Using INF_STOP_ON_ERROR with DBMS_EXECUTE
Assume that you have an file named attachmyaw.inf
that includes the following OLAP DML statement that detaches an analytic workspace named myaw
AW DETACH myaw
Assume that the myaw
workspace is not attached when a SQL application issues the DBMS_AW.EXECUTE
statement with an OLAP DML INFILE statement to read the attachmyaw.infinfile
file.
When the INF_STOP_ON_ERR option is set to NO
then the error Analytic workspace MYAW is not attached
is reported, Oracle OLAP continues to read the file, and the DBMS_AW.EXECUTE
procedure completes successfully.
DBMS_AW.EXECUTE('INF_STOP_ON_ERR = NO '); DBMS_AW.EXECUTE('INFILE attachmyaw.inf'); The current directory is MYDIR. ERROR: (ORA-34344) Analytic workspace MYAW is not attached. ERROR: (ORA-34344) Analytic workspace MYAW is not attached. PL/SQL procedure successfully completed.
When the INF_STOP_ON_ERR option is set to YES
then the error Analytic workspace MYAW is not attached
is reported, Oracle OLAP stops reading the file, and the DBMS_AW.EXECUTE
procedure aborts.
DBMS_AW.EXECUTE('INF_STOP_ON_ERR = YES '); DBMS_AW.EXECUTE('INFILE attachmyaw.inf'); The current directory is MYSPL. DECLARE * ERROR at line 1: ORA-35166: (ORA-34344) Analytic workspace MYAW is not attached. ORA-06512: at "SYS.DBMS_AW", line 27 ORA-06512: at "SYS.DBMS_AW", line 115 ORA-06512: at line 8