Posts

Showing posts from August, 2015

ORA-14126 - While splitting max value partition

Oracle version -- Oracle 9i to 11g While splitting partitions, SQL> alter TABLE ARBOR.CDR_BILLED split PARTITION CDR_BILLED_MAXVALUE at (TO_DATE('2014-09-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')) into (partition CDR_BILLED_01SEP14,partition CDR_BILLED_MAXVALUE) TABLESPACE "C01_CDR_BILL" update global indexes; 2 into (partition CDR_BILLED_01SEP14,partition CDR_BILLED_MAXVALUE) TABLESPACE "C01_CDR_BILL" update global indexes * ERROR at line 2: ORA-14126: only a <parallel clause> may follow description(s) of resulting partitions 4:58:56 PM The reason for above error is while splitting max value partition, it is not allowed to explicitly provide a tablespace. The splitted partition will be reside on the same tablespace as the max value partitions. Below can be used without the tablespace clause to split the max value partition, alter TABLE ARBOR.CDR_BILLED split PARTITION CDR_BILLED_

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 t

SQL10004C An I/O error occurred while accessing the database directory. SQLSTATE=58031 - During DB2 Restore

Image
DB2 Version – 9.5 Fixpack 3 OS – AIX 5.3 SQL10004C An I/O error occurred while accessing the database directory. SQLSTATE=58031. This error was returned during the restoration of db backup on a new server. As per the docs and references this can be caused by several reasons including OS level permission, db and os level version etc.. But quick workaround that can be tested to resolve this error while performing a db2 restore is to try the restoration with different database directory without using the default one with the use "dbpath on" clause of db2 restore command.  By adding "dbpath on" to the restoration command as below, db2 "restore database CPSDB from '/data12/backup' dbpath on '/data12/cpsjun15' into cpsjun15 logtarget '/data12/cpsjun15/log' redirect"