What are the challenges you face when working across database platforms? Take the survey
Options

Unable to extend temp?

cmille19cmille19 Posts: 10 Bronze 1
edited February 12, 2014 11:04AM in Data Compare for Oracle
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()

Comments

  • Options
    Eddie DEddie D Posts: 1,792 Rose Gold 5
    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:
      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
      Eddie Davis
      Senior Product Support Engineer
      Redgate Software Ltd
      Email: support@red-gate.com
    • Options
      cmille19cmille19 Posts: 10 Bronze 1
      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.
    • Options
      Eddie DEddie D Posts: 1,792 Rose Gold 5
      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
      Senior Product Support Engineer
      Redgate Software Ltd
      Email: support@red-gate.com
    Sign In or Register to comment.