Thursday, November 4, 2010

Oracle Procedural Gateway: data cartridge error/MQI MQPUT failed. completion code=2, reason code=2148

Oracle Procedural Gateway for MQ started giving following errors after applying 10.2.0.4 patch on 10.2.0.1 Oracle Procedural Gateway Oracle Home (ORACLE_HOME) and execution of $ORACLE_HOME/pg4mq/admin/deploy/pgmdeploy.sql

MQPUT returned with reason code 0
ORA-29400: data cartridge error MQI MQPUT failed.
Completion code=2, reason code=2148

In my installation 10gR2 Procedural gateway running on it's own home directory

Procedural Gateway logs showing "version: 2" instead of "version: 1"

MQI: =================================
MQI: StrucId : 'OD '
MQI: Version: 2 <-----
MQI: ObjectType : 1

After digging into Reason code=2148 It turn out to be.

An MQPUT or MQPUT1 call was issued, but the message data contains an MQIIH structure that is not valid.

Possible errors include the following:

The StrucId field is not MQIIH_STRUC_ID.
The Version field is not MQIIH_VERSION_1.
The StrucLength field is not MQIIH_LENGTH_1.
The BufferLength parameter of the call has a value that is too small to accommodate the structure (the structure extends beyond the end of the message). This reason code occurs in the following environments: AIX, HP-UX, z/OS, OS/2, i5/OS, Solaris, Windows, plus WebSphere MQ clients connected to these systems.


I tried different ways to fix this version issue.

Option 1:-
Opened following packages under SYS and tried after changing on package at a time.
a. On PGM_SUP package change following at line 77
MQGMO_CURRENT_VERSION constant binary_integer := 2;
to
MQGMO_CURRENT_VERSION constant binary_integer := 1;

b. On PGM package search for PGM_SUP.MQOD_VERSION_2 and change it to PGM_SUP.MQOD_VERSION_1 after this change I tried to rerun my Gateway routine and it worked!

Option 2:-
a. Upgraded 10g procedural gateway for webspere MQ to 11gR2 and re-ran "pgmundeploy.sql" and "pgmdeploy.sql” and after some small listener configuration changes things started working...


I wanted to try again on 10.2.0.1 base release, but since it’s working fine after upgrading to 11g so I decided to stay with 11gR2 Procedural Gateway with 10g database.

No comments:

Post a Comment