ODBC Import to SQL 2008 - Converting Import Datatypes
* SSIS n00b warning * Background info: Source db = Oracle RDB, connecting thru 32-bit ODBC Driver == successful (it's an OLD database we're migrating) Destination db = 64-bit SQL 2008 database Problem: While importing data (can use the import tool to connect and get data) I will occasionally encounter errors during import for one column. The source data column in Oracle RDB is "REAL" and the import/export tool successfully imports it as "REAL" as well. However when the import tool hits one of these errors (I think the numbers in that column end up being too big for the "REAL" datatype in SQL) the whole process STOPS and then exits - sometimes even reversing the transaction. What I Want: I need to import this data (38+ Million Rows) and just IGNORE the errors (perhaps dumping them to a log/error file) and keep on importing ~OR~ Is there any way I can convert the source data type from REAL to say nvarchar(128) (or something else that will hold a ridiculously big decimal value)? Other info: When I created the SSIS package (from the import tool) I couldn't simply select the columns to import, I had to use a Query ... here is an example (removing the actual table/column names for privacy/security purposes), also the "time" field isn't the one that's erroring - it's another that holds some decimal values: SELECT * FROM STUPID_ORACLE_TABLE WHERE SOME_START_TIME >= CAST('20080101' AS DATE VMS) AND SOME_START_TIME < CAST('20090101' AS DATE VMS) Because of the sheer amount of data I've had to break it down into chunks, and even still, it's taking forever to process through (nevermind the errors which have me restarting the whole process for an even smaller chunk). I've been searching and searching for how to solve this problem - and I can't just BCP the data in either because I get the same problem with this column that has random erroneous values in it. Any help, tips, tricks, resources, books you can provide will be much appreciated. I've been searching for days on what to do - even ordering a book on SSIS to help.
May 27th, 2011 6:02pm

Use the I/E Wizard (the import tool) to define your job, but don't execute it on the last step - save it to disk instead. Now use BIDS to open the DTSX file containing the instructions you just defined. In there, you'll see a Data Flow Task that has a Source component (perhaps one or two other components in the middle) then a Destination component. You can edit the Source component (because that's probably where the issue is) and work with the error handling on it. You should see something about error handling (depends on what kind of source it is - they're all different!). You'll be looking to either ignore errors on certain columns, or redirect rows with errors to the "error output". Post back if that's not enough to get you started. Talk to me now on
Free Windows Admin Tool Kit Click here and download it now
May 27th, 2011 6:20pm

Thank you for your quick reply! I'll try that out ... it will be a little trial and error because the client machine (where I'm doing the import/export) doesn't have BIDS. I have to save the package and open it on a standalone development server. I will post back when/if I have more questions.
May 27th, 2011 6:51pm

Worked like a charm. Thanks for your help.
Free Windows Admin Tool Kit Click here and download it now
June 5th, 2011 1:16pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics