cancel
Showing results for 
Search instead for 
Did you mean: 

R3LOAD: Unique index cannot be created because of duplicate keys

BjoernT
Participant
0 Kudos

Hi all,

we are doing an UNICODE migration. the export works fine but now the import produces many errors like:

(ALTER TABLE "DSVASTABLEVALUE" ADD CONSTRAINT "DSVASTABLEVALUE+0" PRIMARY KEY ( "VERSNR", "GRP", "ID", "CNTR", "T_ROW_NO", "COL", "SPRAS" ) )

DbSlExecute: rc = 99

(SQL error -603)

error message returned by DbSl:

Unique index cannot be created because of duplicate keys. MSGID= Job=187068/QSECOFR/QJVAEXEC

(DB) ERROR: DDL statement failed

(ALTER TABLE "DSVASTEXTCLUSTER" DROP PRIMARY KEY )

DbSlExecute: rc = 99

(SQL error -539)

error message returned by DbSl:

Table DSVASTEXTCLUSTER in R3T02DATA does not have a primary or unique key. MSGID= Job=187068/QSECOFR/QJVAEXEC

(IMP) INFO: a failed DROP attempt is not necessarily a problem

(DB) ERROR: DDL statement failed

(ALTER TABLE "DSVASTEXTCLUSTER" ADD CONSTRAINT "DSVASTEXTCLUSTER+0" PRIMARY KEY ( "RELID", "KEYTYPE", "VARKEY", "TEXTID", "SPRAS", "TVERSNR", "STATUS", "SRTF2" )

How can we solve this error ??

Thanks for help

Bjoern Trabes

GLS IT Services

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hello Björn,

are you doing an InPlace conversion or export & import with delete in between ?

You should check the tables and find ouut what rows are now in duplicate. Then you should "hunt" for these rows in the ASCII system and then we will find out the root cause ...

Are you sure, that the primary keys were active & valid on the source tables ?

Which codepages do you have in TCPDB ? Just 1100 ? or do you have this 1180 stuff in there ?

Regards

Volker Gueldenpfennig, consolut international ag

http://www.consolut.com http://www.4soi.de http://www.easymarketplace.de

BjoernT
Participant
0 Kudos

it was export and import with deleting the non unicode database.

at the moment i am restoring the non unicode database to do further testing ...

br

Bjoern

Former Member
0 Kudos

Hello Björn,

which SAP release are you using ?

Regards

Volker Gueldenpfennig, consolut international ag

http://www.consolut.com http://www.4soi.de http://www.easymarketplace.de

BjoernT
Participant
0 Kudos

Hi,

we are using ECC60.

Bjoern

BjoernT
Participant
0 Kudos

Hello Volker,

the system is up and running, how can i check the index for duplicate keys ?

Regards

Bjoern

Former Member
0 Kudos

Hello Björn,

I do hope, you do have the old system as well - at least the interesting tables ...

You are on 6.0. Did you use the InPlace conversion or Export, DLTLIB r3siddata & RSTLIB ?

What are the codepages, you are using in TCPDB ? .... I didn't see an answer on this question.

What are the names of the affected tables ? How many ?

You should look into the tables with SQL and check for the contents in the ASCII and in the Unicode version.

I would expect, that it "looks similar" ... if this is the case, you have to check on binary level and check for the differences ... I guess something like CR or LF or other crazy characters ... but now, it becomes consulting ... these are pretty tricky codepage questions )

Regards

Volker Gueldenpfennig, consolut international ag

http://www.consolut.com http://www.4soi.de http://www.easymarketplace.de

0 Kudos

You can check a table for duplicate keys by querying the contents in the following way:

Assume, you have a table T that has the primary key columns A, B and C, then you write a query:

SELECT A, B, B, COUNT(*) FROM T GROUP BY A, B, C ORDER BY 4 DESC

i.e. you select all primary key columns and the row counter, group it by the primary key columns and sort it by the row counter (specified through the position in the query) in descending order.

For your table DSVASTEXTCLUSTER, the query is:

SELECT RELID, KEYTYPE, VARKEY, TEXTID, SPRAS, TVERSNR, STATUS, SRTF2, COUNT(*)

FROM R3<sid>DATA/DSVASTEXTCLUSTER

GROUP BY RELID, KEYTYPE, VARKEY, TEXTID, SPRAS, TVERSNR, STATUS, SRTF2

ORDER BY 9 DESC

Kind regards,

Christian Bartels.

BjoernT
Participant
0 Kudos

Hi,

ok than i habe to check. The problem is, that i have only one system so i am doing the exort with the Kernel cd, deleting the database (r3siddata) and doing an import with the kernel cd.

so i cant check both system in parallel

We habe only two entries in TCPDB:

1100 1100

1401 1401

i played aroud with the log files and if i am right, the problem exists at 39000 tables....

When i look at the table via se16 i cannot find any duplicate key:

TX G 00002WP_REQ1 1 EN 1 R 0

TX G 00002WP_REQ1 2 EN 3 R 0

TX G 00002WP_REQ1 3 EN 3 R 0

TX G 00002WP_REQ1 4 EN 3 R 0

TX G 00002WP_REQ1 5 EN 2 R 0

TX G 00002WP_REQ1 6 EN 2 R 0

TX G 00002WP_REQ1 7 EN 3 R 0

TX G 00002WP_REQ1 8 EN 2 R 0

Bjoern

Edited by: Björn Trabes on Jul 22, 2011 10:19 AM

Edited by: Björn Trabes on Jul 22, 2011 10:19 AM

BjoernT
Participant
0 Kudos

When we are doing the import via the kernel CD, the R3load is the old one from the non unicode kernel. But we installed an unicode system.

Why is the kernel not changed ? Must the old kernel removed bevor starting the installation via the kernel cd ?

Regards

Bjoern

Former Member
0 Kudos

Hello Björn,

ok, so you are not ONLY having 2 entries in - you do have MORE than 1 entry in => this is a MDMP unicode conversion, that needs word tagging, a lot pre steps and effort and then finally the r3load export and DLTLIB r3siddata and then the import via r3load.

This needs to be done by an experienced consultant as you otherwise will lose data.

You are using more than one code page. In your case western europe and eastern europe. When I remember correctly, it was DE, EN, some other western european languages and polish for the eastern european site. Therefore, you have a real MDMP-system with lots of effort to convert ... (in the past it was planned on your site, to run codepage 1180 instead of 1100 & 1401, but I have never heard back anything then)

Regards

Volker Gueldenpfennig, consolut international ag

http://www.consolut.com http://www.4soi.de http://www.easymarketplace.de

Former Member
0 Kudos

Hello Björn,

forgot to mention one point:

When we are having 39000 duplicates, then there is something totally wrong with the conversion - it has nothing to do with the "normal" issues in a few tables ...

When you do not really know when to use the ASCII kernel and when the unicode kernel, I suspect, that an MDMP conversion will not be successful ...

Regards

Volker Gueldenpfennig, consolut international ag

http://www.consolut.com http://www.4soi.de http://www.easymarketplace.de

BjoernT
Participant
0 Kudos

Yes thats right. We have done many steps in before, language assignments and so on.

its for now a test migration to see how the system willl look like with unicode.

So i will do an import with the right kernel manually applied and will see how many errors i get.

thank a lot for the moment

-

-


i know when to use which kernel, but i thought when i use the installation master dvd to install a system as unicode from a previous exported system and had to name the kernel dvd than SAPINST should use this unicode kernel. But that was not so. Is this my fault or a strange behavior of the SAPINST?

Best Regards

Bjoern

Edited by: Björn Trabes on Jul 22, 2011 11:16 AM

Former Member
0 Kudos

Hello Björn,

I'm sorry to tell you, that this is your fault ... when you import unicode, it asks for a unicode kernel. To apply a different kernel manually while SAPinst is running, is more or less the wrongest, you can do ...

sorry, but you are lacking consulting here ...

Regards

Volker Gueldenpfennig, consolut international ag

http://www.consolut.com http://www.4soi.de http://www.easymarketplace.de

BjoernT
Participant
0 Kudos

thats exact the same i thougt.

it asked for the kernel dvd and DID NOT install the kernel. I dont know why....

Best Regards

Bjoern