REBUILD ONLINE ORA-01031 problem
Hi,
When i run a stored proc containing a line:
PROC1 Code Snippet
-------------------
EXECUTE IMMEDIATE 'ALTER INDEX ' || w_index_names(w_index_cnt) || ' REBUILD';
and then execute it, the stored proc runs successfully.
However, when i use REBUILD ONLINE instead, it gives ORA-01031 "Insufficient privileges" error!!!
PROC 2 Code Snippet
---------------------
EXECUTE IMMEDIATE 'ALTER INDEX ' || w_index_names(w_index_cnt) || ' REBUILD ONLINE';
The user has connect and resource along with create/alter/drop any index system privs. The current login id owns both proc1 and proc2
Which privileges can be granted to avoid this error.
Proc2 runs successfully when i store and run it from a schema having sysdba privs.