Try to generate a cursor that reads your tables from ALL_OBJECTS where the OWNER = <'USERNAME'> , then you can use SQL EXECUTE_IMMEDIATE to run your generated ALTER TABLE commands
Example
Cursor C_All_Tables (P_Owner VARCHAR2) is
Select 'ALTER '||Object_type||' '||Object_name||' NOPARALLEL' as MyQry
from all_objects
Where Owner = P_Owner
and Object_type in ( 'TABLE' , 'INDEX') ;
Status Number ;
Begin
...
For C_Rec in C_All_Tables Loop
Status := dbms_sql.execute(C_Rec.MyQ
Dbms_output.put_line(MyQry
End Loop ;
...
End ;
Main Topics
Browse All Topics





by: sdstuberPosted on 2008-07-16 at 06:34:29ID: 22015728
try this...
you'll probably want to add a where clause to each cursor specifying the schemas you want to alter.
Select allOpen in new window