Tag Archives: support

Things keep changing around here!

Fellow Community members, readers and otherwise interested!

Today I share a change in the organisation of this community.

Last week I returned the moderator and space editor privileges and the duties that come with those.

Lucas, who has done a awesome job as a moderator since he came aboard last year, will take it from here.

If this was a live audience I would ask for a round of applause for him – here instead I can only wish him the best.

As to why I took this decision (in case you’re wondering – this will take moment, so grab your coffee or ):

When we started the SAP HANA journey in 2010 internally and then 2011 with the global availability of the product, there was no community around it.

In fact, there was very little at all around it. Barely any documentation, nearly no SAP notes and only a few people that had a clue what this new thing did and how it did it.

Finding the right information, people who knew something and correct answers actually was hard.

I had some experience with SDN and sites like AskTom.com, so I knew that answering questions, explaining concepts and discussing specific questions can go a long way when it comes to “enablement” and knowledge sharing.

So, with the hope to spark active community participation I volunteered to do just that in 2011.

Fast forward five years on, there are now around 50 blog posts on SAP HANA, several topic leader batches, other communities (SAP internal JAM, stackoverflow) and a SAP Press book ‘under my belt’. I managed to talk a couple of SAP colleagues into spending their time here and provided answers as well as opinions to thousands of discussion threads. And let’s not forget the countless emails I wrote to colleagues, partners and people I don’t even know who asked me questions about HANA – only to be redirected to this very forum 🙂 .

And the community is thriving! There’s a good set of regulars (both SAP employees and externals) who share their expertise on a daily basis – just look at the current 12-month leadership board. Every week several blog posts and documents are created and shared.

Of course there’s more:

SAP notes on SAP HANA had been massively improved (thanks to Martin for his fabulous FAQ series), the SAP HANA docu. development team churned out guide after guide (Small surprises, well documented, a tip to the hat to Ralph Schroeder and the whole team) and the SAP HANA Academy brought video learning into the SAP HANA area – awesome!

In short, the community has grown and developed into a full fledged developer and admin community.

While I like to think that I had a share in that, I also think that my definition of “done” has been reached.

That bridge got built – let’s move on“, if you see what I mean.

In the wake of the upcoming conversion to 1DX the technical platform for this community will change and that is something that others will do better than I would. I assume that the SAP HANA product management and development teams might continue to provide more and more official material into via this channel. Also, there’s tons of high quality user generated that will be converted and available in the new forums.

All in all really nice times for anyone starting off with SAP HANA nowadays.

https://i0.wp.com/s2.quickmeme.com/img/4f/4f15ca326d661fd71177bcd909ec6023cc4b1688aee152ebb815e15a8fc380f8.jpg?w=474

And that’s all folks!

See you around.

Lars

 

HANA dude analyses Python error and this happened next… (plus: something with Andy Warhol)

Fresh out of the Christmas/New Year vacation I yesterday received this question from one of my colleagues:

Hi Lars

I am trying to set up a demo to show MDC at FKOM. I am trying to configure MDC via the Python script method – although I have an issue where I am missing a file – the error from the convertMDC.Py script says “no module named ConfigMgr.Py”

I remember you demoed this method at the Architecture Summit in Sydney – did you come across this issue?”

(He was talking about this nice event and the Multi Database Container feature of SAP HANA.)

Now as I was on my way to see the very nice Andy Warhol – Ai Weiwei exhibition currently on display in Melbourne, I couldn’t logon to my test system to look into the issue.

Due to my “root-cause-analysis reflex” from my stint in SAP support, I followed up today and was able to verify my initial hypothesis: there must be a search path setting not quite right.

These are the steps I took:

1. check the convertMDC.py file:

The first two lines in this Python file are


import os, time, sys, subprocess, getopt
import ConfigMgrPy

which is where the error message comes from.

Python is trying to load the listed modules but fails with the ConfigMgr module.

Checking the Python documentation I figured out that there are a couple of places Python looks for the modules.

One option to specify these places is the environment variable PYTHONPATH. Therefore I checked this variable on my system:

2. check PYTHONPATH environment variable:


>echo $PYTHONPATH
  /usr/sap/T07/SYS/global/hdb/custom/python_support:/usr/sap/T07/HDB07/exe/python_support:/usr/sap/T07/HDB07/dewdftzldc05:/usr/sap/T07/HDB07/exe:/usr/sap/T07/HDB07/exe/testscripts

Reformatting this string gave me this list:


/usr/sap/T07/SYS/global/hdb/custom/python_support
/usr/sap/T07/HDB07/exe/python_support
/usr/sap/T07/HDB07/dewdftzldc05
/usr/sap/T07/HDB07/exe
/usr/sap/T07/HDB07/exe/testscripts

Nice, but didn’t really gain a lot of insight here…

3. Checking the path from within Python:

In hindsight this should have been the first thing to do, but hey, I am thinking and learning on my feet here…


> python
Python 2.7.10 (sap:1, Jul  6 2015, 10:21:20)
[GCC 4.7.2 20130108 [gcc-4_7-branch revision 195014]] on linux2
Type "help", "copyright", "credits" or "license" for more information.
Traceback (most recent call last):
File "/etc/pythonstart", line 7, in <module>
import readline
ImportError: No module named readline

I decided to ignore this error message. Not sure why this happens on my system!

From the Python documentation I knew that I need the sys module for further investigation, so I load this and print the current search path via sys.path:


>>> import sys
>>> sys.path
['', '/usr/sap/T07/SYS/global/hdb/custom/python_support', '/usr/sap/T07/HDB07/exe/python_support', '/usr/sap/T07/HDB07/dewdftzldc05', '/usr/sap/T07/HDB07/exe', '/usr/sap/T07/HDB07/exe/testscripts', '/usr/sap/T07/HDB07/exe/Python/lib/python27.zip', '/usr/sap/T07/HDB07/exe/Python/lib/python2.7', '/usr/sap/T07/HDB07/exe/Python/lib/python2.7/plat-linux2', '/usr/sap/T07/HDB07/exe/Python/lib/python2.7/lib-tk', '/usr/sap/T07/HDB07/exe/Python/lib/python2.7/lib-old', '/usr/sap/T07/HDB07/exe/Python/lib/python2.7/lib-dynload', '/usr/sap/T07/HDB07/exe/Python/lib/python2.7/site-packages']
>>>

Ok, so there we find all our PYTHONPATH folders as well as some other folders that seem to belong to the Python installation.

4. Load the missing module

Now I thought: “Hey, lets try and load this module manually!


>>> import ConfigMgr

Ok, no error message so far.

Then the following should work!


>>> dir (ConfigMgrPy)
['CUSTOMER', 'Configuration', 'ConfigurationException', 'HOST', 'LayeredConfiguration', 'READONLY', 'RemoteConfig', '__doc__', '__file__', '__name__', '__package__', 'createUUID', 'expandProfileVars', 'getDaemonInfo', 'getLinkInfo', 'getRootPath', 'sapgparam', 'stringToBool']

Geeze, I am such a great Python hacker… *cough* 😐

But where does the module come from?

Easy as pie:


>>> ConfigMgrPy
<module 'ConfigMgrPy' from '/usr/sap/T07/HDB07/exe/ConfigMgrPy.so'>

5. ALL WRONG – this only works on a system where you DON’T have the problem!

Clearly, my fancy schmanzy root cause analysis would not have helped my colleague, because on his system Python didn’t find the module in the first place.

So what to do in this case?

I’d say, looking for the ConfigMgrPy file or folder or whatever Python loads for modules might be a good idea.

Since there is no hint in the Python documentation that ConfigMgr belongs to the standard Python stuff, I have to assume that it belongs to SAP HANA.

Which limits the search area for the object to the SAP HANA installation folders.

On my system that would be the /usr/sap/<SID>/ folder.

Searching for files on Linux always makes me google for examples and this is what I came up with this time:


find -L /usr/sap/T07 -name 'ConfigMgr*'

So far so good, but what’s the -L for?” you might ask.

When trying this thing out on my system, I didn’t use the -L immediately and found… nothing at all.

Only after trying a couple of name pattern that definitively should have yielded some hits it dawned on me that there might be something else preventing the find program to find the files.

And in fact, find does not follow symbolic links in files systems by default.

Looking into the installation folder on my system I can see that symbolic links are what we use for SAP HANA:


ls -la /usr/sap/T07
total 16
drwxr-xr-x  4 t07adm sapsys 4096 Apr 15  2015 .
drwxr-xr-x 17 root   sapsys 4096 Dec 10 18:30 ..
lrwxrwxrwx  1 t07adm sapsys   22 Apr 15  2015 HDB07 -&gt; /hana/shared/T07/HDB07
[...]

Means: without the -L option, find doesn’t go down this path.

Having figured this out, find of course gave me what I was looking for:


find -L /usr/sap/T07 -name 'ConfigMgr*'
/usr/sap/T07/SYS/exe/hdb/ConfigMgrPy.so
/usr/sap/T07/HDB07/exe/ConfigMgrPy.so

And with this information my colleague could have modified the PYTHONPATH variable on his system to fix the problem (which he wrote me is what he has done meanwhile anyhow…).

There you go – now you know.

Happy New Year everyone and have a great 2016!

 

The parameters you know

The age old question(s)

It has been a long standing open question for many SAP HANA administrators:

     “Where do I find a list of all the parameters that I can set in the .ini files?

Along with the

“Do I need to restart the system after changing this parameter?”

my feeling is that these questions are among the most often asked questions.

Typically, the answer here was:

     “It’s not required nor recommended to fiddle with the SAP HANA parameters unless SAP tells you so.”

All nice and good, but still the avid DBA would just love to know what the parameters do that can be seen SAP HANA Studio.

A surprising answer

Via the ongoing effort of the SAP Global Service & Support Mission Critical Control HANA Deployment Rooms (otherwise known as SAP GSS MCC HANA Deployment Rooms – but that would be too short 😛 for such an important team) to share know-how and experiences, I got to know SAP note 2036111 – Configuration parameters for the SAP HANA system.

This SAP notes carries a PDF file attachment, which neatly lists most of the parameters and what is to be known about them.

Here’s how it looks like:

As you see, there’s information about the necessity of a restart, links to related information, a brief description and which revisions support the parameter.

It’s not the complete list of possible parameters and it’s not part of the standard documentation, but I really appreciate to have a nice reference for the most important parameters now.

Surprise reprise

When I was done enjoying my recent discovery I thought “well, this should be in the standard documentation…” and did a quick search.

Guess what: the SAP note is already mentioned in the SAP HANA Administration Guide. (alright, it’s just once and it’s really tiny print, but it is in fact in there 🙂 ).

Shows again that it really can pay off to read the documentation carefully.

Anyhow, there you go; now you know!

Cheers,

Lars

p.s.
Should the parameter documentation not be part of the standard documentation set (and not just an attachment to a hard-to-find-SAP note) by the time for a second edition of SAP HANA Administration, Richard Bremer and I definitively need to reference this SAP note, too.

Community criss cross puzzle posting in multiple locales

SAP loves to make a point of eating its own dog food and so lowly SAP clerks like yours-truly are offered the experience to participate in multiple user communities be it SCN or one of the many SAP JAM groups.

In one of the SAP internal groups, I recently answered a question, that I believe will be interesting to SCN readers, too.

So this is it:

“… a user wants to have the client display in English format.

Decimal values are displayed in German format “123,5”, but they want to have it the English format “123.5” – ‘decimal point is a point’.

[…]

I set the properties for the system in HANA Studio (or Eclipse) with Properties –> Additional Properties –> Locale “English”.

I also tried to set the User Parameter ‘LOCALE’ for the user to “EN” or “EN-EN”, also without effect.

Has anybody an idea, which client setting has to be chosen to get decimal values displayed in English format? …

To answer this question there are a couple of things to be aware of.

Pieces of the puzzle

Piece 1: SAP HANA Studio has a preference setting to switch on or off result data formatting.

Piece 2: SAP HANA Studio is an Eclipse-based product.

Piece 3: Eclipse is written in JAVA.

Piece 4: JAVA provides a rich set of API functions to format data, exposed via Formatter objects.

Piece 5: The Java Formatter objects are using so-called Locales, which are objects that bundle localization specific settings.

Putting the pieces together

Whether or not the SAP HANA studio formats the data in the SQL result set grid depends on the setting SAP HANA -> Runtime -> Result -> Format values.

Now, having activated the formatting, we can see that e.g. numeric data with decimal places gets formatted.

When I am logged on with a German Windows language setting, I will see that the number 1234.56 will be printed out as ‘1.234,56’ – as the thousands delimiter for Germany is the dot ‘.’ and the decimal separator is the comma ‘,’.

With English language settings, this would have been the other way round.

If you ask yourself “Why would I ever switch this off?“, then it’s probably good to know that formatting lots of data is not a trivial task and can take up a considerable time when printing your results. That might slow down your development cycle of re-running queries considerably…

“Stop talking, show us how it looks like!”

… I hear you say, so here you go:

Formatting Enabled, German locale settings

Behold and compare to the output with formatting switched off:

Formatting disabled, output as raw as possible in SAP HANA Studio

SAP HANA Studio provides a place where one can specify the session language for a user connection and it is even called ‘Locale‘:

Irritatingly this setting only affects the SAP HANA behaviour within a SAP HANA DB session. That is, text joins and language filters use that setting to return language-dependent data.

An important part of understanding why this setting doesn’t help here is to understand that the whole business of printing data out to the screen is done by the client application and not by the database server. This includes formatting the output.

Technically speaking, numbers don’t have a format to the database.

In the database, numbers have a scale and a number of significant fractional digits.

If and how those are printed out is a different matter – just like your good old TI-30 would calculate with 11 significant digits internally, while displaying 8 of them at max.

Having said that, I would agree with the notion that when we have a setting called LOCALE this should either change the ‘whole experience’ or there should be more specific setting options. Something like ‘output locale’ or so… (like here API: Internationalization).

Anyhow, the point is: the LOCALE setting with the connection doesn’t fix our formatting requirement.

Fiddling with the invisible pieces

So, we know that the data gets formatted via a JAVA Formatter, but apparently, the LOCALE setting doesn’t set this thing up for us.

Checking the JAVA SDK documentation (LOCALE and FORMATTER again) the avid reader figures out:

If the application doesn’t specify the LOCALE for the FORMATTER it uses the LOCALE that is currently active in the JAVA VM.

As it turns out, the default JVM behaviour is to try to figure out the locale setting of the operating system user that is running the JVM.

But there are options to overwrite this, as we find here.

Working the puzzle from the edges

So, we can specify command line arguments when starting a JVM to set locale parameters:

-Duser.language=EN , -Duser.country=UK and -Duser.variant=EN

This is all great, but how to start the SAP HANA Eclipse with such parameters?

Putting in the final pieces

This last piece is actually easy.

Eclipse uses a parameter file called eclipse.ini located in the folder where you find the Eclipse executable.

SAP HANA Studio simply uses a renamed version of those files, so the parameter file we’re looking for is called hdbstudio.ini just as the executable is called hdbstudio.exe.


-startup
plugins/org.eclipse.equinox.launcher_1.3.0.v20140415-2008.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.200.v20150204-1316
-vm
plugins/com.sap.ide.sapjvm.jre.win32.x86_64_81.0.0/jre/bin
--launcher.XXMaxPermSize
512m
--launcher.defaultAction
openFile
--launcher.appendVmargs
-vmargs
-Xmx1024m
-Dfile.encoding=UTF-8
-Xms256m
-XX:MaxPermSize=512m
-XX:+HeapDumpOnOutOfMemoryError

Looking into this file we find that it contains a part that starts with -vmargs.

This section allows specifying parameters for the JVM used by Eclipse respectively SAP HANA Studio.

Putting in the desired locale parameters like this


[...]
-vmargs
-Xmx1024m
-Dfile.encoding=UTF-8
-Duser.language=en
-Duser.country=UK
-Duser.variant=EN
-Xms256m
-XX:MaxPermSize=512m
-XX:+HeapDumpOnOutOfMemoryError

will make provide the setting we are looking for.

Be aware that in order to be able to save this file on MS Windows you will need to have elevated privileges.

The final picture

To set the new settings active it is required to restart SAP HANA Studio.

We can see that the formatting option now uses the specified locale.

Formatting Enabled, English locale settings

Unfortunately, the setting is active for all connections used by this SAP HANA Studio.

So we don’t have a proper user specific setting for the data formatting – a workaround at best.

This puts SAP HANA Studio clearly into not being a data consumer/end-user tool.

It’s an administration and development tool, just like it had been positioned since day one.

Having the picture completed, we can take a last look at our puzzle and pack it away again.

There you go; now you know.

Cheers,

Lars

p.s.

An alternative approach would have been to set the JVM arguments via environment variables. This approach would allow to easily create several different startup scripts that first set the parameter and then start SAP HANA Studio.
If you got the gist of this post, you shouldn’t have issue plugging this together.

Small surprises, well documented

We all noticed it: SAP HANA has grown.

A lot, actually.

Let’s begin with a little sentimental look into the past

What had begun as an in-memory database management system with some funky development artefacts like attribute-, analytic– and calculation views has grown into a huge feature packed platform for data management and processing.

With it, the description of what SAP HANA does and how it can be used had to grow: the documentation.

Checking my Docu OLD folder, this is what I find:

That’s more than 18 times as much documentation content for SPS 8 than there was for SPS 2 back in 2011.

Size does matter or does it?

But it’s not just about the sheer size of the documentation.

The documentation page itself had been improved quite a bit:

Besides the better layout and content organisation, the documentation page (as well as the documents themselves) now contain the revision this documentation belongs to and the date of the last update.

While it may not seem to be a big deal, in fact, this is not the “usual SAP” way of updating the documentation only together with SPS levels.

This means, new and improved documentation can get to you much faster.

Surprises long wished for

The next thing is something I really love to have it: the option to simply download the whole documentation package as a single zip file.

As you can tell from my Docu OLD folder above, I like to have the documentation locally available and not just online or inside SAP HANA Studio.

With the search functionality of Windows 7 having all the documents in one folder makes it really easy to run a quick search in the documentation for some information.

(Note: depending on your Windows and Acrobat Reader version, you might need to install the PDF iFilter 64Bit from Acrobat to index the contents of PDF files in Windows Search)

If you’re like me and barely ever use the table of content links shown above, but just scroll down the page to find the actual links, then this is the section you are looking for from now on:

As far as I can tell, this section is now available on nearly all documentation packages, mostly “somewhere down the page”…

Maybe this can be changed to a better location some time.

Both of those features were things I (and I am sure others did as well) had asked for and seeing them now I feel a little bit proud, too 😀 .

Spoilt for choice

Another new “thing” with SAP HANA SPS 9 is that now there are additional features and functionality that is not part of the core SAP HANA package.

These SAP HANA Options can be licensed separately and thus require their separate set of documentation.

In order to keep the level of confusion as low as possible, the documentation developers have put a new sub-section into the left-hand sided navigation bar.

All SAP HANA Options documentation can be found just there.

And that’s it again!

I really do like the improvements even though I wonder why I always have to find out about them by accident.

After all, we’re all busy and if there’s something new worth reading, I don’t want to wait to find out about it a year later…

It would be a great thing to have more pointers to such things, just like the recent blog from the SAP HANA documentation developer team about the Information Map (Quick Access to the SAP HANA Development Documentation (for SAP HANA Studio))

There will always be more points on the wishlist (how would you feel about an RSS feed on the documentation page, announcing new document versions when they get uploaded? I’d love that!). And I find it a great thing to see them turning into reality one by one.

There you go; now you know!

Cheers, Lars