I need to extract a SQL Server table with with a LONG column into a Oracle table, converting the LONG to a CLOB. This will then allow me to manipulate the column using a PL/SQL script.
I can’t use long_to_varchar because I don’t want to lose the data after 4000 characters.
The problem is the LONG source column contains carriage returns. I need to temporarily remove these during the extract but I can’t because DI won’t allow you to place functions on LONG columns.
I’ve tried extracting into a flat file and straight into an Oracle database table.
What does actually happen in case you just read the data from SQL Server as a LONG datatype and load the data into the Oracle CLOB as LONG? No conversion, nothing…
I managed to get round this by doing a simple extract from SQL Server to Oracle with no bulk load, leaving the LONG column as a LONG. The problem I had was that the rows per commit was set to 1 because of the LONG column, but increasing the number of loaders (to 10!) allowed the data to load in a reasonable amount of time.
Stage 2 was to copy the data into another table with the LONG converted to a CLOB (using to_lob) in a DI script.
Stage 3 was an Oracle stored procedure which did the necessary processing on the CLOB column.