db2 Error sqlcode: -1224 - db2

Has anyone seen this type pf error msg before. I cannot find documentation on sql code -1224?
DB21034E The command was processed as an SQL statement because it was not a
valid Command Line Processor command. During SQL processing it returned:
SQLCA Information
sqlcaid : SQLCA sqlcabc: 136 sqlcode: -1224 sqlerrml: 0
sqlerrmc:
sqlerrp : SQLJRERM
sqlerrd : (1) -2143879059 (2) 0 (3) 0
(4) 0 (5) 0 (6) 0
sqlwarn : (1) (2) (3) (4) (5) (6)
(7) (8) (9) (10) (11)
sqlstate: 55032

Always try to check IBM infocenter with such errors:
http://publib.boulder.ibm.com/infocenter/db2luw/v9r5/index.jsp?topic=/com.ibm.db2.luw.messages.sql.doc/doc/msql01224n.html
Short comment from my side:
A reboot could fix your problem, if you can in your environment.
If it's a production server, I suggest a db2stop and afterwards a db2start , this could also help
Normally, -1224 is a trap which comes from memory corruption.
If you run the function unfenced, try to switch to fenced.
Also, take a look at your trap files.
Also, this can happen if you have an invalid JVM level. Make sure you use a supported jdk level => move to the latest version

Related

DB2 UPGRADE DB “SQL0954C Not enough storage space is available in the application heap to process the statement. SQLSTATE=57011”

I’m attempting to upgrade DB2 10.5 to 11.1 and when I’m doing the DB2 UPGRADE on my database. I’m constantly getting a
SQL0954C Not enough storage space is available in the application heap to process the statement. SQLSTATE=57011
I have increased my APPLHEAPSZ and APPL_MEMORY to match my INSTANCE_MEMORY of AUTOMATIC(2449536) (and tried various other sizes in between) and I still get the error.
If I run a DB2MTRK -a command, I can see my apph memory increase to 4.8G before throwing the error. I am by no means a DB2 expert, so I’m assuming I’m probably doing something obviously wrong. Any help would be greatly appreciated.
Try to do the following before the next attempt:
db2 update db cfg for MYDB using APPLHEAPSZ automatic APPL_MEMORY automatic SELF_TUNING_MEM ON
If they are set as described already, then try to free some memory for APPLHEAPSZ / APPL_MEMORY growth by constraining the size of bufferpools:
db2set DB2_OVERRIDE_BPF=10000
db2stop
db2start
Don't forget to reset this variable afterwards:
db2set DB2_OVERRIDE_BPF=
db2stop
db2start
If it still fails, it's good to look at the corresponding messages in the db2diag.log
Thanks for the reply, I tried this, but still no success. Here is the entry from my log:
2018-11-08-15.48.48.612000-300 I5495453F1112 LEVEL: Warning
PID : 2792 TID : 1460 PROC : db2syscs.exe
INSTANCE: DB2 NODE : 000 DB : MYDB
APPHDL : 0-8 APPID: *LOCAL.DB2.181108203254
AUTHID : DB2ADMIN HOSTNAME: WIN-5MC66HH7NA4
EDUID : 1460 EDUNAME: db2agent (MYDB) 0
FUNCTION: DB2 UDB, SQO Memory Management, SqloMemController::requestMemory, probe:50
MESSAGE : ZRC=0x8B0F0000=-1961951232=SQLO_NOMEM "No Memory Available"
DIA8300C A memory heap error has occurred.
DATA #1 : String, 36 bytes
OOM - Instance memory request failed
DATA #2 : String, 35 bytes
Logging disabled until next success
DATA #3 : unsigned integer, 8 bytes
5148573696
DATA #4 : unsigned integer, 8 bytes
0
DATA #5 : String, 13 bytes
APPL-MYDB
DATA #6 : unsigned integer, 8 bytes
6909722624
DATA #7 : unsigned integer, 8 bytes
3475243008
DATA #8 : unsigned integer, 8 bytes
9480896512
DATA #9 : unsigned integer, 8 bytes
10033299456
DATA #10: unsigned integer, 8 bytes
3825991680

DB2 REORG command is not able to start

I am trying to reorg a table in DB2 as the number of alters on a table has exceeded more than 3 times.
DB2 CALL SYSPROC.ADMIN_CMD('REORG TABLE WASADMIN.EXCHANGERATES');
It is not giving any response and looks like it is hanged . I checked the status by running the command .
db2pd -db UB602 -reorgs
but there is no active Reorg process .
Database Member 0 -- Database UB602 -- Active -- Up 0 days 02:14:45 -- Date 2018-11-26-19.34.15.256000
Table Reorg Information:
Address TbspaceID TableID PartID MasterTbs MasterTab TableName Type IndexID TempSpaceID
Table Reorg Stats:
Address TableName Start End PhaseStart MaxPhase Phase CurCount MaxCount Status Completion
What could have gone wrong?
Edit:
I checked the logs but nothing is printed. but when I am pressing ctrl+c to terminate . I get some message in the logs .
2018-11-26-20.19.53.459000+330 I1F1191 LEVEL: Event
PID : 5176 TID : 4928 PROC : db2syscs.exe
INSTANCE: DB2_01 NODE : 000 DB : UB602
APPHDL : 0-1186 APPID: *LOCAL.DB2_01.181126124159
AUTHID : DB2ADMIN HOSTNAME: BLR2DEVLP0434
EDUID : 4928 EDUNAME: db2agent (UB602) 0
FUNCTION: DB2 UDB, RAS/PD component, pdLogInternal, probe:120
START : New Diagnostic Log file
DATA #1 : Build Level, 232 bytes
Instance "DB2_01" uses "64" bits and DB2 code release "SQL11010"
with level identifier "0201010F".
Informational tokens are "DB2 v11.1.0.1527", "s1606081100", "DYN1606081100WIN64", Fix Pack "0".
DATA #2 : System Info, 1760 bytes
System: WIN32_NT BLR2DEVLP0434 10.0 AMD64 Family 6, model 78, stepping 3
CPU: total:4 online:4 Cores per socket:2 Threading degree per core:2 SIMD:Y
CPU binding: not in use
Physical Memory(MB): total:16049 free:6448 available:6448
Virtual Memory(MB): total:28849 free:19248
Swap Memory(MB): total:12800 free:12800
Information in this record is only valid at the time when this file was
created (see this record's time stamp)
2018-11-26-20.19.53.469000+330 I1195F968 LEVEL: Info
PID : 5176 TID : 4928 PROC : db2syscs.exe
INSTANCE: DB2_01 NODE : 000 DB : UB602
APPHDL : 0-1186 APPID: *LOCAL.DB2_01.181126124159
AUTHID : DB2ADMIN HOSTNAME: BLR2DEVLP0434
EDUID : 4928 EDUNAME: db2agent (UB602) 0
FUNCTION: DB2 UDB, relation data serv, sqlrr_rds_common_post, probe:1700
MESSAGE : Severe TERMINATE err at nest lvl 1, in SQL from rtn SYSPROC.ADMIN_CMD
DATA #1 : SQLCA, PD_DB2_TYPE_SQLCA, 136 bytes
sqlcaid : SQLCA sqlcabc: 136 sqlcode: -952 sqlerrml: 0
sqlerrmc:
sqlerrp : SQLRL04B
sqlerrd : (1) 0x80100003 (2) 0x00000003 (3) 0x00000000
(4) 0x00000000 (5) 0x00000000 (6) 0x00000000
sqlwarn : (1) (2) (3) (4) (5) (6)
(7) (8) (9) (10) (11)
sqlstate: 57014
To perform an offline reorg, you have to ensure that nothing is using the table before the reorg command starts to run.
If an offline reorg is not possible, check if an inplace reorg can work instead.
If there are other reasons preventing the action, consult the db2diag.log file for more details. In your question it shows only sqlcode -952 which tells us that you cancelled the job with the control-C.
You can check if there are any row-locks or table-locks on the target table by using one of many different methods. You can use dsmtop or db2top, or dsm, or a command line (db2 get snapshot for locks and then parsing the output for your table name), or by using the MON_GET_LOCKS table function or equivalents.
The documentation states "
Be sure to complete all database operations and release all locks
before you invoke REORG TABLE. This step can be done by issuing a
COMMIT after you close all cursors opened WITH HOLD, or by issuing a
ROLLBACK. After you reorganize a table, use RUNSTATS to update the
table statistics, and REBIND to rebind the packages that use this
table. The reorganize utility implicitly closes all the cursors. "

xa_open failure with SQLCODE=-1032

I am using a Tuxedo(v12.2.2.0.0) on Linux(x64) to access DB2 on mainframe through DB2 Connect Server(v9.7).
Now i meet a problem that the TMS_UDB can not start up。
From Tuxedo ULOG, it says:
ERROR: tpopen TPERMERR xa_open returned XAER_RMERR
I checked db2dial log it shows:
2018-XX-XX-xxxx E4387E703 LEVEL: Error
PID : 12673 TID: 139892007870912 PROC: TMS_UDB
INSTANCE: db2inst1
HOSTNAME: XXXX
FUNCTOIN: DB2 UDB, XA DTP Support, sqlxaConnect, probe: 5329
MESSAGE : XA Interface SQLCA
DATA #1 : SQLCA, PD_DB2TYPE_SQLCA, 136 bytes
sqlcaid : SQLCA sqlcabc: 136 sqlcode: -1032 sqlerrml:0
sqlerrmc:
sqlerrp : SQLJCMN
sqlerrd : (1) 0x81360012 (2) 0x00000012 (3) 0x00000000
(4) 0x00000002 (5) 0x00000004 (6) 0x00000000
sqlwarn : (1) (2) (3) (4) (5) (6)
(7) (8) (9) (10) (11)
sqlstate: 00000
Any DB2 export, how can i make it fixed ? thanks
I have verified DB2 client CONNECT command($ db2 connect to DBXX user USERxx using PASSXX), and query out data using SELECT statement.
and also have following the Tuxedo guide to set DB2 configuration items.
https://docs.oracle.com/cd/E26665_01/artrt/docs11gr1/cicsref/db2conn.html
Converting the comment thread to an answer.
For a new installation of Tuxedo where XA transactions are required (managed by Tuxedo as TP monitor) with one leg being Db2 for Z/OS, it is necessary to configure both Tuxedo and Db2-connect to support XA transactions, in addition to basic actions for Db2 connectivity and in addition to any Db2 licensing activities.
Note that Linux/AIX/Windows: command-line connections (from the workstation to Db2 for Z via Db2-connect) will only verify connectivity and userid/password access, but this will not test XA. Command-line connections are Type-1 connections (i.e they are not using distributed units of work).
The configuration details can be version specific so always consult the version-specific documentation for both Tuxedo and Db2-connect products.
For Tuxedo, the documentation page is
https://docs.oracle.com/cd/E26665_01/artrt/docs11gr1/cicsref/db2conn.html
For Db2-Connect v9.7 (later versions are also accessible from here) the page is:
https://www.ibm.com/support/knowledgecenter/en/SSEPGG_9.7.0/com.ibm.db2.luw.qb.dbconn.doc/doc/t0006168.html
Typical configuration for Db2-connect includes:
`db2 update dbm cfg using tp_mon_name TUXEDO
db2 update dbm cfg using spm_name bjaix # hostname of the node running Db2-connect
db2 update dbm cfg using max_connections 500
db2 update dbm cfg using max_coordagents 200
// You may also want to enable the Db2-connect connection-concentrator depdending on your peak concurrency needs and the available resources
db2stop
db2start`
Additional configuration of Tuxedo is required, in part referencing some of the Db2-configuration, refer to the Oracle Tuxedo documentation for details.

sql0901n non-severe system error in db2

I am getting this error while taking the backup.
SQL0901N The SQL statement failed because of a non-severe system
error. Subsequent SQL statements can be processed. (Reason
"1117".)
Explanation:
An error has occurred which is due to a system error. Processing of the
SQL statement has ended for reason "" (this is in English only
and is useful only to IBM support personnel).
sqlcode: -901
sqlstate: 58004, 5UA0L
Can anyone help in this?

Powercenter SQL1224N error connecting DB2

Im running a workflow in powercenter that is constatnly getting an SQL1224N error.
This process execute a query against one table (POLIZA) with 800k rows, it retrieves the first 10k rows and then it start to execute to another table with 75M rows, at ths moment in DB2 an idle thread error appear but the PWC process still running retrieving the 75M rows, when it is completed (after 20 minutes) the errros comes up related with the first table:
[IBM][CLI Driver] SQL1224N A database agent could not be started to service a request, or was terminated as a result of a database system shutdown or a force command. SQLSTATE=55032
sqlstate = 40003
[IBM][CLI Driver] SQL1224N A database agent could not be started to service a request, or was terminated as a result of a database system shutdown or a force command. SQLSTATE=55032
sqlstate = 40003
Database driver error...
Function Name : Fetch
SQL Stmt : SELECT POLIZA.BSPOL_BSCODCIA, POLIZA.BSPOL_BSRAMOCO
FROM POLIZA
WHERE
EXA01.POLIZA.BSPOL_IDEMPR='0015' for read only with ur
Native error code = -1224
DB2 Fatal Error].
I have a similar process runing against the same 2 tables and it is woking fine where the only difference I can see is that the DB2 user is different.
Any idea how can i fix this?
Regards
The common causes for -1224 are:
Your instance or database has crashed, or
Something/somebody is forcing off your application (FORCE APPLICATION or equivalent)
As for the crash, I think you would know by know. This typically requires a database or instance restart. At any rate, can you please have a look into your DIAGPATH to check for any FODC* directories whose timestamp would match the timestamp of the -1224 errors?
As for the FORCE case, you should find some evidence of the -1224 in db2diag.log. Try searching for the decimal -1224, but also for its hex representation (0xFFFFFB38).