I am trying to user the command db2star in my new DB2 Express instance and I receive:
SQL1042C An unexpected system error occurred.
Looking at db2diag.log I got:
2015-10-14-23.31.46.395310-180 I87772E394 LEVEL: Warning
PID : 1980 TID : 140735278235648PROC : db2start
INSTANCE: db2inst1 NODE : 000
HOSTNAME: Renatos-MacBook-Pro.local
FUNCTION: DB2 UDB, base sys utilities, sqleReleaseStStLockFile, probe:12463
MESSAGE : Released lock on the file:
DATA #1 : String, 40 bytes
/Users/db2inst1/sqllib/ctrl/db2strst.lck
I installed DB2 express in my MAC Machine (OSX El Captain) using the following guide:
How do I install db2 Express-C 10.1 on OSX Mavericks
A more up-to-date for Installing DB2 on Mac OS El Capitan is available.
This is the crucial step:
Enable OS authentication. (You need to be an admin user to run these commands):
cd /Users/$(whoami)/sqllib/security
sudo chown root /Users/$(whoami)/sqllib/security/db2ckpw
sudo chmod u+rxs /Users/$(whoami)/sqllib/security/db2ckpw
sudo chmod o+rx /Users/$(whoami)/sqllib/security/db2ckpw
Solved. Just run:
sudo chown db2inst1 /Users/db2inst1/sqllib/adm/*
where "db2inst1" is your DB2 user.
I'm also using DB2 V10.1 on my mac.
I have used it since mac OS 10.6 snow leopard.
And I encountered same situation recently and resolved with the same way that Renato tried.
Just sharing the capture from my dirty note.
db2diag.log
2015-10-15-22.17.13.185718+660 I6438E430 LEVEL: Severe
PID : 15931 TID : 4515377152 PROC : db2sysc
INSTANCE: db2inst1 NODE : 000
HOSTNAME: XXXXX
FUNCTION: DB2 UDB, base sys utilities, DB2main, probe:1884
MESSAGE : SQL1042C An unexpected system error occurred.
CALLED : DB2 UDB, oper system services, sqloRunInstance
RETCODE : ZRC=0x83000001=-2097151999
2015-10-15-22.17.13.186668+660 I6869E392 LEVEL: Warning
PID : 15929 TID : 140735111885568PROC : db2star2
INSTANCE: db2inst1 NODE : 000
HOSTNAME: XXXXX
FUNCTION: DB2 UDB, base sys utilities, sqleReleaseStStLockFile, probe:12463
MESSAGE : Released lock on the file:
DATA #1 : String, 40 bytes
/Users/db2inst1/sqllib/ctrl/db2stst.0000
After doing
$ sudo chown db2inst1 /Users/db2inst1/sqllib/adm/*
Password:
I could do 'db2start' successfully.