日期:2014-05-17 浏览次数:20816 次
create or replace procedure create_tablespace as i number; begin i:=1; loop create tablespace 'lee_tablespace_'||i datafile '/var/oracle/oradata/db0/lee_tablespace_t'||i||'.dat' size 1500m autoextend on default storage (initial 1000m next 50m minextents 1 maxextents unlimited pctincrease i:=i+1; if i>5 then exit end if end loop end
create or replace procedure create_tablespace as i number; temp_sql varchar(2000); begin i:=1; loop temp_sql:='create tablespace ''lee_tablespace_'''||to_char(i)||' datafile ''/var/oracle/oradata/db0/lee_tablespace_t'''||to_char(i)||'''.dat'' size 1500m autoextend on default storage (initial 1000m next 50m minextents 1 maxextents unlimited pctincrease '; execute immediate temp_sql; i:=i+1; if i>5 then exit; end if; end loop; end