Skip to Content

HANA Unique Index gets not generated using PD

Hi,

I would need to get sure, I'm not doing anything wrong.

We have a simple HANA table with one unique index on it:

Now, we are generating the DDL script for this table... the code for creation of the index gets generated.. but it's not a unique index anymore...

Am I doing something wrong, or is it a bug?

Thanks,

Rafal

index1.GIF (64.6 kB)
index2.GIF (48.6 kB)
Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • Best Answer
    Jan 13, 2015 at 03:43 PM

    Hi Rafal

    i dont know if its a bug or a feature 😉

    but here is the fix:

    Please Backup the file Hanadb10.xdb before doing this quickfix!

    go to Database>Edit current dbms

    locate to SAPHANA10::Script\Objects\Index\Create

    you will see:

    .if (%Parent.isCatalogTable%==true)

    create[ %INDEXTYPE%] index %INDEX% on [%TABLQUALIFIER%]%TABLE% (%CIDXLIST%)[%DescIndex%? desc]

    .endif

    in the value window

    change it like this:

    .if (%Parent.isCatalogTable%==true)

    create[ %UNIQUE%][ %INDEXTYPE%] index %INDEX% on [%TABLQUALIFIER%]%TABLE% (%CIDXLIST%)[%DescIndex%? desc]

    .endif

    Please Backup the file Hanadb10.xdb before doing this quickfix!

    HTH

    dj

    Add comment
    10|10000 characters needed characters exceeded