我下面的代码目的是写一个存储过程,创建5个功能一样表空间名则分别为lee_tablespace_1~lee_tablespace_5
运行时有错 不知道具体错在哪里
请教达人~
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;
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
解决方案 »
- 大家好,帮我看一下这个SQL语句怎么实现啊
- 求SQL优化问题
- oracle 9i恢复出现如下错误
- 这条语句的错误在哪?拜托给看看
- ORACLE中的一个简单问题,初学者
- 关于监听器的问题?
- ORACLE中type对象的方法如何创建及使用?
- 客户端与服务端的连接问题?
- weblogic异常java.sql.SQLException: weblogic.rmi.extensions.RemoteRuntimeException
- oracle 输入绑定 触发器运行时候出现new old 输入绑定?....
- 哪里有REDFLAG下可以安装的ORACLE10下载啊?
- update同一表内更新一字段内容为该表的另一字段中的值
PLS-00103: 出现符号 "CREATE"在需要下列之一时:
( begin case declare
exit for goto if loop mod null pragma raise return select
update while with <an identifier>
<a double-quoted delimited-identifier> <a b
更别说你这还是动态拼接的呢
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