Cannot extract date range from Oracle into SQL Server

  • I'm using an SSIS package with an OLEDB connection. I'm trying to populate a table for the first time. There will be 4 million rows between the start date and the current date.

    I left the package running overnight, expecting to come in to a fully populated table, but the job failed after 635,000 rows, and the reasons are not clear.

    I decided it would be better to run it in smaller chunks, so added a date restriction, and it returns zero rows.

    I can't see what is wrong with my code.

    I'm not even sure if the issue is Oracle SQL, T-SQL or SSIS

    Any ideas, anyone?

    TIA

    b2b

  • I would think it is some data conversion issue. For example, Oracle dates have a much larger range than the SQL Server datetime datatype can handle. However, I would expect you would get some kind of error message - are you running it via BIDS or via a sql job?

  • born2bongo (3/15/2010)the reasons are not clear.

    Either application got a stack of ORA-nnnnn errors or Oracle wrote a stack of ORA-nnnnn errors into Oracle's side alertlog.

    Ask your Oracle DBA to check alertlog then post entire stack.

    _____________________________________
    Pablo (Paul) Berzukov

    Author of Understanding Database Administration available at Amazon and other bookstores.

    Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.
  • born2bongo (3/15/2010)


    I can't see what is wrong with my code.

    Since you didn't post the code we cannot either 😀

    _____________________________________
    Pablo (Paul) Berzukov

    Author of Understanding Database Administration available at Amazon and other bookstores.

    Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.
  • DNA_DBA (4/7/2010)


    I would think it is some data conversion issue. For example, Oracle dates have a much larger range than the SQL Server datetime datatype can handle.

    I agree that any date conversion in between Oracle and SQL Server has to take into consideration that valid date ranges are not the same.

    As far as I remember - please correct me if I'm wrong - Oracle accepts dates between 4712BC and 4712AD while SQL Server accepts dates between the years 1753 and 9999

    _____________________________________
    Pablo (Paul) Berzukov

    Author of Understanding Database Administration available at Amazon and other bookstores.

    Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply