文章目录
- 一、场景浮现
- 1. 问题详情
- 2. 问题描述
- 3. 问题原因
- 二、解决方案
- 2.1. 查看表空间的名字及文件在哪
- 2.2. 查询表空间使用情况
- 2.3. 解决方法
一、场景浮现
1. 问题详情
2. 问题描述
java.sql.SQLException: ORA-01691: Lob 段
SONARQUBE2.SYS_LOB0000119128C00008$$ 无法通过 128 (在表空间 USERS 中) 扩展!
3. 问题原因
数据库表空间不足
二、解决方案
2.1. 查看表空间的名字及文件在哪
--查看表空间的名字及文件在哪
select tablespace_name,file_id,file_name,round(bytes / (1024 * 1024), 0) total_spacefrom dba_data_filesorder by tablespace_name;
2.2. 查询表空间使用情况
--查询表空间使用情况
select a.tablespace_name,a.bytes / 1024 / 1024 "sum MB",(a.bytes - b.bytes) / 1024 / 1024 "used MB",b.bytes / 1024 / 1024 "free MB",round(((a.bytes - b.bytes) / a.bytes) * 100, 2) "used%"from (select tablespace_name, sum(bytes) bytesfrom dba_data_filesgroup by tablespace_name) a,(select tablespace_name, sum(bytes) bytes, max(bytes) largestfrom dba_free_spacegroup by tablespace_name) bwhere a.tablespace_name = b.tablespace_nameorder by ((a.bytes - b.bytes) / a.bytes) desc;
注:上面是我解决后的截图,没修改之前USERS表空间已使用100%
2.3. 解决方法
第1种:将原有表空间扩大
alter database datafile '/u01/oracle/oradata/sonar/users01.dbf' resize 4000m;
第2种:将原有表空间扩大(推荐使用)
--解决方案
alter tablespace USERS
add datafile '/u01/oracle/oradata/sonar/users02.dbf' size 32700m
附上:错误详情日志:
错误详情
org.sonar.ce.task.projectanalysis.component.VisitException: Visit of Component {key=lis_ybt:lis_ybt/YBTJDAXUnderWriteBL.java,uuid=AXMSUeCanJv3q8DrapwD,type=FILE} failedat org.sonar.ce.task.projectanalysis.component.VisitException.rethrowOrWrap(VisitException.java:44)at org.sonar.ce.task.projectanalysis.component.DepthTraversalTypeAwareCrawler.visit(DepthTraversalTypeAwareCrawler.java:41)at org.sonar.ce.task.projectanalysis.component.DepthTraversalTypeAwareCrawler.visitChildren(DepthTraversalTypeAwareCrawler.java:95)at org.sonar.ce.task.projectanalysis.component.DepthTraversalTypeAwareCrawler.visitImpl(DepthTraversalTypeAwareCrawler.java:54)at org.sonar.ce.task.projectanalysis.component.DepthTraversalTypeAwareCrawler.visit(DepthTraversalTypeAwareCrawler.java:39)at org.sonar.ce.task.projectanalysis.component.DepthTraversalTypeAwareCrawler.visitChildren(DepthTraversalTypeAwareCrawler.java:95)at org.sonar.ce.task.projectanalysis.component.DepthTraversalTypeAwareCrawler.visitImpl(DepthTraversalTypeAwareCrawler.java:54)at org.sonar.ce.task.projectanalysis.component.DepthTraversalTypeAwareCrawler.visit(DepthTraversalTypeAwareCrawler.java:39)at org.sonar.ce.task.projectanalysis.step.PersistLiveMeasuresStep.execute(PersistLiveMeasuresStep.java:91)at org.sonar.ce.task.step.ComputationStepExecutor.executeStep(ComputationStepExecutor.java:81)at org.sonar.ce.task.step.ComputationStepExecutor.executeSteps(ComputationStepExecutor.java:72)at org.sonar.ce.task.step.ComputationStepExecutor.execute(ComputationStepExecutor.java:59)at org.sonar.ce.task.projectanalysis.taskprocessor.ReportTaskProcessor.process(ReportTaskProcessor.java:81)at org.sonar.ce.taskprocessor.CeWorkerImpl$ExecuteTask.executeTask(CeWorkerImpl.java:207)at org.sonar.ce.taskprocessor.CeWorkerImpl$ExecuteTask.run(CeWorkerImpl.java:189)at org.sonar.ce.taskprocessor.CeWorkerImpl.findAndProcessTask(CeWorkerImpl.java:156)at org.sonar.ce.taskprocessor.CeWorkerImpl$TrackRunningState.get(CeWorkerImpl.java:131)at org.sonar.ce.taskprocessor.CeWorkerImpl.call(CeWorkerImpl.java:83)at org.sonar.ce.taskprocessor.CeWorkerImpl.call(CeWorkerImpl.java:51)at java.util.concurrent.FutureTask.run(FutureTask.java:266)at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)at java.util.concurrent.FutureTask.run(FutureTask.java:266)at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)at java.lang.Thread.run(Thread.java:748)
Caused by: org.apache.ibatis.exceptions.PersistenceException:
### Error updating database. Cause: java.sql.SQLException: ORA-01691: Lob 段 SONARQUBE2.SYS_LOB0000119128C00008$$ 无法通过 128 (在表空间 USERS 中) 扩展### The error may involve org.sonar.db.measure.LiveMeasureMapper.update-Inline
### The error occurred while setting parameters
### Cause: java.sql.SQLException: ORA-01691: Lob 段 SONARQUBE2.SYS_LOB0000119128C00008$$ 无法通过 128 (在表空间 USERS 中) 扩展at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:30)at org.apache.ibatis.session.defaults.DefaultSqlSession.update(DefaultSqlSession.java:200)at org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:63)at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:59)at com.sun.proxy.$Proxy49.update(Unknown Source)at org.sonar.db.measure.LiveMeasureDao.insertOrUpdate(LiveMeasureDao.java:108)at org.sonar.ce.task.projectanalysis.step.PersistLiveMeasuresStep$MeasureVisitor.lambda$visitAny$1(PersistLiveMeasuresStep.java:130)at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184)at java.util.ArrayList.forEach(ArrayList.java:1249)at java.util.stream.SortedOps$RefSortingSink.end(SortedOps.java:390)at java.util.stream.Sink$ChainedReference.end(Sink.java:258)at java.util.stream.Sink$ChainedReference.end(Sink.java:258)at java.util.stream.Sink$ChainedReference.end(Sink.java:258)at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482)at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151)at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174)at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418)at org.sonar.ce.task.projectanalysis.step.PersistLiveMeasuresStep$MeasureVisitor.visitAny(PersistLiveMeasuresStep.java:126)at org.sonar.ce.task.projectanalysis.component.DepthTraversalTypeAwareCrawler.visitNode(DepthTraversalTypeAwareCrawler.java:67)at org.sonar.ce.task.projectanalysis.component.DepthTraversalTypeAwareCrawler.visitImpl(DepthTraversalTypeAwareCrawler.java:51)at org.sonar.ce.task.projectanalysis.component.DepthTraversalTypeAwareCrawler.visit(DepthTraversalTypeAwareCrawler.java:39)... 25 more
Caused by: java.sql.SQLException: ORA-01691: Lob 段 SONARQUBE2.SYS_LOB0000119128C00008$$ 无法通过 128 (在表空间 USERS 中) 扩展at oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:494)at oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:446)at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:1054)at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:623)at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:252)at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:612)at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:226)at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:59)at oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:910)at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1119)at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3780)at oracle.jdbc.driver.T4CPreparedStatement.executeInternal(T4CPreparedStatement.java:1343)at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:3887)at oracle.jdbc.driver.OraclePreparedStatementWrapper.execute(OraclePreparedStatementWrapper.java:1079)at org.apache.commons.dbcp2.DelegatingPreparedStatement.execute(DelegatingPreparedStatement.java:94)at org.apache.commons.dbcp2.DelegatingPreparedStatement.execute(DelegatingPreparedStatement.java:94)at org.apache.ibatis.executor.statement.PreparedStatementHandler.update(PreparedStatementHandler.java:46)at org.apache.ibatis.executor.statement.RoutingStatementHandler.update(RoutingStatementHandler.java:74)at org.apache.ibatis.executor.ReuseExecutor.doUpdate(ReuseExecutor.java:52)at org.apache.ibatis.executor.BaseExecutor.update(BaseExecutor.java:117)at org.apache.ibatis.executor.CachingExecutor.update(CachingExecutor.java:76)at org.apache.ibatis.session.defaults.DefaultSqlSession.update(DefaultSqlSession.java:198)... 46 more
Caused by: Error : 1691, Position : 0, Sql = update live_measures setvalue = :1 ,variation = :2 ,text_value = :3 ,measure_data = :4 ,updated_at = :5 wherecomponent_uuid = :6 and metric_id = :7 , OriginalSql = update live_measures setvalue = ?,variation = ?,text_value = ?,measure_data = ?,updated_at = ?wherecomponent_uuid = ?and metric_id = ?, Error Msg = ORA-01691: Lob 段 SONARQUBE2.SYS_LOB0000119128C00008$$ 无法通过 128 (在表空间 USERS 中) 扩展at oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:498)... 67 more