Oracle autoextended

Материал из Wiki
Перейти к: навигация, поиск

Oracle autoextended

declare
cursor cur is
select 'alter database datafile  ''' || file_name || '''  autoextend on' as exe_query
   from dba_data_files
  where tablespace_name not in ( 'UNDOTBS1',  'SYSTEM', 'SYSAUX', 'USERS', 'TOOLS');
begin
    for cur_rec in cur loop
        dbms_output.put_line(cur_rec.exe_query);
        execute immediate(cur_rec.exe_query);
    end loop;
end;