Pentaho Spoon 转换抛出:ORA-01652:无法在表空间 TEMP 中将临时段扩展 128
Posted
技术标签:
【中文标题】Pentaho Spoon 转换抛出:ORA-01652:无法在表空间 TEMP 中将临时段扩展 128【英文标题】:Pentaho Spoon transformation throws: ORA-01652: unable to extend temp segment by 128 in tablespace TEMP 【发布时间】:2020-06-26 08:59:09 【问题描述】:嘿,我正在用 Pentaho Spoon 做一个简单的转换,转换有两个步骤:
输入表:我使用 SQL 从 Oracle 11g 数据库中提取数据。
Excel 输出:我将数据库中的数据写入一个 excel 文件。
问题是当我尝试运行这 2 步转换时,什么都没有发生。我试图可视化第一步中的前 200 个条目,但抛出以下错误:
ORA-01652:无法在表空间 TEMP 中将临时段扩展 128。
这是否是转换不起作用的原因,我该如何解决它,考虑到我没有数据库管理员权限来增加 TEMP 表空间大小。
这些是登录消息:
输入表法中使用的查询如下:
SELECT
ptn.ptnID,
ptn.ptnNAME,
ptn.ptnSURNAME,
ptn.SSN,
ptn.EXTERNALID,
ptn.NTS,
ptn.GENDER,
ptn.DOB,
ptn.ADDRESS,
ptn.CITY,
ptn.STATE,
ptn.COUNTRY,
ptn.POSTALCODE,
ptn.ACTIVE,
ptn.NACIONALITY,
ptn.COUNTRYOFBIRTH,
ptn.EXITUS,
ptn.ptnFIRSTSURNAME,
ptn.ptnSECONDSURNAME,
ptn.DEATHDATE,
appl.applID,
srv.srvDESCRIPTION,
center.CENTERDESCRIPTION,
appl.applLABEL,
appl.applDATE,
appl.COMPLETEDATE,
container.COMMENTS,
sample.SAMPLEDESCRIPTION,
test.TESTDESCRIPTION,
test.UNITSCS,
rslhst.RESULTSTATUS,
rslhst.ISAUTOMATIC,
pathology.PATHOLOGYDESCRIPTION,
FROM USRGR.APPLICATION appl
LEFT OUTER JOIN USRGR.PTN ptn on ptn.ptnid = appl.ptnid
LEFT OUTER JOIN USRGR.APPLICATIONTEST appltest on appltest.ptnid = appl.ptnid
LEFT OUTER JOIN USRGR.TEST test on test.testid = appltest.testid
LEFT OUTER JOIN USRGR.RSLHST rslhst on (rslhst.applid = appltest.applid) AND (rslhst.testid = appltest.testid)
LEFT OUTER JOIN USRGR.CONTAINER container on container.containerid = rslhst.containerid
LEFT OUTER JOIN USRGR.DOC doc on doc.docid = appl.docid
LEFT OUTER JOIN USRGR.SRV srv on srv.srvid = appl.srvid
LEFT OUTER JOIN USRGR.CENTER center on center.centerid = srv.centerid
LEFT OUTER JOIN USRGR.SAMPLE sample on sample.sampleid = container.sampleid
LEFT OUTER JOIN USRGR.CLTRISOL cltrisol on cltrisol.applid = rslhst.applid
LEFT OUTER JOIN USRGR.ISL isl on isl.islid = cltrisol.islid
LEFT OUTER JOIN USRGR.PATHOLOGY on pathology.pathologyid = rslhst.pathology
LEFT OUTER JOIN USRGR.COD cod on cod.codsfamilyid = rslhst.codsfamilyid AND rslhst.shortdescription1 = cod.shortdescription
LEFT OUTER JOIN USRGR.INTERVALS intervals on intervals.testid = test.testid AND intervals.methodid = rslhst.methodid
WHERE
appl.orderdate BETWEEN '01/01/19' AND '02/01/19' AND
rslhst.isfinal = 'Y' AND
appl.iscomplete = 'Y' AND
((to_number(to_char(appl.ORDERDATE, 'YYYY')) - to_number(to_char(ptn.DOB, 'YYYY'))) * 12 * 12 >= intervals.from) AND
((to_number(to_char(appl.ORDERDATE, 'YYYY')) - to_number(to_char(ptn.DOB, 'YYYY'))) * 12 * 12 < intervals.to) AND
test.testid in (
5, 5261,
435, 438,
5014, 3986, 3987,
4293, 6017, 2295, 2296, 2298,
196, 199, 218, 219, 1626, 3861, 5275, 5276
);
解释计划输出:
"PLAN_TABLE_OUTPUT"
"Plan hash value: 3813514414"
" "
"-------------------------------------------------------------------------------"
"| Id | Operation | Name | Rows | Bytes |TempSpc| Cost | "
"-------------------------------------------------------------------------------"
"| 0 | SELECT STATEMENT | | 319K| 497M| | 1508K|"
"|* 1 | FILTER | | | | | |"
"|* 2 | HASH JOIN OUTER | | 319K| 497M| 494M| 1508K|"
"| 3 | VIEW | | 319K| 490M| | 1500K|"
"|* 4 | FILTER | | | | | |"
"|* 5 | HASH JOIN OUTER| | 319K| 172M| 148M| 1500K|"
"|* 6 | HASH JOIN OUTER| | 319K| 145M| 140M| 1491K|"
"|* 7 | HASH JOIN OUTER| | 319K| 137M| 116M| 1489K|"
"|* 8 | HASH JOIN OUTER| | 319K| 112M| 105M| 1487K|"
"|* 9 | HASH JOIN OUTER| | 319K| 101M| 88M| 1485K|"
"|* 10 | HASH JOIN OUTER| | 284K| 85M| 79M| 1483K|"
"|* 11 | HASH JOIN OUTER| | 284K| 76M| 74M| 1482K|"
"|* 12 | HASH JOIN| | 284K| 71M| 148M| 1481K|"
"|* 13 | FILTER| | | | | |"
"|* 14 | HASH JOIN OUTER| | 669K| 141M| 121M| 89111 |"
"| 15 | NESTED LOOPS OUTER| | 669K| 114M| | 87134 |"
"|* 16 | HASH JOIN OUTER| | 1616 | 257K| | 22494 |"
"|* 17 | HASH JOIN OUTER| | 1616 | 211K| | 22479 |"
"|* 18 | HASH JOIN OUTER| | 1616 | 173K| | 22474 |"
"|* 19 | TABLE ACCESS FULL| APPLICATION | 1616 | 123K| | 22469 |"
"| 20 | TABLE ACCESS FULL| SERVICE | 292 | 9344 | | 3 |"
"| 21 | TABLE ACCESS FULL| CENTER | 16 | 384 | | 3 |"
"| 22 | TABLE ACCESS FULL| DOC | 7154 | 202K| | 12 |"
"| 23 |TABLE ACCESS BY INDEX ROWID| APPLICATIONTEST|414 | 6624 | | 40 |"
"|* 24 |INDEX RANGE SCAN| RQTEST_PTNID_IDX | 414 | | | 3 |"
"| 25 |TABLE ACCESS FULL | TEST | 4292 | 176K| | 31 |"
"|* 26 |TABLE ACCESS FULL | RSLHST | 187M| 7686M| | 1233K|"
"| 27 |TABLE ACCESS FULL | PATHOLOGY | 45 | 720 | | 3 |"
"| 28 |TABLE ACCESS FULL | COD | 4289 | 142K| | 14 |"
"| 29 |TABLE ACCESS FULL | CLTRISOL | 212K| 4144K| | 505 |"
"| 30 |TABLE ACCESS FULL | ISL | 2303 | 80605 | | 6 |"
"| 31 |TABLE ACCESS FULL | CONTAINER | 674 | 53920 | | 5 |"
"| 32 |TABLE ACCESS FULL | SAMPLE | 354 | 9558 | | 2 |"
"| 33 |TABLE ACCESS FULL | PTN | 1886K| 160M| | 3887 |"
"| 34 |TABLE ACCESS FULL | MARGINS | 2232 | 49104 | | 8 |"
"-------------------------------------------------------------------------------"
【问题讨论】:
【参考方案1】:转换正在执行排序或为需要 TEMP 空间的连接创建临时数据集。根据您的转换和查询的解释计划,如果转换必须在应用过滤器之前处理所有源数据,则限制返回的行数甚至可能无关紧要。运行它的唯一方法很可能是增加 TEMP 表空间的大小。您需要与您的 DBA 一起确认这一点并制定解决方案。
【讨论】:
嘿,我刚刚添加了转换的第一步中使用的查询,有什么我可以更改以不出现此问题的吗? 有了这么多的连接,我怀疑你无能为力。您还可以发布查询的解释计划,尽可能详细吗? oracle.com/technetwork/database/bi-datawarehousing/… 此外,如果可以的话,请提供 TEMP 表空间的 dba_data_files 视图中的任何详细信息... 我应该如何发布解释计划,我只是将其导出为 html,但由于字符限制,我无法将其附加到帖子中。有没有另一种方式来发布解释计划而不是 HTML? SQL 调优是一门艺术。请参阅此处开始:oracle-base.com/articles/misc/how-do-i-learn-to-tune-sql。这可能需要与您的 DBA 合作,并创建新的数据库对象。以上是关于Pentaho Spoon 转换抛出:ORA-01652:无法在表空间 TEMP 中将临时段扩展 128的主要内容,如果未能解决你的问题,请参考以下文章
第一列中的空值是不是会阻止在 Pentaho Spoon 中导入 Excel 文件?