Oracle Error ORA-29470: Effective userid or roles are not the same as when cursor was parsed

Oracle Error Message

ORA-29470: Effective userid or roles are not the same as when cursor was parsed

Reason for the Error

The effective userid or roles on this call to DBMS_SQL are not the same as those at the time the cursor was parsed.

Solution

Make sure the effective userid and roles are the same as when cursor was pared.