PL/SQL (MOSC)

MOSC Banner

pl/sql tablespace deletion in loop

edited Apr 17, 2018 1:00PM in PL/SQL (MOSC) 12 commentsAnswered ✓

I write the below procedure for delete all customer tablespace and schema from db.. in loop.. if customer or tablespace not found it should continue executng procedure and it will display ora error why it was not able to delete either error or object not found, whatever..

but in my below code directly exist after first error.. it will not continue..

create or replace procedure pro1 as

CURSOR C1 IS SELECT EC_SERVER_SECURITY_CODE,CUSTOMER_NAME FROM REGISTRY.CUSTOMER_INFO WHERE EC_SERVER_SECURITY_CODE NOT IN ('sdafs');

SECURITY_CODE VARCHAR2(30);

SQMT VARCHAR2(1000);

BEGIN

FOR V1 IN C1

LOOP

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