Error: "ORA-01031: insufficient privileges" when attempting to run explain plan on a sql statemen
说明
Error is received when attempting to create an explain plan in Spotlight:
"ORA-01031: insufficient privileges"
原因
Most often, insufficient privileges is the root cause of the problem.
解决办法
To successfully create an explain plan, the Spotlight user should have sufficient privileges:
1. Grant the Spotlight user the 'select any table' privilege. NOTE: The DBA role, which contains the 'select any table' privilege, will not resolve this.
2. The user should also have sufficient privileges on the underlying objects, if the underlying objects are sys objects, user will not be able to create an explain plan on those objects as they are recursive and cannot be explained.
3. Also, if the sql you are trying to explain has a 'DELETE' or 'UPDATE', then the Spotlight user needs the 'Delete any table' or 'Update any table' privilege.