PL/SQL (MOSC)

MOSC Banner

Handling exceptions when hitting a ORA-error (newbie)

edited Aug 24, 2011 1:46AM in PL/SQL (MOSC) 4 commentsAnswered
Hi!
I inherited this PL/SQL from a collegue who quit. Im really new to PLSQL.

The program loops through all indexes for the specific user and rebuilds them online. That works until we hit a ORA-01450.
How do I make the program ignore the message and just continue?

...
BEGIN
 v_rebuild_sql := 'alter index gis_owner.'||v_index_name||' REBUILD ONLINE PARALLEL 6 NOLOGGING';
  execute immediate v_rebuild_sql;
 insert into rebuild_status_report values (v_index_name,sysdate,'OK Rebuild online');
 v_noparallel_sql := 'alter index gis_owner.'||v_index_name||' PARALLEL (DEGREE DEFAULT) NOLOGGING';

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