[英]SQL--— Error when trying to export query results as CSV
I am running a large query (6 million records) which has a lot of INNER JOINS with other tables but when I am trying to export the query results on CSV I am getting the following results.我正在运行一个大型查询(600 万条记录),它与其他表有很多 INNER JOINS,但是当我尝试将查询结果导出到 CSV 时,我得到以下结果。 I googled it for a while but could not get any result.我用谷歌搜索了一段时间,但没有得到任何结果。
ORA-01555: snapshot too old: rollback segment number 69 with name
"_SYSSMU69_2356811035$" too small
ORA-0263: "snapshot too old: rollback segment number %s with name \"%s\" too small"
*Cause: rollback records needed by a reader for consistent read are overwritten by other writers
*Action: If in Automatic Undo Management mode, increase undo_retention setting. Otherwise, rollback segments
Vendor code 1555
Let me explain you what happens.让我解释一下会发生什么。 When Oracle executes a query, the result of the query, no matter how much time the query takes, must be consistent with the picture of that data at the moment the query was initiated.当 Oracle 执行查询时,查询的结果,无论查询花费多少时间,都必须与查询开始时该数据的图片一致。
The ORA-1555 errors can happen when a query is unable to access enough undo to build a copy of the data at the time the query started. ORA-1555 错误可能发生在查询无法访问足够的撤消权限以在查询开始时构建数据副本时。 Committed "versions" of blocks are maintained along with newer uncommitted "versions" of those blocks so that queries can access data as it existed in the database at the time of the query.已提交的块“版本”与这些块的较新的未提交“版本”一起维护,以便查询可以访问在查询时存在于数据库中的数据。 These are referred to as "consistent read" blocks and are maintained using Oracle undo management.这些被称为“一致读取”块,并使用 Oracle 撤消管理进行维护。
This consistency is handled by the UNDO tablespace.这种一致性由 UNDO 表空间处理。 In your case, the most probable scenario is the following:在您的情况下,最可能的情况如下:
Try the following things:尝试以下几点:
There are a plethora of bugs in old Oracle versions related with ORA-1555, and other possibilities when undo data are lob segments, etc.. If you have access to Support, here you will find the master note ORA-1555相关的旧Oracle版本有很多bug,还有其他可能是undo数据是lob段等。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.