Robert Kr�ger wrote :

>I posted this a few weeks ago but neither got an answer nor found it in the 
>archives so I think this email got lost on the way. sorry to those who might 
>get it a second time.

>I have a strange error when removing a foreign keys. I have a table that has 
>30 foreign key fields. when I start a programm that reads the schema's meta 
>data and removes foreign keys via jdbc (e.g. 'alter table EVENT_BRIEF drop 
>foreign key C6_EVENT_BRIEF') I get many errors like the one below:  

>SAP DBTech SQL: [-9205] System error: AK Catalog information not 
>found:000000000002D37900130002

>the same happens when I execute the command manually in DBVisualizer. the 
>foreign keys definitely exist (I checked using DBVisualizer and trying to 
>recreate them leads to an error '-6006 duplicate name' as one would expect). 
>the strange thing is, that this seems to happen to with all foreign keys of 
>that one table (in a schema of > 120 tables all of which have no problems 
>with having their foreign keys removed and reaplied).

>One might think that the catalog is corrupt somehow but we can reproduce this 
>behaviour with different database users and on different machines so it looks 
>like a bug to me. 

>what information must I provide so you can diagnose what's wrong? the schema 
>is rather large (about 130 tables) so there's not much sense in attaching the 
>entire schema.

>kernel version is  X32|LINUX 7.3.0    Build 025-000-085-912.

This indeed is a bug. I have been able to reproduce the error with the provided
information. The problem is that you created exactly 30 foreign keys.
As a workaround you can drop the 'last' foreign key first. Last means the last
foreign stored in the catalog, i.e. the last foreign key returned from

SELECT FKEYNAME FROM DOMAIN.FOREIGNKEYS WHERE TABLENAME = 'EVENT_BRIEF'

Afterwards it should be possible to drop the other foreign keys in any
arbitrary order.
The bug fix is easy and will be available with the next SAPDB version.

Thomas

-- 
Thomas Anhaus
SAP DB, SAP Labs Berlin
[EMAIL PROTECTED]
http://www.sapdb.org/
_______________________________________________
sapdb.general mailing list
[EMAIL PROTECTED]
http://listserv.sap.com/mailman/listinfo/sapdb.general


_______________________________________________
sapdb.general mailing list
[EMAIL PROTECTED]
http://listserv.sap.com/mailman/listinfo/sapdb.general

Reply via email to