PL/SQL (MOSC)

MOSC Banner

Migrated to OCI Autonomous Database 19c. Error when accessing data dic tables from Proc

in PL/SQL (MOSC) 9 commentsAnswered

We have migrated to OCI Autonomous Database 19c.

The following SQL work outside SP run by user USR:

select 'ALTER INDEX '||INDEX_NAME||' REBUILD;' stm from sys.dba_indexes d 

    where d.owner='USR' and status <> 'VALID'  

    and status <> 'N/A' ;


When in a pros the same statement gives an error when compiled by the same user USR:

PL/SQL: ORA-00942: table or view does not exist


CREATE OR REPLACE procedure tt.FixingInd

as

   CURSOR c1 IS

    select 'ALTER INDEX '||INDEX_NAME||' REBUILD;' stm from sys.dba_indexes d 

    where d.owner='USR' and status <> 'VALID'  

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center