How to replicate data from an Oracle table which has a long field
When using SLT to replicate data from Oracle DB to HANA, you might see SQL error 932 occurred on a specific table and the initial load was failed.
The reason is that you have defined a long field in the table, e.g. VARCHAR(2000).
Following is an example of the problem and the workaround.
- We create table SLT_DEMO with 3 long fields – BBB, CCC and DDD, and insert 2 records into it as below.
- We start to load the table in SLT.
However the load failed. We can see SQL error 932 below in tag “Application Log” or by clicking “View Errors” button.
We also can see the following shortdump occurred in ST22. - Now let’s check the proxy table of SLT_DEMO.
You can see the data type of CCC and DDD were converted to “STRING” which should be “CHAR”.
However BBB was converted to “CHAR” correctly.
Data type “STRING” is for “LONG” and “CLOB”, so when SLT tried to read data from SLT_DEMO on the source DB, it hoped field CCC and DDD should be “LONG” or “CLOB”.
However it found the data type of CCC and DDD were”VARCHAR”, then error “inconsistent datatype” occurred. - We can use table IUUC_DB_COL_TYPE to specify the data type of a field in SLT as below.
We need to stop the load and add 2 records in table IUUC_DB_COL_TYPE for CCC and DDD in SE11.
We need to specify the values as below.
Field “DBCON NAME” and “DB SCHEMA” can be found in tag “Administration Data” in LTRC.
Now we have 2 convert rules in table IUUC_DB_COL_TYPE. - Let’s start the load in LTRC again.
You can see the data was loaded without any problem.
We do not have a plan to enhance this functionality at the moment and the design may change, so there is no Note or KBA to introduce the workaround.
If you have the same problem, you have to refer to this blog.
P.S. For the details about the Data Type mapping, please refer to note 2236069.
Hi Expert,
I am facing a similar issue while replicating a table from Hana to ECC.
Below is the structure of table in hana -
field_name SQL_Data_type dimension column_store_Data_type key
MANDT NVARCHAR 3 string x(1)
MATNR NVARCHAR 18 string x(2)
Description NVARCHAR 18 string
While replicating for the first time, I do not get any failure. But if i check my ST22, its full of dumps increasing at an alarming rate thereby bringing my servers down.
While checking my proxy table for this test table,
/1CADMC/0000235
PROXY for logtab (dbcon:user./1CADMC/0000235)
Field Key Data Type Length Decimal
IUUC_SEQUENCE y DEC 20 0
IUUC_TIMESTAMP CHAR 26 0
IUUC_PROCESSED CHAR 1 0
MANDT y CHAR 3 0
MATNR y CHAR 18 0
IUUC_OPERAT_FLAG CHAR 1 0
I have maintained entries in IUUC_DB_TAB_KEYS for fields MANDT and MATNR as per blog Special considerations for ABAP source/targets on HANA.
I fail to understand why IUCC* fields get added in my proxy table. This needs to have some note or workaround. In this case what entries should I maintain in table IUUC_DB_COL_TYPE ??
My DMIS version is DMIS 2011_1_731 SP10. I have already raised an incident with SAP.
Kindly advise.
Regards,
Saritha
Hi Saritha,
It's a different problem.
Table /1CADMC/0000235 is a logging table, so it has IUUC* fields.
You can find it in the source HANA DB.
The Proxy table in my blog is in SLT. In my case, you can find the table name in ST22 shortdump or the Application Log in LTRC.
Best regards,
King
Hello King,
SAP Note 2236069 SLT 2011 SP11 Changes to How Source System Data Types are Mapped to ABAP Dictionary Data Types.
Cheers,
Bhupinder
Hi Bhupinder,
Thanks for the note. 🙂
I updated the blog.
Regards,
King