Unable to extend temp?
cmille19
Posts: 10 Bronze 1
Getting errors comparing a table with 250 million rows. The two tables are static (not being updating during time of compare). I'm a little confused why its using temp space. I've used the SQL Server product for 10 years and compare equivalent sized tables on SQL Server without issue.
Devart.Data.Oracle.OracleException: ORA-01652: unable to extend temp segment by 128 in tablespace TEMP
at Devart.Data.Oracle.a7.b(Int32 A_0)
at Devart.Data.Oracle.a9.b(Int32 A_0)
at Devart.Data.Oracle.OracleDataReader.Read()
at RedGate.Oracle.DataCompare.DbDataReaderWrapperBase.Read()
at RedGate.Oracle.DataCompare.DataComparer.Compare()
System.InvalidOperationException: No data exists for the row/column.
at Devart.Common.DbDataReaderBase.AssertReaderHasData()
at Devart.Data.Oracle.OracleDataReader.GetValues(Object[] values)
at RedGate.Oracle.DataCompare.DbDataReaderWrapperBase.GetValues(Object[] values)
CURRENT_ROW_COMPARISON_RESULT
System.NullReferenceException: Object reference not set to an instance of an object.
at RedGate.Oracle.DataCompare.ComparisonException.CreateReport()
at RedGate.Oracle.DataCompare.ComparisonException.CreateReport()
Devart.Data.Oracle.OracleException: ORA-01652: unable to extend temp segment by 128 in tablespace TEMP
at Devart.Data.Oracle.a7.b(Int32 A_0)
at Devart.Data.Oracle.a9.b(Int32 A_0)
at Devart.Data.Oracle.OracleDataReader.Read()
at RedGate.Oracle.DataCompare.DbDataReaderWrapperBase.Read()
at RedGate.Oracle.DataCompare.DataComparer.Compare()
System.InvalidOperationException: No data exists for the row/column.
at Devart.Common.DbDataReaderBase.AssertReaderHasData()
at Devart.Data.Oracle.OracleDataReader.GetValues(Object[] values)
at RedGate.Oracle.DataCompare.DbDataReaderWrapperBase.GetValues(Object[] values)
CURRENT_ROW_COMPARISON_RESULT
System.NullReferenceException: Object reference not set to an instance of an object.
at RedGate.Oracle.DataCompare.ComparisonException.CreateReport()
at RedGate.Oracle.DataCompare.ComparisonException.CreateReport()
Comments
To answer your question:
Oracle creates temporary tablespaces which are used for sorting and hash join operations. A SQL query with millions of rows returned, the sort operation is too large to occur in memory (RAM) and must occur on disk. The temporary tablespace is where this takes place.
When the temporary tablespace has insufficient disk space allocated, Oracle error ORA-01652 is generated.
I recommend that you take a look at following internet articles which can explain temporary tablespaces in much more detail than I can:
http://www.dba-oracle.com/concepts/temp ... spaces.htm
http://www.orafaq.com/node/2
http://docs.oracle.com/cd/B28359_01/ser ... ces007.htm
I hope the above answers your question.
Many Thanks
Eddie
Senior Product Support Engineer
Redgate Software Ltd
Email: support@red-gate.com
#1 Does your product have to do an ORDER BY? It seems like other data comparison products like Oracle Veridata does the sort through app. Not sure if the your SQL Server product does sorting on database also.
#2 We are comparing two 250 million rows tables in the same database, but different schemas. Does your product execute both source and target queries at same time or is it retrieving source rows first and then target? I ask because we increased temp size to large than the table, but still ran out of space. Wondering if we need space for both.
To answer your questions: Yes it uses ORDER BY, data comparison is possible without it but I believe you would have to pull down all the data, then sort, then compare. The database is better at sorting than Data Compare for Oracle pretty much all of the time (it should have indexes it can use, maybe it has done the sort before and cached the result etc.).
Yes it executes both queries at the same time. We can then compare them one row at a time because the ORDER BY has already been applied.
Many Thanks
Eddie
Senior Product Support Engineer
Redgate Software Ltd
Email: support@red-gate.com