ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » IBM MQ Java / JMS » Configuring DB2 for Two phase Commit

Post new topic  Reply to topic
 Configuring DB2 for Two phase Commit « View previous topic :: View next topic » 
Author Message
pnsrikanth
PostPosted: Sat Jun 08, 2002 2:30 am    Post subject: Configuring DB2 for Two phase Commit Reply with quote

Newbie

Joined: 08 Jun 2002
Posts: 6

Hi!
iam using DB2 Ver 7.2 as database and IBM MQseries ver 5.2 for messaging. i have written a java program to implement 2 phase commit.
i have followed the follwing steps.
1) running of usejdbc2.bat
2) Binding of DB2 database
3) creating of the resources in the Resource parameter of the MQ Services properties panel. (switc file and open string mentioned)
4) setting of the jvm.dll in the path.
5) then i ran my java application

an MQ error 2012 is thrown, which means that the there is an environment setting problem.

could any please help me to over come this problem.

regards
srikanth
Back to top
View user's profile Send private message Yahoo Messenger
abiram8
PostPosted: Tue Jun 11, 2002 5:29 am    Post subject: Reply with quote

Master

Joined: 27 Mar 2002
Posts: 207
Location: India

Hi,

Which Platform The MQ Server & DB2 runs
Back to top
View user's profile Send private message Send e-mail
abiram8
PostPosted: Tue Jun 11, 2002 5:33 am    Post subject: Reply with quote

Master

Joined: 27 Mar 2002
Posts: 207
Location: India

Hi,

Which Platform The MQ Server & DB2 runs
Back to top
View user's profile Send private message Send e-mail
pnsrikanth
PostPosted: Tue Jun 11, 2002 7:47 pm    Post subject: Reply with quote

Newbie

Joined: 08 Jun 2002
Posts: 6

Hi!
Both MQSeries and DB2 runs on Win-NT platform

bye
srikanth
Back to top
View user's profile Send private message Yahoo Messenger
abiram8
PostPosted: Wed Jun 12, 2002 6:43 am    Post subject: Reply with quote

Master

Joined: 27 Mar 2002
Posts: 207
Location: India

Please list me all the Enviromental Variable You set
Back to top
View user's profile Send private message Send e-mail
bower5932
PostPosted: Wed Jun 12, 2002 1:15 pm    Post subject: Reply with quote

Jedi Knight

Joined: 27 Aug 2001
Posts: 3023
Location: Dallas, TX, USA

Did you update your TP_MON_NAME parameter in DB2:

db2 update dbm cfg using TP_MON_NAME mqmax

There are details in the System Admin manual.

Also, can you post what you have set up for the XAResources inside of MQSeries?
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
pnsrikanth
PostPosted: Fri Jun 14, 2002 4:52 am    Post subject: Reply with quote

Newbie

Joined: 08 Jun 2002
Posts: 6

hi!
i have updated TP_MON_NAME,
then the switch file is pointed to jdbcdb2.dll. in the XA resource.

regarding the environment variables, path has been set to jvm.dll, DB2instance has been added as a variable.


bye
srikanth
Back to top
View user's profile Send private message Yahoo Messenger
bower5932
PostPosted: Fri Jun 14, 2002 9:16 am    Post subject: Reply with quote

Jedi Knight

Joined: 27 Aug 2001
Posts: 3023
Location: Dallas, TX, USA

I've gotten this to work on my machine, so I know that it does work. I just looked at my XA Resource definition. Here is what I have:

SwitchFile - c:\mqseries\java\lib\jdbc\jdbcdb2.dll
XAOpenString - dbname,userid,password
XACloseString - blank
ThreadOfControl - PROCESS

I'd suggest that you double-check the XAOpenString and make sure that the userid/password supplied can actually connect to the dbname. The only other thing that I can think of might be the version of java that you are using. I'd double-check to make sure it is one of the supported ones. I'm using the one (1.3.0) that comes with WAS 4.01.
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
bower5932
PostPosted: Fri Jun 14, 2002 9:35 am    Post subject: Reply with quote

Jedi Knight

Joined: 27 Aug 2001
Posts: 3023
Location: Dallas, TX, USA

I just played with this some more on my machine. Basically, here is what I had to do:

crtmqm javadb2.qmgr

db2 create database javadb2
db2 connect to javadb2
db2 update dbm cfg using TP_MON_NAME mqmax

created a table that i used

strmqm javadb2.qmgr

add a resource section:
Name - javadb2
SwitchFile - c:\mqseries\java\lib\jdbc\jdbcdb2.dll
XAOpenString - javadb2,userid,password
XACloseString - blank
ThreadOfControl - PROCESS

endmqm javadb2.qmgr
strmqm javadb2.qmgr

ran my program and it failed with an 805

db2 bind @db2cli.lst blocking all grant public

reran my program and it worked

Hope this helps.
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
pnsrikanth
PostPosted: Tue Jun 18, 2002 4:46 am    Post subject: Reply with quote

Newbie

Joined: 08 Jun 2002
Posts: 6

hi !
i have followed the above mentioned steps even before, but the mistake i made was in db2, after binding & updating the tp_mon_name, i have not terminated the db2. that was the problem.

after fixing this my queue manager is running. but the java application which iam running is giving an error at
Connection conn = qmgr.getJDBCConnection(ds);

iam getting unsatisfied link error.

any thing else has to be done/set.

regards
srikanth
Back to top
View user's profile Send private message Yahoo Messenger
bower5932
PostPosted: Tue Jun 18, 2002 2:24 pm    Post subject: Reply with quote

Jedi Knight

Joined: 27 Aug 2001
Posts: 3023
Location: Dallas, TX, USA

Make sure that you have DB2 in your path (c:\sqllib\bin).
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
pnsrikanth
PostPosted: Wed Jun 19, 2002 4:33 am    Post subject: Reply with quote

Newbie

Joined: 08 Jun 2002
Posts: 6

hi!
the path is set to sqllib/bin

bye
srikanth
Back to top
View user's profile Send private message Yahoo Messenger
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » Configuring DB2 for Two phase Commit
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.