Oracle 12c – Suppress Successful Insert Statements or Review Errors on Large Inserts

oracleoracle-12c

I have ~130 SQL scripts that INSERT about ~750,000 records into an Oracle 12c database.

I have a master SQL that kicks all this off using this template:

set termout off
set echo off;

delete from table1;
@C:\Scripts\table1_DATA_TABLE.sql 
set termout on;
REM ---
REM completed table1_DATA_TABLE.sql
REM ---
set echo off;
set termout off;
commit;

<repeat for every script>

The issue is, I'm getting thousands of 1 row inserted. and it's drowning out errors. Is there a way I can suppress the successful INSERT notifications and only leave the errors? Or, is there a way I can retrieve all the errors of a session/script ?

Best Answer

SET FEEDBACK OFF suppresses the insert notifications.

See the documentation.

You can also use SET ERRORLOGGING to log errors to a table of your choice. Again, see the documentation.