HiveBrain v1.2.0
Get Started
← Back to all entries
patternMinor

DB2 Express-C on Mac OS X

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
macexpressdb2

Problem

I have followed all the steps described on the Getting Started with DB2 Express v9.7 e-book and installed DB2 Express-C on my Mac. The installation succeeded without a problem.

I did setup OS X according to this blog post: http://programmingzen.com/2009/01/20/installing-db2-on-mac-os-x/

After the installation, I set up the DB2 instance environment as instructed and was able to start DB2 with:
$ db2start

But I was unable to run db2fs. It returns the following error message:

$ db2fs
sh: /Users/ivan/sqllib/java/jdk64/jre/bin/java: No such file or directory DB2JAVIT : RC = 127


What else do I have to setup in order to make it work on my system?

Solution

To make it easier for future users to find a working answer:

It appears that one method to fix this problem is to create a symlink from the DB2 location to the Java Home you wish to use. Since I told DB2 to use my user when I installed it (this is for a development copy), the command I used to fix this problem was:

sudo ln -s /Library/Java/JavaVirtualMachines/1.6.0_29-b11-402.jdk/Contents/Home/ ~/sqllib/java/jdk64/jre

Context

StackExchange Database Administrators Q#15791, answer score: 4

Revisions (0)

No revisions yet.