ORA-01688表空间无法扩展

错误报告:
SQL 错误: ORA-01688: 表 JINRILOG.USEROPERATELOG 分区 P1 无法通过 8192 (在表空间 JINRILOG 中) 扩展
01688. 00000 -  "unable to extend table %s.%s partition %s by %s in tablespace %s"
*Cause:    Failed to allocate an extent for table segment in tablespace.
*Action:   Use ALTER TABLESPACE ADD DATAFILE statement to add one or more
           files to the tablespace indicated.
-----解决过程:
第一步:确认是否自动扩展打开
SELECT file_id, file_name, tablespace_name, autoextensible, increment_by
FROM dba_data_files
WHERE tablespace_name = 'JINRILOG'
order by file_id desc;
第二步:尝试resize文件大小
SQL> alter database datafile 'S:\APP\ADMINISTRATOR\ORADATA\ORCL\JINRILOG01.DBF' resize 100000M;
alter database datafile 'S:\APP\ADMINISTRATOR\ORADATA\ORCL\JINRILOG01.DBF' resize 100000M
*
第 1 行出现错误:
ORA-01144: 文件大小 (12800000 块) 超出 4194303 块的最大数
select value from v$parameter where name='db_block_size';
/****
FIX 1:
   Specify a smaller file size.
   The maximum file size is
       db_block_size * 4194303
   For example, if db_block_size is 2kB then maximum file size is limited
   to 2k*4194303, 8Gb-2k.
FIX 2:
   Change db_block_size.  This can only be done by recreating of
   database.
    
       db_block_size    Maximum data file size
       -------------    ----------------------
            2kb                 8Gb-2kb
            4kb                16Gb-4kb
            8kb                32Gb-8kb
           16kb                64Gb-16kb
           32kb               128Gb-32kb
可见db_block_size对 maximum data file size还是起决定作用的
由上可知,由于db_block_size设置为8kb的原因导致系统文件只能32G.
****/
第二步:增加数据文件
alter tablespace jinrilog add datafile
'S:\APP\ADMINISTRATOR\ORADATA\ORCL\JINRILOG02.DBF'
size 30g;
alter tablespace jinrilog add datafile
'S:\APP\ADMINISTRATOR\ORADATA\ORCL\JINRILOG03.DBF'
size 30g;


你可能感兴趣的:(ORA-01688表空间无法扩展)