We can receive this error in the case of many sorting or join operations in 12c databases.
The reason for the error is the memory limit that is set with the “pga_aggregate_limit” parameter that is new parameter in the 12c. By default, the value of this parameter is 2 times the PGA_AGGREGATE_TARGET parameter or 3 times the value of the PROCESSES parameter.
We can solve the error by setting the value of the parameter PGA_AGGREGATE_LIMIT to 0 (zero).
1 2 3 | SQL> alter system set pga_aggregate_limit=0 scope=both; System altered. |