Fix #DB2 SQL1639N ( SQLCODE=-1639, SQLSTATE=08001, SQLERRMC=null) authentication issue

By | November 21, 2017

After migrating my full DB2 backup (binaries and data) to a new server I got into several issue. One was already described in the previous post here.


Even after fixing that start issue I was still not OK. My WebSphere data source that linked to the DB2 instance was not responding.

Trying to ping the data source resulted in the following reported error:

The test connection operation failed for data source MyDS on server dmgr at node localhostCellManager01 with the following exception: java.sql.SQLNonTransientException: DB2 SQL Error: SQLCODE=-1639, SQLSTATE=08001, SQLERRMC=null, DRIVER=4.13.127 DSRA0010E: SQL State = 08001, Error Code = -1,639. View JVM logs for further details.


Then I tried to see from the command line what is the result:

[root@localhost security]#. /home/db2inst1/sqllib/db2profile
[root@localhost security]# db2 connect to MyDB user db2inst1
Enter current password for db2inst1: 
SQL1639N  The database server was unable to perform authentication because 
security-related database manager files on the server do not have the required 
operating system permissions.  SQLSTATE=08001

OK so this is more clear. Instead of the cryptic SQL error reported to the client by the jdbc driver I got I more explicit description of the error code “1639”.


After some digging through the IBM DB2 documentation the solution was to change the ownership and rights of two executable scripts. Note that I use system-based authentication.

# cd /home/db2inst1/sqllib/security
# chown root:root db2chpw
# chown root:root db2ckpw
# chmod u+s db2chpw
# chmod u+s db2ckpw

Contribute to this site maintenance !

This is a self hosted site, on own hardware and Internet connection. The old, down to earth way 🙂. If you think that you found something useful here please contribute. Choose the form below (default 1 EUR) or donate using Bitcoin (default 0.0001 BTC) using the QR code. Thank you !



Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.