none
Error importing data from oracle database to an SQL database

    Question

  • Hi!

    When i was importing a database table from an Oracle Database to a SQL database table, the wizard returns this error:

    Could not connect source component.

    Warning 0x80202066: Source - VB_PERMISSIONS [1]: Cannot retrieve the column code page info from the OLE DB provider.  If the component supports the "DefaultCodePage" property, the code page from that property will be used.  Change the value of the property if the current string code page values are incorrect.  If the component does not support the property, the code page from the component's locale ID will be used.

    Error 0xc0204018: DTS.Pipeline: The "output column "PE_ACTIVE" (34)" has a precision that is not valid. The precision must be between 1 and 38.
     (SQL Server Import and Export Wizard)

    I tried to change the destination type field to others than the default (decimal), but noting works.

    Anyone can help me please??

    Thx a lot

    Cristovao

    Tuesday, October 11, 2005 2:36 PM

Answers

  •  Mali Buda wrote:
    I have installed sql server 2005 evaluation version and have oracle 8i.
    But I can't find OLE DB Source property of AlwaysUseDefaultCodePage to set it to True.
    Can someone help me and show me directions.

    Thanks,
    Mitja


    Mitja,
    1) Go into your data-flow that contains your OLE DB Source component.
    2) Click the OLE DB Source component once
    3) Press F4

    The properties pane will appear showing all the properties of the OLE DB Source component. In here you will find AlwaysUseDefaultCodePage.

    -Jamie
    Thursday, November 17, 2005 12:09 PM
    Moderator
  • Hi Bob!

    Well, i used the Oracle Provider For OLE DB... After have read your post i tried the Microsoft OLEDB Provider For Oracle, and the data have been imported, returning this warning:


    TITLE: SQL Server Import and Export Wizard
    ------------------------------

    Warning 0x80202066: Source - VB_PERMISSIONS [1]: Cannot retrieve the column code page info from the OLE DB provider.  If the component supports the "DefaultCodePage" property, the code page from that property will be used.  Change the value of the property if the current string code page values are incorrect.  If the component does not support the property, the code page from the component's locale ID will be used.


    ------------------------------
    BUTTONS:

    OK
    ------------------------------

    I suppose it is normal.

    Thanks a lot for your help.

    Best Regards,
    Cristovao

    Friday, October 21, 2005 9:24 AM

All replies

  • I'm currently working on a project that pull data from an Oracle DB and have had not problems pulling data and loading it into SQL 2005.

    As far as the codepage error, this occurs when you are pulling non-unicode string values from Oracle(and other DBs as well).  SSIS cannot retrieve the CodePage (character set) used on the Oracle DB.   To eliminate the warning (assuming Western Alphabet) just set the OLE DB Source to AlwaysUseDefaultCodePage to True.  The DefaultCodePage should be set to 1252 which is correct for Western Alphabet.  If Oracle is not using the Western Alphabet, you'll need to determine the charset used and use http://msdn.microsoft.com/library/default.asp?url=/workshop/database/tdc/reference/CharSet.asp to correctly set the default code page.

    As far as the PE_ACTIVE output column error, I can't tell what the error is.  If you let me know how field is defined in Oracle, I may be able to help you.  Also what version of Oracle are you using?

    Larry
    Wednesday, October 12, 2005 3:12 PM
  • Cristovao,

    Could you tell us what is the source (Oracle) data type and precision and what is the suggested destination (SQL Server) type and precision?

    Thanks.
    Wednesday, October 12, 2005 10:18 PM
    Owner
  • Hi

    Thx a lot for your answer.

    I am sending to you the data that you asked me:

    Type of the source fied: Number (1)
    Suggested destination : Decimal (1)
    Oracle version: 8.1.7


    Best Regards,
    Cristovao

    Wednesday, October 19, 2005 4:27 PM
  • The value 1 should be a valid precision.

    Could you do another check for me? Please select the failing table on the Select Source Tables and Views" page and click "Edit..." on it. In the grid that shows up, find your "PE_ACTIVE" column and take a look at the values for Size, Precision and Scale.
    There should be only the precision with the value 1.
    Wednesday, October 19, 2005 5:54 PM
    Owner
  • Hi Bob!

    Thx again for your interest...

    Yes, i have checked and in fact there are only the precision with the value 1, but the error occurs... Sad

    Thursday, October 20, 2005 9:13 AM
  • Well, it sounds intriguing.

    Can you tell me what OLE DB driver you used; Microsoft OLE DB for Oracle or Oracle OLE DB?

    I was able to copy a Number(1) column without any problem, using the MS driver.

    Also, what version of SSIS do you have installed?


    Thanks.
    Thursday, October 20, 2005 6:04 PM
    Owner
  • Hi Bob!

    Well, i used the Oracle Provider For OLE DB... After have read your post i tried the Microsoft OLEDB Provider For Oracle, and the data have been imported, returning this warning:


    TITLE: SQL Server Import and Export Wizard
    ------------------------------

    Warning 0x80202066: Source - VB_PERMISSIONS [1]: Cannot retrieve the column code page info from the OLE DB provider.  If the component supports the "DefaultCodePage" property, the code page from that property will be used.  Change the value of the property if the current string code page values are incorrect.  If the component does not support the property, the code page from the component's locale ID will be used.


    ------------------------------
    BUTTONS:

    OK
    ------------------------------

    I suppose it is normal.

    Thanks a lot for your help.

    Best Regards,
    Cristovao

    Friday, October 21, 2005 9:24 AM
  • I am glad you were able to make it work.

    Yes, I believe this warning can be safely ignored in this case.
    Friday, October 21, 2005 4:43 PM
    Owner
  • Hi all!

    Same problem that I had, but the problem was that Oracle did not have a size or scale specified.  SSIS automatically treats all of there as numerics, and with no specification on the precision or scale, it blows up.  I have found no way to set it, and have tried both the Microsoft and Oracle drivers.  Nada!

    The good news....just use a Data Reader connection with the .Net Oracle Client.  Works like a champ!!!!!!!!

    Scott
    Sunday, October 23, 2005 3:48 PM
  •  Larry_Pope wrote:

    As far as the codepage error, this occurs when you are pulling non-unicode string values from Oracle(and other DBs as well).  SSIS cannot retrieve the CodePage (character set) used on the Oracle DB.   To eliminate the warning (assuming Western Alphabet) just set the OLE DB Source to AlwaysUseDefaultCodePage to True.  The DefaultCodePage should be set to 1252 which is correct for Western Alphabet.  If Oracle is not using the Western Alphabet, you'll need to determine the charset used and use http://msdn.microsoft.com/library/default.asp?url=/workshop/database/tdc/reference/CharSet.asp to correctly set the default code page.




    Thanks for this Larry - AlwaysUseDefaultCodePage=TRUE worked a treat!

    -Jamie
    Tuesday, October 25, 2005 10:53 AM
    Moderator
  • Here is the latest issue I found.  Some Oracle tables do not have a precision or scale assigned to the column when the type is set to NUMBER.  This causes an error when using an OLEDB connection.  Has anyone found a way to get around this?  The DataReader does it fine, but I don't think it is as fast as the DataReader.

    Thanks!

    Scott Barrett
    Tuesday, October 25, 2005 12:57 PM
  • Any luck on thos problem, Scott??
    Thursday, October 27, 2005 4:40 PM
  • Here is the issue.  When using SSIS against Oracle 8i or any database imported from 8i, when a column was meant to be what we call an INT, they call NUMBER and do not set the precision or scale.  Oracle 9i and up does this by default.  This will cause SSIS to not be able to bring in data from those columns.  So we now have two solutions:  Use the Data Reader Source and your done, or use the OLE DB Source and only using the Advanced Editor, enter the source and manually create each output column manually.  If you are pulling from a complete table instead of a query, you can manually change the datatype in the advanced editor to a DT_I4 and it will then work.

    Hope this helps you out!

    Scott Barrett
    Moffitt Cancer Center
    Thursday, October 27, 2005 4:48 PM
  • I have installed sql server 2005 evaluation version and have oracle 8i.
    But I can't find OLE DB Source property of AlwaysUseDefaultCodePage to set it to True.
    Can someone help me and show me directions.

    Thanks,
    Mitja
    Thursday, November 17, 2005 11:37 AM
  •  Mali Buda wrote:
    I have installed sql server 2005 evaluation version and have oracle 8i.
    But I can't find OLE DB Source property of AlwaysUseDefaultCodePage to set it to True.
    Can someone help me and show me directions.

    Thanks,
    Mitja


    Mitja,
    1) Go into your data-flow that contains your OLE DB Source component.
    2) Click the OLE DB Source component once
    3) Press F4

    The properties pane will appear showing all the properties of the OLE DB Source component. In here you will find AlwaysUseDefaultCodePage.

    -Jamie
    Thursday, November 17, 2005 12:09 PM
    Moderator
  • So after waaaayyyy too much testing, if you're going to get Oracle, here are your best options...

    1.  ADO.Net DataReader with a ADO.Net for ODBC driver.  Create a system DSN, and you're good to go.  No problems with the NUMBER datatypes I mentioned above, as they are all converted to floats

    2. ADO.Net DataReader with the ADO.Net Oracle Client - Not as fast, and all numbers with decimal places will be cut off.

    3. OLE DB connection - Use the Microsoft Driver first.  It at least sets the precision and scale for you.  It is wrong if you have decimal places, but you can adjust that in the advanced editor.

    4. OLE DB Connection with Oracle OLE DB Driver - this is pure luck if it works, and most number fields will bomb out!  You can manually creat every column from scratch in the advanced editor, but by the time you get to the third column, you'll switch to one of the other methods....oh yeah...this is the slowest read times as well.....

    Scott Barrett
    Thursday, November 17, 2005 1:31 PM
  • Jamie,
    I have tried that, but it seems that my properties does not include this property.
     
    It doesn't matter if I use Oracle Ole DB provider or if I use MS Oracle provider.
    OLE DB Source does not show this property.

    Maybe it's the version of MS SQL Server 2005 (evaluation Build 9.00.1116 on April CTP Release)

    Been searching for update for sql server 2005, but couldn't find it anywhere.

    What else can I do?
    If I try using import wizard I get the same error message for code page.

    Thanks anyway and best regards
    Mitja
    Friday, November 18, 2005 12:43 PM
  • Mitja...

    You are MULTIPLE versions behind.  Get the released version!  April was as buggy as any release they have had.

    You'll find you answer in the new version.  Download the developer edition and give it a try....

    Scott Barrett
    Friday, November 18, 2005 1:12 PM
  • I have tried all of the methods, with non of them working!

    Is microsoft looking at a fix.  No problem pulling data with SQL 2000 DTS.

    Please Help!

    Friday, January 06, 2006 5:30 AM
  • Scott,

    please don't forget to mention, that if you are using ADO.Net DataReader from Oracle any
    character code will be converted to unicode internally. For those who use different code pages
    in SQL this means a lot of unnecessary work on converting unicode to the appropriate code page.

    I use OLEDB where you can determine the codepage in the properties of the DataSource.

    Fridtjof
    Friday, January 06, 2006 9:06 AM
  • Fridtjof....

     

    We have moved away from the ADO.Net DataReader as it cannot except expressions for the SQL statement.  We are using the OLE DB source, however it has the one drawback of not reading the scale of numbers correctly.  You manually have to change the output columns to contain the correct precision and scale.  After that, everything has been fine.  We typically move 100gb's of data daily with no problem using this.

    The key is to use the Microsoft OLEDB for Oracle driver for any reading and writing you do.  The only exception is on the SCD transformation, particularly the OLEDB command associated with the changed record update.  That needs to use the Oracle OLEDB driver, as the Microsoft one does not handle the parameters well.

    As for writing to the database, I use the new OracleDestination from Persistent.  In a word...FAST!!!!!  Millions of rows in a minute.

     

    Scott Barrett

    scott@barrettzone.com

    http://microsoftdw.blogspot.com

     

    Friday, January 06, 2006 1:11 PM
  • The problem is when it pulling data from oracle with a datetime field of :9999-01-01 00:00:00.000.

    It fails! With sql 2000 server DTS it moved the data with no failers!

    oracle : ole db Source (microsoft provider for Oracle: MSDAORA.1)

    SQL : ole db Destination (Provider SQLNCLI.1)

    Error 0xc0204018: DTS.Pipeline: The "output column "  "  has a precision that is not valid. The precision must be between 1 and 38.
     (SQL Server Import and Export Wizard)

     

    Friday, January 06, 2006 8:08 PM
  • that is a different error than a date.  Check the advanced editor on the component.  I would be the precision on one of the columns that is numeric is set to 0.

     

    Scott

    Friday, January 06, 2006 8:11 PM
  • I retested and this is what I am getting: with pulling one record from the oracle DB!

    Error 1:

    [OLE DB Destination [16]] Error: An OLE DB error has occurred. Error code: 0x80040E21. An OLE DB record is available.  Source: "Microsoft SQL Native Client"  Hresult: 0x80040E21  Description: "Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.".

    Error 2: (Source data value from oracle with Datetime: 9999-01-01 00:00:00.000)
    [OLE DB Destination [16]] Error: There was an error with input column "T$CRDD$C" (142) on input "OLE DB Destination Input" (29). The column status returned was: "Conversion failed because the data value overflowed the specified type.".

    Error 3:
    [OLE DB Destination [16]] Error: The "input "OLE DB Destination Input" (29)" failed because error code 0xC020907A occurred, and the error row disposition on "input "OLE DB Destination Input" (29)" specifies failure on error. An error occurred on the specified object of the specified component.

    Error 4:
    [DTS.Pipeline] Error: The ProcessInput method on component "OLE DB Destination" (16) failed with error code 0xC0209029. The identified component returned an error from the ProcessInput method. The error is specific to the component, but the error is fatal and will cause the Data Flow task to stop running.

    Error 5:
    [DTS.Pipeline] Error: Thread "WorkThread0" has exited with error code 0xC0209029.

    When I preview the data it shows <value to big to display>
    When preview in SQL2000 DTS it shows the value '9999-01-01 00:00:00.000'!

    What Can I do to fix this issue.
    Thanks for all the help so far.

    Trevor

    Friday, January 06, 2006 8:24 PM
  • Tevor,

     

    When you are executing the query to get the data, do a TO_CHAR and convert it to a string and then convert it back when you write it to the destination....

     

    Scott

    Sunday, January 08, 2006 9:57 PM
  • AlwaysUseDefaultCodePage=TRUE worked for me for OLEDB source but it didn't work for lookup. now lookup has that warning, but no option to select "AlwaysUseDefaultCodePage=TRUE". So what I do now?......
    Tuesday, August 29, 2006 8:31 PM
  • In my case, the message about precision is not a warning message, but a Error message, so I can´t click OK to continue.

    I have already set UseDefaultCodePage=true, but the error about numeric fields continue.

    Does any one knows how to solve it?

    Tuesday, September 26, 2006 6:10 PM
  •  TKDev wrote:

    I retested and this is what I am getting: with pulling one record from the oracle DB!

    Error 1:

    [OLE DB Destination [16]] Error: An OLE DB error has occurred. Error code: 0x80040E21. An OLE DB record is available.  Source: "Microsoft SQL Native Client"  Hresult: 0x80040E21  Description: "Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.".

    Error 2: (Source data value from oracle with Datetime: 9999-01-01 00:00:00.000)
    [OLE DB Destination [16]] Error: There was an error with input column "T$CRDD$C" (142) on input "OLE DB Destination Input" (29). The column status returned was: "Conversion failed because the data value overflowed the specified type.".

    Error 3:
    [OLE DB Destination [16]] Error: The "input "OLE DB Destination Input" (29)" failed because error code 0xC020907A occurred, and the error row disposition on "input "OLE DB Destination Input" (29)" specifies failure on error. An error occurred on the specified object of the specified component.

    Error 4:
    [DTS.Pipeline] Error: The ProcessInput method on component "OLE DB Destination" (16) failed with error code 0xC0209029. The identified component returned an error from the ProcessInput method. The error is specific to the component, but the error is fatal and will cause the Data Flow task to stop running.

    Error 5:
    [DTS.Pipeline] Error: Thread "WorkThread0" has exited with error code 0xC0209029.

    When I preview the data it shows <value to big to display>
    When preview in SQL2000 DTS it shows the value '9999-01-01 00:00:00.000'!

    What Can I do to fix this issue.
    Thanks for all the help so far.

    Trevor



    Hi Trevor,

    I 've the same problem, how dit you solved this problem. Thanks in advance.
    Olaf
    Wednesday, January 24, 2007 7:02 PM
  • What you did to solve the problems because i have the same problems ?
    No one have clearly explain how to solve this is issue on then lookup component !
    Wednesday, February 21, 2007 9:51 PM
  • I have the some problem when i get thedata from flat file to Oracle.

    I have changed the "AlwaysUseDefaultCodePage" to "True", and there is no warning.But i find when i run the package,seems there is a little longer time to finish(turn green) the using SQL SERVER as the destination.Anybody can tell me why?

     

    Thanks a lot.

    John.Wu

    Friday, January 18, 2008 9:42 AM
  •  John.Wu wrote:

    I have the some problem when i get thedata from flat file to Oracle.

    I have changed the "AlwaysUseDefaultCodePage" to "True", and there is no warning.But i find when i run the package,seems there is a little longer time to finish(turn green) the using SQL SERVER as the destination.Anybody can tell me why?

     

    Thanks a lot.

    John.Wu

     

    Inserting to Oracle isn't particularly quick with SSIS. Read more here:

     

    Oracle and SQL Server Integration Services

    (http://www.sqljunkies.com/WebLog/donald_farmer/archive/2005/03/13/8819.aspx)

     

    Persistent do a driver that can be used with SSIS to speed up this process.

     

    Persistent Oracle Connector

    (http://blogs.conchango.com/jamiethomson/archive/2006/04/07/SSIS_3A00_-Persistent-Oracle-Connector.aspx)

     

    -Jamie

     

    Friday, January 18, 2008 1:33 PM
    Moderator
  • Can you please tell us where we can download/obtain this driver (OracleDestination from Persistent)?  Thanks.

     

    Thursday, September 04, 2008 4:04 PM
  •  BHBD wrote:
    Can you please tell us where we can download/obtain this driver (OracleDestination from Persistent)?  Thanks.

     

    Ever heard of search engines?

     

    http://search.live.com/results.aspx?q=persistent+ssis+oracle&form=QBNO

     

    Thursday, September 04, 2008 5:47 PM
    Moderator
  • I know this is an old thread but I am having the issue in SQL 2008 when using import. I have an Oracle 8i DB that I am attempting to import a table into SQL 2008 and it fails with the same error

     

    Can you tell me how to fix this issue in SQL 2008?

     

    Thanks.

    Thursday, January 27, 2011 2:03 AM