DB2 SQLCA has already been built in diag log

DB2 version - 10.1
OS version - AIX 6.1

After restoring db2 version 9.5 coldbackup on top of db2 v10.1 for upgrade, application users who logged in via 3rd party gui was getting the below error,

DB2 SQL error: SQLCODE: -5193, SQLSTATE: 42524, SQLERRMC: null

On the diag log bellow error was repeated when ever client was executing a query,

FUNCTION: DB2 UDB, routine_infrastructure, sqlerCallDL, probe:5
RETCODE : ZRC=0x801A006D=-2145779603=SQLZ_CA_BUILT "SQLCA has already been built"


when the user tries to query directly via the server it self,

SQL5193N  The current session user does not have usage privilege on any enabled workloads.  SQLSTATE=42524

So although the first error was not very clear it was caused by not having workload privilege.

By adding the user to a default workload as below, error can be resolved.
 bash-3.2$ db2 create role ROLE_REGULAR_USERS;  
 DB20000I The SQL command completed successfully.  
 bash-3.2$ db2 grant role ROLE_REGULAR_USERS to user virbuild  
 DB20000I The SQL command completed successfully.  
 bash-3.2$ db2 grant USAGE on workload SYSDEFAULTUSERWORKLOAD to role ROLE_REGULAR_USERS;  
 DB20000I The SQL command completed successfully.  

Comments

Popular posts from this blog

ORA-16433: The database or pluggable database must be opened in read/write

Wait for unread message on broadcast channel - Blocking Sessions

ORA-14126 - While splitting max value partition