I created a procedure that creates a cursor with index_name and owner from dba_indexes. When I run it as an anonymous block as the dba it works fine. Then I made the anonymous block into a procedure under the dba schema and it is saying that "sys.dba_indexes" is not declared. I think this is because it is saying that the procedure does not have rights to the data dictionary.

I found in the oracle documentation this:
Stored objects (packages, procedures, functions, triggers, views) run in the security domain of the object owner with no roles enabled except PUBLIC. Again, you will be notified only that the item was not declared.

The dba user has the dba role granted to them. I tried granting the select_catalog_role to public and to the dba as a privilege instead of a role to see if my procedure would work but it didn't. Any ideas of how to give my procedure the rights it needs to query the dba_indexes?