GLPRDB001E Error code -1 from function SQLAllocHandle

GLPRDB001E Error code -1 from function SQLAllocHandle message appears in Tivoli Directory Server v6.3 logs and LDAP server doesnt start properly.

During the startup of TDS server, we could see the below message,

GLPSRV221I Replication of security attributes feature is disabled.
GLPSRV200I Initializing primary database and its connections.
GLPRDB001E Error code -1 from function:” SQLAllocHandle ”  .
GLPSRV064E Failed to initialize be_config.
GLPSRV040E Server starting in configuration only mode due to errors.

Database Initialization fails and TDS LDAP was not starting.

Resolution

After checking the Database and its logs, we could see that, DB was not starting at all and this error message was related to the same. Fixing the DB2 database start up, made TDS LDAP server up and running.

Problem was due to HOSTNAME not proper in db2nodes.cfg file present in db2 instance sqllib directory. After setting up proper hostname, then the ldap server was able to initialize the Database and there were no error messages seen after Initialization.

GLPSRV200I Initializing primary database and its connections.
GLPRDB126I The directory server will not use DB2 selectivity.
GLPCOM024I The extended Operation plugin is successfully loaded from libloga.so.
GLPCOM024I The extended Operation plugin is successfully loaded from libidsfget.so.
GLPSRV180I Pass-through authentication is disabled.
GLPCOM003I Non-SSL port initialized to 389.

I have mentioned DB2 Hostname issue in separate blog entry. Please refer the same to fix DB2 startup and then LDAP should work without any issues.