6

I have an existing Java application which uses Hibernate with DB2. My application has 40-45 tables in DB2.

We are planning to replace DB2 with SAP-HANA. In that case I would like to know your opinion on the following items:

  1. Is there Hibernate support with HANA? If yes, how stable is it for mid size Java application?

  2. What all roadblocks/ risks one should consider in migration?

  3. Any documentation or example for reference?

Please provide your recommendations.

Dhams
  • 251
  • 7
  • 15

1 Answers1

6
  1. Yes, it is supported. There is a Hibernate dialect for HANA available from version 4.3.0.CR1 (current stable is 4.3.5). From my personal experience, Hibernate and the dialect itself is stable, but you could have problems during the migration because some features are not supported by HANA, not by Hibernate. E.g., Auto increment is not supported, you are expected to use sequences instead. See optimise Hibernate Sequence ID generation.

  2. Besides HANA specifics like lack of auto increments, you could have complications with low insert speed into HANA when using Hibernate. The speed could, however, be increased by tuning batch size in the persistance.xml, e.g.

    <property name="hibernate.jdbc.batch_size" value="5000"/>
    
  3. Documentation is available here: http://help.sap.com/hana_platform

As a general notice, I would say that SAP HANA became much more stable within last year or two. However, I would still have a data replica or backup in the other database, and use HANA mainly for very fast analytics and queries, that are really a very strong side of HANA.

The migration process depends on each particular case. It could be painful, or it could be very easy. Generally, I think that it is almost always possible to find a workaround for any migration problem.

Community
  • 1
  • 1
Andrey Sapegin
  • 454
  • 8
  • 33
  • Thank you for your answer, it really helped me. Did you maybe get some more experience in the last ~1.5 year that you would like to share with us here? Would be cool! Cheers – Szundi Nov 10 '15 at 09:19
  • You are welcome, but what exactly do you want me to share? My answer should be still valid, there are newer HANA and Hibernate releases, but auto increment is still not supported, as far as I know. – Andrey Sapegin Nov 10 '15 at 09:35
  • Thank you for your kind fast reply! I was just fishing for new experiences you might have got since your last comment. :) Thanks for the auto increment info. – Szundi Nov 11 '15 at 17:21
  • @AndreySapegin does autoincrement is supported now – Vish Nov 28 '16 at 16:36