PL/SQL (MOSC)

MOSC Banner

How to continue Loop processing upon an Exception?

edited Jun 23, 2009 9:25AM in PL/SQL (MOSC) 3 commentsAnswered ✓
  The following procedure is piece together to set grants on objects.

What changes are needed to the EXCEPTION handling to continue upon the received NOOBJECT error?

Is it possible to continue processing the LOOP?

 

CREATE OR REPLACE PROCEDURE JOBDB.GRANTJOBDB_ADMIN2 IS

NOOBJECT EXCEPTION;

PRAGMA EXCEPTION_INIT(NOOBJECT, -01720);

cursor csrObjects is

        select object_name

        from user_objects

        where object_type IN ('TABLE', 'VIEW')

            and status <> 'INVALID'

            and (UPPER(object_name) not like '%BIN$%'

            AND UPPER(object_name) not like 'EUL_ODBC_%'

            AND UPPER(object_name) not in ('VTEMP', 'EXTENT_MAP', 'LOG_VIEW', 'V_IW_PRODUCT_DATA'));

        cursor_rec csrObjects%

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