表空间满了
org.springframework.web.util.NestedServletException: Request processing failed; nested exception is java.lang.RuntimeException: java.lang.RuntimeException: org.springframework.jdbc.UncategorizedSQLException:
用docker安装的oracle数据库,查询到是SCM_DAT的表空间满了,本身有10g的了
用select f.* from dba_data_files f where f.tablespace_name='SCM_DAT'搜索到路径是:
/u02/oradata/CBSDB/scm_dat.dbf
用语句扩展:
alter database datafile '/u02/oradata/CBSDB/scm_dat.dbf' resize 30g;
结果显示:
alter database datafile '/u02/oradata/CBSDB/scm_dat.dbf' resize 30g
ORA-19755: could not open change tracking file
ORA-19750: change tracking file: '/u02/dump/backup/oracledata/chtrack.log'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
不知道是什么情况,提示文件不在,但确实是在那里。
可以怎么处理这个表空间满问题?
1.先确定硬盘有足够的空间,否则你修改文件大小肯定失败
2.如果一个文件已经达到了系统能识别的最大大小,你改也没用。linux最大能识别多少我不太清楚,windows超过32G就不识别了
3.oracle允许一个表空间关联多个文件,你可以再追加一个文件试试
--如下查询查询结果,改下.dbf文件名,执行即可(区别已存在的文件,为了方便后期运维,建议加数字或日期后缀)
select 'alter tablespace '||tablespace_name||' add datafile '''||file_name||''' size 100M autoextend on;' from dba_data_files where tablespace_name='大写的表空间名';
--示例,将 BOOKS 表空间扩展 100M(100M用完后,可自动扩展,最大到32GB,将命令结尾的 on 改为 off,可关闭自动扩展)
SQL> select 'alter tablespace '||tablespace_name||' add datafile '''||file_name||''' size 100M autoextend on;' from dba_data_files where tablespace_name='BOOKS';
'ALTERTABLESPACE'||TABLESPACE_NAME||'ADDDATAFILE'''||FILE_NAME||'''SIZE100MAUTOEXTENDON;'
------------------------------------------------------------------------------------------------------------------------
alter tablespace BOOKS add datafile '/u01/app/oracle/oradata/orcl/books02.dbf' size 100M autoextend on;
alter tablespace BOOKS add datafile '/u01/app/oracle/oradata/orcl/books01.dbf' size 100M autoextend on;
SQL> alter tablespace BOOKS add datafile '/u01/app/oracle/oradata/orcl/books03.dbf' size 100M autoextend on;
Tablespace altered.