begin for c in (select tablespace_name from dba_tablespaces where contents='PERMANENT' and tablespace_name not in ('SYSTEM','SYSAUX')) loop begin for i in 1..20 loop begin execute immediate 'alter tablespace '||c.tablespace_name||' add datafile ''/db/systest1/'||c.tablespace_name||i||'.dbf'' size 5M autoextend on next 1G maxsize unlimited'; exception when others then null; end; end loop; end; end loop; end; /