Skip to content
Advertisement

Writing plsql exception errors to DMBS_OUTPUT and FND_FILE job log

I have a MERGE/UPDATE statement. I want to add exception handling such that if the update fails for any reason, write to DBMS_output and job log. I’ve come up with something – it compiles OK, but doesn’t seem to work.

I removed the MAX(date) and group by so that the program complies but the query itself is failing with ‘unable to get a stable set of rows’ – and yet no exception is being triggered.

Appreciate any recommendations.

Advertisement

Answer

I got this to work after moving the DBMS_OUTPUT commands above the FND_FILE commands. Initially I was not testing through concurrent. I think the FND_FILE commands running before the DBMS_OUTPUTwas causing the exception to not run DBMS_OUTPUT

Removing the aggregation allowed the program to still compile but also generate a run time error.

The FND_FILE commands only work through concurrent.

By the way for those not in the know, FORMAT_ERROR_STACK give something like ORA-30926: unable to get a stable set of rows in the source tables’ and FORMAT_ERROR_BACKTRACE gives ORA-06512: at “ORA-06512: at “APPS.procedureName”, line 21

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement