Unable to extend temp?

Compares and synchronizes Oracle data

Moderators: eddie davis, richardjm, Michael Christofides, neil.anderson

Unable to extend temp?

Postby cmille19 » Tue Jan 28, 2014 3:45 pm

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()
cmille19
 
Posts: 3
Joined: Tue Jan 28, 2014 12:43 pm

Postby eddie davis » Wed Jan 29, 2014 5:00 pm

Thank you for your forum post.

To answer your question:
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.


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:



I hope the above answers your question.

Many Thanks
Eddie
Eddie Davis
Technical Support Engineer
Red Gate Software Ltd
E-mail: support@red-gate.com
eddie davis
 
Posts: 943
Joined: Wed Jun 14, 2006 3:47 pm
Location: Red Gate Software

Query?

Postby cmille19 » Wed Jan 29, 2014 5:16 pm

We see that Red Gate is selecting all the columns of the table and doing an ORDER BY. The order by is what is causing the temp space issue. Two questions:

#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.
cmille19
 
Posts: 3
Joined: Tue Jan 28, 2014 12:43 pm

Postby eddie davis » Wed Feb 12, 2014 5:04 pm

Thank you for your patience whilst we continued to investigate your questions and sorry for deley in replying back to you.

To answer your questions:
#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.

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.).


#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.

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
Eddie Davis
Technical Support Engineer
Red Gate Software Ltd
E-mail: support@red-gate.com
eddie davis
 
Posts: 943
Joined: Wed Jun 14, 2006 3:47 pm
Location: Red Gate Software


Return to Data Compare for Oracle

Who is online

Users browsing this forum: No registered users and 0 guests