View previous topic :: View next topic |
Author |
Message |
haqshaik Beginner
Joined: 11 May 2005 Posts: 49 Topics: 19
|
Posted: Mon Aug 29, 2005 11:18 am Post subject: DB2 error while executing the CICS program |
|
|
Hi,
I am getting an sql code of -922 when I am executing a DB2 program.
I have program A, which will be triggerd by the MQ transaction CKTI.
Program A does link to Program B. The Program B has got SQL statements in it. I have define the RCT entry to the Program A.
when I am executing the Program A independently, I mean by Disabling the Triggering Mechanism, the program B is executing as expected.
when I am exectuig the same program A, by enabling the trigger from the MQ, the program B is ending with sqlcode of -922.
I have checked the data base and the data base is available in RW mode and I could issue the sql statements through SPUFI against the database.
Did i missout anything? Anythoughts will be helpful.
Thanks,
Salauddin |
|
Back to top |
|
|
haqshaik Beginner
Joined: 11 May 2005 Posts: 49 Topics: 19
|
Posted: Mon Aug 29, 2005 11:21 am Post subject: |
|
|
Further to my previous post I am doing an insert into the database and the trigger is defined as first.
Hope these details will be helpful.
Thanks,
Salauddin |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12376 Topics: 75 Location: San Jose
|
|
Back to top |
|
|
Manas Biswal Intermediate
Joined: 29 Nov 2002 Posts: 382 Topics: 27 Location: Chennai, India
|
Posted: Mon Aug 29, 2005 2:44 pm Post subject: |
|
|
haqshaik,
Thats probably because the primary authorization id for DB2 is different for both the case i.e. when you invoke the transaction through MQ and when you invoke it independently. Check the primary authorization id in both the cases (using CEDF on CICS or Omegamon on DB2) and grant access accordingly.
HTH...Regards,
Manas _________________ There is no path to peace. Peace is the path.
- Mahatma Gandhi (1869-1948) |
|
Back to top |
|
|
haqshaik Beginner
Joined: 11 May 2005 Posts: 49 Topics: 19
|
Posted: Tue Aug 30, 2005 3:02 pm Post subject: |
|
|
Thanks to Kolusu and Manas. Manas as you pointed out the user id is comming as diffrerent which does not have an entry in to the RACF. In my case the messages are comming from the unix box, and the default user id will be created in the Unix box when we install the MQ on the Unix box. This will get populated when you send the message over the MQ in the field user indentifier in the MQMD structure. At my shop as we do not have any security exits impelemented, I could able to open the remote queue and the local queue as well and its not giving any problems while making any MQI calls. As Far as I know, that MQ checks the security within the application before making any MQI calls. When it comes to the data base it check for the same user id and does not have previlege to do the required operations in the database. Please correct me if my opinion is wrong. I was thinking if we could create a userid in the RACF for the user id which is comming from the MQ message from the UNIx BOX and Grant an access to the Plan. I am not sure whether this is going to work or not.
This userid can not be overridden. we tried overiding the userid at the plan level in the RCT entry. Still no luck.
Any ideas on this will be helpful.
Thanks,
Salauddin |
|
Back to top |
|
|
Manas Biswal Intermediate
Joined: 29 Nov 2002 Posts: 382 Topics: 27 Location: Chennai, India
|
Posted: Wed Aug 31, 2005 9:54 am Post subject: |
|
|
haqshaik,
You could create a RACF profile for the MQ userid and grant him the necessary access.
You could also use a SET CURRENT SQLID statement at the beginning of your program to set the DB2 sqlid to a particular value. This will avoid confusion because of multiple DB2 authorization identifiers and you can be sure that DB2 is accessed with the same sqlid irrespective of where it is called from.
HTH....Regards,
Manas _________________ There is no path to peace. Peace is the path.
- Mahatma Gandhi (1869-1948) |
|
Back to top |
|
|
|
|