declare
cursor curs is
select 'alter table "' || owner || '"."' || table_name ||
'" disable constraint "' || constraint_name || '"' text
from sys.all_constraints
where owner = 'CLAS'
and constraint_type = 'R'
and owner = r_owner;
c_row curs%rowtype;
cursor_name INTEGER;
begin
for c_row in curs loop
cursor_name := DBMS_SQL.OPEN_CURSOR;
DBMS_SQL.PARSE(cursor_name, c_row.text, DBMS_SQL.native);
DBMS_SQL.CLOSE_CURSOR(cursor_name);
end loop;
end;
cursor curs is
select 'alter table "' || owner || '"."' || table_name ||
'" disable constraint "' || constraint_name || '"' text
from sys.all_constraints
where owner = 'CLAS'
and constraint_type = 'R'
and owner = r_owner;
c_row curs%rowtype;
cursor_name INTEGER;
begin
for c_row in curs loop
cursor_name := DBMS_SQL.OPEN_CURSOR;
DBMS_SQL.PARSE(cursor_name, c_row.text, DBMS_SQL.native);
DBMS_SQL.CLOSE_CURSOR(cursor_name);
end loop;
end;