Sounds like DB2 doesn't know where Java is installed.
See the following three links for related information.
Link One
Link Two
Link Three
I realize these are for Linux and you are on Max OSX, but Mac's OS is a variant of Unix, so the solution should be similar.
The short answer to this problem is that you need to set the DB2 registry variable DB2_GRP_LOOKUP
to local
.
As a local administrator on your PC (i.e. not using your domain account), start a DB2 Command Window and issue the following:
db2set DB2_GRP_LOOKUP=local
db2stop
db2start
The reason this occurs has to do with how DB2 enumerates which groups a user belongs to upon successful authentication. In a Windows Domain environment, the default group enumeration behavior is to ask the system that authenticated the user: If a user is authenticated by the local machine, DB2 asks the local machine what groups belongs to; if the user is authenticated by the domain, DB2 will ask the domain what groups the user belongs to - and it will not ask the local machine.
So, when you connect to DB2 using your domain ID, DB2 asks the domain controller what groups you belong to, so it does not see that your ID belongs to the Administrators group on your local PC.
When you set DB2_GRP_LOOKUP=local
, this modifies this behavior: It tells DB2 to always enumerate groups from the local machine, regardless of whether the user was authenticated by the domain or the local machine.
After doing this, DB2 will see that your Domain ID belongs to the local Administrators group, and you'll end up with full SYSADM privileges (and the ability to create a database).
Best Answer
@ Mark Barinstein many thanks to you because you made it easier for me
This worked with me with below two steps :-
1- [db2inst@localhost ~]$ db2 connect to TESTDB
2- [db2inst@localhost ~]$ db2 "CALL SYSPROC.SYSINSTALLOBJECTS('EXPLAIN', 'C', '', current_user)"