Technical Articles
SAP HANA, SAPCAR, and macOS
Extracting SAP HANA Client Software
In this blog, we explain how to extract the SAP HANA client on macOS. Files on SAP Software Downloads have the SAR extension. This provides a few challenges on the latest macOS versions but nothing we can’t handle. Any good? Post a comment, share on social media, and/or give a like. That’s how the community works. Thanks!. |
The new archiving tool SAPCAR
Older readers might remember when SAP introduced a new archiving tool to replace the previous CAR (Compressed ARchive) utility some two decades ago. The tools were not compatible, so for SAPCAR the extension SAR was chosen.
SAPCAR only exists as command line tool, there is no graphical version, and the syntax resembles that of the UNIX TAR utility with -x for extract, -v for verbose (show me), and -f for file, to list a few common ones.
Tar was developed to bundle a number of files into a single Tape ARchive file (but works on disk too). Tar does not compress files and so it is often used together with zip to create a zipped tarball, which somewhat resembles our SAR files.
As Linux and macOS are UNIX descendants, we find tar on these operating systems as well.
tar -xvf <file>
sapcar -xvf <file>
SAP Service Marketplace is being retired
To download SAP software, we need to navigate to Software Downloads on the SAP ONE Support Launchpad. This used to be the Software Download Center (SWDC) on the SAP Service Marketplace (SMP) but that was decommissioned in 2018. You might still find references to SWDC or SMP as not everybody read the blog post yet
Or maybe because the shortcut still works
IMDB_CLIENT20
From Software Downloads, we can download the in-memory database SAP HANA client 2.0. There is one for Linux, UNIX (several versions), Microsoft Windows, and macOS.
- File type: SAR
- Operating system: MACOS X 64-BIT
What version do you need? Always pick the latest as there is a “single public release” strategy which “removes ambiguity about which version to install, brings the benefits of new performance or stability improvements to all customers”.
SAPCAR 7.21
There is a SAPCAR utility for most operating systems and this includes (as of 7.21) macOS.
- File type: EXE
- Operating system: MACOS X 64-BIT
Because Microsoft Windows applications are not supported on macOS
From the Windows world we have learned that we can double-click executable files (EXE) to execute. Doing so, will return a friendly message that Microsoft Windows applications are not supported on macOS.
The developer cannot be verified
Because of the EXE extension, macOS assumes it is a Windows binary. When we open Terminal and do a file check with the file command, this confirms it is a Mach-O 64-bit executable: perfectly fine.
Executing the file however returns permission denied because the download comes with only RW permissions for the current user. This is easy to fix with a chmod u+x.
At this stage, macOS protection kicks in to as the file is unsigned and might as well be malware. Move to Bin? No. Cancel.
Allow Anyway
If you agree that SAP software can be trusted, open System Preferences > Security & Privacy and select Allow Anyway
Are you sure you want to open it?
Run the SAPCAR command again and select Open to allow.
Usage
Just running the command returns usage. To extract files from an archive:
SAPCAR -x[v][f archive]
As the version number and the .EXE file extension serve no particular purpose, let’s rename the file and, while at it, move it to the bin directory so we do not have to specify current directory when not in the path (./). As we move the file to a protected directory this requires superuser (su) permission:
sudo mv SAPCAR_1311-70002712.EXE /usr/local/bin/SAPCAR
Long Story, Short Story
For those that prefer a shortcut, here are the commands that rename the file, set the execution bit, the proper group, and remove the quarantine property. Thanks to Witalij Rudnicki for the last one.
cd ~/Downloads
sudo mv SAPCAR_*.EXE /usr/local/bin/SAPCAR
sudo chmod 755 /usr/local/bin/SAPCAR
sudo chgrp admin /usr/local/bin/SAPCAR
sudo xattr -d com.apple.quarantine /usr/local/bin/SAPCAR
SAPCAR -xvf IMDB_CLIENT20_*.SAR
Install the SAP HANA Client
<img />For everything you need to know about installing the SAP HANA client, we already posted a blog some time ago
If you still have questions after reading, try
Tools On-Demand
If you prefer, you can also download the SAP HANA client from the SAP Development Tools website: tools.hana.ondemand.com (for the story behind the URL, see At Your Service: SAP HANA in the Cloud).
For macOS, this download comes as a zipped tarball (.tar,gz).
To extract, run the command
tar -xzvf hanaclient-2.4.182-macosx-x64.tar.gz
Or in case you have configured macOS to automatically extract zipped files, with
tar -xvf client.tar
Common Crypto Lib
However, although the release number is the same (2.4), only the client from Software Downloads contains the SAP cryptography library Common Crypto Lib (CCL).
You will need this to connect with your client to the SAP HANA Service, for example. See
Post a comment, Share on Social Media, Like
Any good? Post a comment, share on social media, and/or give a like. That’s how the community works. Thanks.
If you would like to receive updates, connect with me on
- LinkedIn > linkedin.com/in/dvankempen
- Twitter > @dvankempen
Best,
Denys van Kempen
Hi Denys. Indeed macOS makes it less easy to work with “suspicious” files downloaded from the internet, like
SAPCAR
.I usually just check and remove the extended attribute
com.apple.quarantine
after downloading needed file, likeRegards.
Thanks Witalij Rudnicki, I have added a section with a script to get it over and done with in a couple of commands.
Thanks Denys van Kempen and Witalij Rudnicki . This is working for me !!!.
Very happy to get HANA Studio on MAC OS. I was using the 2nd windows machine (1st being my Mac) for HANA Studio.
I just downloaded the two files and went through the commands in Terminal. Thats it!
I still gives me "cannot execute binary file" in mac when following the mentioned steps.
"
Thanks a lot. It worked . Had downloaded a wrong version that was not meant for macos
Hello,
Hi Manish,
You only need to remove the “Windows” extension and make the file executable.
Make sure to download the version for macOS 64-bit.
Thank you for the instructions, just wanted to let others looking for a solution that I was able to get SAPCAR to work on Mac M1 too.
Hello Denys van Kempen
First of all thanks for these valuable Tipps around SAP and macOS.
It seem this is a common misunderstanding to keep the file extension "*.EXE" after you downloaded any Version of SAPCAR for a Unix derivate which also the macOS is
After downloading the File SAPCAR_1115-70006239.EXE for MACOS x 64-Bit, and rename it to SAPCAR as you would do this also for Linux64
Any experiences with the SAP HANA Studio 2.0 or Eclipse 2022-06 for macOS 13 and M1 Chip?
Best Regards Roland
Hi Roland Kramer,
No experiences. Working on a 2019 Intel MacBook Pro (purchased 2020). Have to wait until next year before the switch to M1 ...
Hello Denys van Kempen
my Lenovo Yoga X1 is running out of Support since beginning 2022 and I'm thinking of the new MacBook Pro with the M2 Chip ...
However currently no Version of SAP HANA Studio 2.0 or Eclipse 2022-06 will work with macOS 13 ... 🙁
Best Regards Roland
Guess it is time to switch to SAP Business Application Studio ...
... and/or use a cloud-hosted Windows VM running a supported OS for Studio/Eclipse.
Hello Denys van Kempen
our Head of IT made an Image Trailer how SAP works with Apple, didn't you saw it? ... 😉
I don't want to fix a small Problem with getting several additional serious Problem for it, this price I don't want to pay ...
best Regards Roland
Thanks! Your instructions have saved me!
Cheers!
Hello Denys van Kempen
In the meantime, I have updated my Blog several times and I was able to replace my old Lenovo X1 Yoga with a Apple MacBook 14' with the M2 Pro Chip.
Despite I have now my macOS Apps shortlist together, I have still challenges with the X-Windows Support. Maybe I'm missing only a small thing. Any Ideas to share?
Best Regards Roland
Great playlist Roland Kramer ; thanks for doing all the hard work to select the best tools for the job.
As for X-Windows, it has been a while...
Have worked with Cygwin (open source) and Hummingbird (commercial) in the distant past and am not familiar with how the market has evolved. Hummingbird still appears to be around, maybe this provides a starting point
Hello Denys van Kempen
I have now arranged myself with XQuarz and xauth to access X-Windows based applications. Unfortunately then Royal TSX Tools are not supporting X-Windows at this time, so a replacement like MobaXTerm is not in sight.
Best Regards Roland