Oracle Solution for Error ora-30009

Solution for Oracle Error ORA-30009

ORA-30009: Not enough memory for CONNECT BY operation

What triggered the Error:

The memory size was not sufficient to process all the levels of the hierarchy specified by the CONNECT BY clause.

What should we do to fix it:

In WORKAREA_SIZE_POLICY=AUTO mode, set PGA_AGGREGATE_TARGET to a reasonably larger value. Or, in WORKAREA_SIZE_POLICY=MANUAL mode, set SORT_AREA_SIZE to a reasonably larger value.