In my previous blog entry, I described the HANA trial option in the Amazon EC2 cloud and how it worked for us. This post will give you more insights about what we did with this trial instance.
Some of our applications for the SAP NetWeaver Portal use a database as persistency. Due to SAP’s history as an application vendor, most of our customers currently use database platforms from Microsoft, Oracle or other non-SAP vendors. Today SAP becomes more and more also a platform vendor. With our product Click Stream we already support MaxDB with our Click Stream application and we are working on a fully featured support for SAP HANA as the preferred option for high performance and high scalability requirements.
For us, to migrate our product Click Stream to run also with HANA is a perfect test drive. It writes and reads data both in real time. Whenever a user launches a page in the SAP Portal, some information about this page view is written to the database immediately. If an administrator wants to see statistics about the usage of the SAP Portal, this analysis is performed in real time on the same tables on demand. In its small niche, this is the merge between OLTP and OLAP today that SAP wants to achieve with HANA over the next years!
Click Stream runs as a SAP certified Business Package on the AS Java server of the SAP NetWeaver Portal. It uses JDBC to connect to a database. This works fine with HANA as well. We just took the JDBC driver that came with the HANA Studio and the connection details that we found in the HANA studio. These details are displayed as soon as you are connected when you right click on a HANA system in HANA studio, select Properties, go to Database User Logon and then to the tab Additional Properties.
After a few modifications to the Click Stream configuration wizard and the database connection pool, we were able to connect via JDBC and issue SQL statements from the Java code to the HANA database. So, the next step was creating tables and other database objects. We use a stored procedure for this purpose. SAP calls the syntax SQL script, which is quite similar to what we knew from Oracle PL/SQL. HANA comes with a normal row store and the HANA specific column store that allows better parallel processing and compression of data. Some calculations are not supported by the column store. So, if you use those calculations, the data is implicitly converted to a row store, which slows down the query. With Click Stream we have been in the lucky position, that all performance relevant statements were supported by the column store, so we created all tables with the command CREATE COLUMN TABLE. We were a bit surprised, when we realized, that there are no foreign keys in HANA. However, they were not really required in Click Stream, because the relations are also enforced by the JAVA code.
After all the data definition statements were complete, we initialised the tables and continued with the INSERT, SELECT and UPDATE statements. For most statements one of the versions of either MSSQL, Oracle, IBM DB2 or MaxDB already worked fine for HANA without a modifications. For the remaining statements, we had a look into SAP’s comprehensive help portal to check the correct syntax.
Overall, it required less modifications to support HANA than for the previously added support of IBM DB2.
When you download Click Stream version 2.4.20 today, it already contains the new database code for SAP HANA.
In my next blog post, I describe a performance evaluation of Click Stream on HANA that we did with a real life data set from one of our customers.