当前位置: 代码迷 >> Oracle开发 >> ORA-01655和ORA-06512异常,求指点
  详细解决方案

ORA-01655和ORA-06512异常,求指点

热度:136   发布时间:2016-04-24 06:32:52.0
ORA-01655和ORA-06512错误,求指点
用这个脚本建表,可是一运行就会报,求指点下该如何操作,感谢
declare
n_cnt number;
n_index number;
begin
 
/*==============================================================*/
/* Table: TB_PERIOD                                       */
/*==============================================================*/
execute immediate 'create table TB_PERIOD (
  periodid  NUMBER(20,0)  not null,
  periodname  VARCHAR2(10)  not null  unique,
  constraint PK_TB_PERIOD primary key (periodid)
)';

execute immediate 'comment on table TB_PERIOD is  '||''''||'档案年度 '||''''||'';

execute immediate 'comment on column TB_PERIOD.periodid is  '||''''||'年度ID '||''''||'';

execute immediate 'comment on column TB_PERIOD.periodname is  '||''''||'档案年度 '||''''||'';

execute immediate 'create  sequence SQ_TB_PERIOD
  minvalue 1
  maxvalue 2147483647
  start with 1
  increment by 1
  nocache
  order'; 
execute immediate 'create or replace trigger TRIGGER_TB_PERIOD
  before   insert
  on TB_PERIOD
  for each row
  begin
    select SQ_TB_PERIOD.nextval
    into :new.periodid
    from   dual;
  end;';
  end;

------解决思路----------------------
---------查看system表空间的位置
select t1.name, t2.name 
from v$tablespace t1, v$datafile t2 
where t1.ts# = t2.ts#; 
----------------------------------
-------扩展sytem表空间
alter tablespace system add datafile   'E:\ORACLE\PRODUCT\10.2.0\ORADATA\PLMDEMO\system20141215.DBF'  
size 5g;      /*具体路径和大小需要自行设置*/

------解决思路----------------------
弱弱的问下不会是你磁盘满了吧,另外检查下文件夹的读写权限