I tried to execute the sys package below to improve my query. I submitted as the creator of task TEST02. The error makes you think its simply a privilege issue..but as sys I grant
grant execute on sys.dbms_sqltune to XXXXXX. Still complains same thing.
SQL> execute sys.dbms_sqltune.accept_sql_profile(task_name => 'TEST02_TASK',replace => TRUE);
BEGIN sys.dbms_sqltune.accept_sql_profile(task_name => 'TEST02_TASK',replace => TRUE);
*
ERROR at line 1:
ORA-24265: Insufficient privileges for SQL profile operation
ORA-06512: at "SYS.DBMS_SYS_ERROR", line 79
ORA-06512: at "SYS.DBMS_SQLTUNE", line 5659
ORA-06512: at "SYS.DBMS_SQLTUNE", line 5535
ORA-06512: at "SYS.DBMS_SQLTUNE", line 5564
ORA-06512: at line 1

ORA-24265: Insufficient privileges for SQL profile operation
Cause: A DDL operation was attempted on a SQL profile by a session without the proper privileges.
Action: Grant the user the appropriate privilege.

anyone seen this?
Thanks