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 » WebSphere Message Broker (ACE) Support » Configuring JDBCProvider to connect to DB2 v5r4 on AS400

Post new topic  Reply to topic
 Configuring JDBCProvider to connect to DB2 v5r4 on AS400 « View previous topic :: View next topic » 
Author Message
prasadpav
PostPosted: Thu Nov 15, 2012 10:31 am    Post subject: Configuring JDBCProvider to connect to DB2 v5r4 on AS400 Reply with quote

Centurion

Joined: 03 Oct 2004
Posts: 142

Hi,
I searched both this website and online about configuring JDBCProviders to connect to DB2 V5R4 on **AS400**. Saw very old posts without a solution. Just wondering if anyone was successful in connecting by configuring a JDBCProviders. Please note that the IBM product document mentions about ODBC connection to DB2 v5r4 not possible for XAConnections. It should be possible using JDBC, given that I'm using JDBC Type 4 driver.

Quote:
I'm using Message Broker v7.0.2 on linux 2.6.18-164.9.1.el5


I tried the following commands while configuring JDBCProvider:

Quote:
UserId & Password in the URL:

mqsicreateconfigurableservice BDAHEBL1 -c JDBCProviders -o AS400DB -n connectionUrlFormat,jarsURL,type4DriverClassName,type4DatasourceClassName -v "jdbc:as400://11.2.2.2;naming=system:user=myuser_id;password=my_password",/home/wmb/jt400.jar,com.ibm.as400.access.AS400JDBCDriver,com.ibm.as400.access.AS400JDBCXADataSource


UserId & Password in the securityIdentity parameter

mqsicreateconfigurableservice BDAHEBL1 -c JDBCProviders -o AS400DB -n connectionUrlFormat,jarsURL,type4DriverClassName,type4DatasourceClassName,securityIdentity -v "jdbc:as400://11.2.2.2;naming=system",/home/wmb/jt400.jar,com.ibm.as400.access.AS400JDBCDriver,com.ibm.as400.access.AS400JDBCXADataSource,myuser_id@my_password


My java compute node has the following to make a connection:

Code:
           Connection conn = getJDBCType4Connection("AS400DB", JDBC_TransactionType.MB_TRANSACTION_AUTO);



Getting the following exception about password initialization while creating connection:

Quote:
ExceptionList
RecoverableException
File:CHARACTER:/build/S700_P/src/DataFlowEngine/ImbDataFlowNode.cpp
Line:INTEGER:1073
Function:CHARACTER:ImbDataFlowNode::createExceptionList
Type:CHARACTER:ComIbmJavaComputeNode
Name:CHARACTER:AS400_JavaCompute#FCMComposite_1_2
Label:CHARACTER:AS400_JavaCompute.Java Compute
Catalog:CHARACTER:BIPmsgs
Severity:INTEGER:3
Number:INTEGER:2230
Text:CHARACTER:Node throwing exception
RecoverableException
File:CHARACTER:JDBCCommon.java
Line:INTEGER:533
Function:CHARACTER:JDBCType4Connection::createXAConnection
Type:CHARACTER:
Name:CHARACTER:
Label:CHARACTER:
Catalog:CHARACTER:BIPmsgs
Severity:INTEGER:0
Number:INTEGER:6231
Text:CHARACTER:Problem encountered obtaining JDBC connection
Insert
Type:INTEGER:5
Text:CHARACTER:Broker 'BDAHEBL1'; Execution Group 'Ken'; Message Flow 'AS400_JavaCompute'; Node 'Java Compute'; Node Type 'AS400_JavaCompute_JavaCompute
Insert
Type:INTEGER:5
Text:CHARACTER: message: com.ibm.as400.access.PasswordDialog (initialization failure) stack trace: [java.lang.J9VMInternals.initialize(J9VMInternals.java:140)
com.ibm.as400.access.ToolboxSignonHandler.setupPasswordDialog(ToolboxSignonHandler.java:573)
com.ibm.as400.access.ToolboxSignonHandler.handleSignon(ToolboxSignonHandler.java:496)
com.ibm.as400.access.ToolboxSignonHandler.connectionInitiated(ToolboxSignonHandler.java:50)
com.ibm.as400.access.AS400.promptSignon(AS400.java:2613)
com.ibm.as400.access.AS400.signon(AS400.java:3910)
com.ibm.as400.access.AS400.connectService(AS400.java:1168)
com.ibm.as400.access.AS400JDBCConnection.setProperties(AS400JDBCConnection.java:3300)
com.ibm.as400.access.AS400JDBCDataSource.getConnection(AS400JDBCDataSource.java:720)
com.ibm.as400.access.AS400JDBCDataSource.getConnection(AS400JDBCDataSource.java:578)
com.ibm.as400.access.AS400JDBCXADataSource.getXAConnection(AS400JDBCXADataSource.java:128)
com.ibm.broker.jdbctype4.jdbcdbasemgr.JDBCType4Connection.createXAConnection(JDBCType4Connection.java:225)
com.ibm.broker.jdbctype4.jdbcdbasemgr.JDBCType4Connection.getT4NodeConnection(JDBCType4Connection.java:1112)
com.ibm.broker.jdbctype4.localtrxn.JDBCType4SinglePhaseTrxnHandler.getConnection(JDBCType4SinglePhaseTrxnHandler.java:245)
com.ibm.broker.jdbctype4.connfact.JDBCType4ConnectionFactory.getConnection(JDBCType4ConnectionFactory.java:155)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:4
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:600)
com.ibm.broker.plugin.MbNode.getJDBCType4Connection(MbNode.java:1551)
AS400_JavaCompute_JavaCompute.evaluate(AS400_JavaCompute_JavaCompute.java:24)
com.ibm.broker.javacompute.MbRuntimeJavaComputeNode.evaluate(MbRuntimeJavaComputeNode.java:232)
com.ibm.broker.plugin.MbNode.evaluate(MbNode.java:1469)]


Any help is much appreciated. Thanks in advance.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Thu Nov 15, 2012 10:38 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

You have changed the connectionURLFormat to indicate specific information, rather than keeping it as a Format string that specifies which pieces of hte rest of the JDBCProvider to insert it.

You also have to use mqsisetdbparms to indicate the userid and password for a JDBC data source.
Back to top
View user's profile Send private message
prasadpav
PostPosted: Fri Nov 16, 2012 5:40 am    Post subject: Reply with quote

Centurion

Joined: 03 Oct 2004
Posts: 142

Thanks mqjeff.

I changed my connection URL format and this is how it looks like now:

Quote:

AS400DB
connectionUrlFormat='jdbc:as400://[serverName];[connectionUrlFormatAttr1]'
connectionUrlFormatAttr1='naming=system'
connectionUrlFormatAttr2=''
connectionUrlFormatAttr3=''
connectionUrlFormatAttr4=''
connectionUrlFormatAttr5=''
databaseName='default_Database_Name'
databaseType='default_Database_Type'
databaseVersion='default_Database_Version'
description='default_Description'
environmentParms='default_none'
jarsURL='/home/wmb/prasad'
maxConnectionPoolSize='0'
portNumber='default_Port_Number'
securityIdentity='default_User@default_Server'
serverName='11.2.3.4'
type4DatasourceClassName='com.ibm.as400.access.AS400JDBCXADataSource'
type4DriverClassName='com.ibm.as400.access.AS400JDBCDriver'


I've also setup the userid & password using mqsisetdbparms command. I restarted execution group & also the broker. The testing still failed. I ran a broker service trace and found this information:

Quote:

2012-11-16 12:56:06.484375 4 com.ibm.broker.jdbctype4.jdbcdbasemgr.JDBCType4Connection@3dd03dd.JDBCType4Connection::Type 4 getT4NodeConnection ' mMap lookup key =jdbc:as400://164.39.72.67;naming=systemTmode20'
2012-11-16 12:56:06.484444 4 { JDBCType4Connection.createXAConnection
2012-11-16 12:56:06.484503 4 com.ibm.broker.jdbctype4.jdbcdbasemgr.JDBCType4Connection@3dd03dd.JDBCType4Connection::createXAConnection ' Databasemanager xa datasource class name = com.ibm.as400.access.AS400JDBCXADataSource'
2012-11-16 12:56:06.484525 4 { SharedClassLoader.getInstance
2012-11-16 12:56:06.484567 4 } SharedClassLoader.getInstance , 'instance=com.ibm.broker.classloading.SharedClassLoader@77e577e5'
2012-11-16 12:56:06.484641 4 com.ibm.broker.jdbctype4.jdbcdbasemgr.JDBCType4Connection@3dd03dd.JDBCType4Connection::createXAConnection ' dataSourceClass = com.ibm.as400.access.AS400JDBCXADataSource'
2012-11-16 12:56:06.484747 4 com.ibm.broker.jdbctype4.jdbcdbasemgr.JDBCType4Connection@3dd03dd.JDBCType4Connection::createXAConnection ' got xaDataSource object com.ibm.as400.access.AS400JDBCXADataSource'
2012-11-16 12:56:06.484829 4 com.ibm.broker.jdbctype4.jdbcdbasemgr.JDBCType4Connection@3dd03dd.JDBCType4Connection::createXAConnection ' connectionPoolSize = 0'
2012-11-16 12:56:06.484888 4 com.ibm.broker.jdbctype4.jdbcdbasemgr.JDBCType4Connection@3dd03dd.JDBCType4Connection::createXAConnection ' poolManager = null'
2012-11-16 12:56:06.493652 4 com.ibm.broker.jdbctype4.jdbcdbasemgr.JDBCType4Connection@3dd03dd.createXAConnection 'java.lang.NoClassDefFoundError: com.ibm.as400.access.PasswordDialog (initialization failure) at java.lang.J9VMInternals.initialize(J9VMInternals.java:140) at com.ibm.as400.access.ToolboxSignonHandler.setupPasswordDialog(ToolboxSignonHandler.java:573) at com.ibm.as400.access.ToolboxSignonHandler.handleSignon(ToolboxSignonHandler.java:496) at com.ibm.as400.access.ToolboxSignonHandler.connectionInitiated(ToolboxSignonHandler.java:50) at com.ibm.as400.access.AS400.promptSignon(AS400.java:2613) at com.ibm.as400.access.AS400.signon(AS400.java:3910) at com.ibm.as400.access.AS400.connectService(AS400.java:1168) at com.ibm.as400.access.AS400JDBCConnection.setProperties(AS400JDBCConnection.java:3300) at com.ibm.as400.access.AS400JDBCDataSource.getConnection(AS400JDBCDataSource.java:720) at com.ibm.as400.access.AS400JDBCDataSource.getConnection(AS400JDBCDataSource.java:578) at com.ibm.as400.access.AS400JDBCXADataSource.getXAConnection(AS400JDBCXADataSource.java:128) at com.ibm.broker.jdbctype4.jdbcdbasemgr.JDBCType4Connection.createXAConnection(JDBCType4Connection.java:225) at com.ibm.broker.jdbctype4.jdbcdbasemgr.JDBCType4Connection.getT4NodeConnection(JDBCType4Connection.java:1112) at com.ibm.broker.jdbctype4.localtrxn.JDBCType4SinglePhaseTrxnHandler.getConnection(JDBCType4SinglePhaseTrxnHandler.java:245) at com.ibm.broker.jdbctype4.connfact.JDBCType4ConnectionFactory.getConnection(JDBCType4ConnectionFactory.java:155) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:4 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:600) at com.ibm.broker.plugin.MbNode.getJDBCType4Connection(MbNode.java:1551) at AS400_JavaCompute_JavaCompute.evaluate(AS400_JavaCompute_JavaCompute.java:24) at com.ibm.broker.javacompute.MbRuntimeJavaComputeNode.evaluate(MbRuntimeJavaComputeNode.java:232) at com.ibm.broker.plugin.MbNode.evaluate(MbNode.java:1469) '


The service trace complains about Java class not found, but that cannot be correct because other java method classes com.ibm.as400.access.AS400JDBCDataSource.getXAConnection() method was able to call other methods (as shown in the stack trace). And there is really only one JDBC jar file to be loaded for this provider, which is "jt400.jar" that is available in both "/var/mqsi/shared-libs" as well as it is provided while configuring the JDBCProvider.

Anymore ideas??

Thanks in advance.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Fri Nov 16, 2012 5:56 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

Yes, return to the original URLFormat.
The URLFormat is not the connection URL but a template.
The configurable service will then fill the parameters and the connection URL gets built at runtime by merging the template and the parameters...
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
prasadpav
PostPosted: Fri Nov 16, 2012 6:40 am    Post subject: Reply with quote

Centurion

Joined: 03 Oct 2004
Posts: 142

@ftp_saper
If you are referring to my first post, then I corrected it in my new post. If you are referring to my new post and suggesting to use the connectionUrlFormat -
jdbc:db2://[serverName]:[portNumber]/[databaseName]:user=[user];password=[password]; then, I think it is wrong because that format is for DB2 UDB's. I tried it anyway and got the following error:

Quote:

Type:INTEGER:5
Text:CHARACTER:jdbc:db2://164.39.72.67:default_Port_Number/default_Database_Name:user=mqsiUser;password=xxxxxxxx;
Insert
Type:INTEGER:5
Text:CHARACTER: error message: The application server rejected the connection. (The user ID or password contains a character that is not valid.), SQLState value: 08004, vendor's error code: -99999, stack trace: [com.ibm.as400.access.JDError.throwSQLException(JDError.java:565)
com.ibm.as400.access.AS400JDBCConnection.setProperties(AS400JDBCConnection.java:3304)
com.ibm.as400.access.AS400JDBCDataSource.getConnection(AS400JDBCDataSource.java:720)
com.ibm.as400.access.AS400JDBCDataSource.getConnection(AS400JDBCDataSource.java:693)
com.ibm.as400.access.AS400JDBCXADataSource.getXAConnection(AS400JDBCXADataSource.java:145)
com.ibm.broker.jdbctype4.jdbcdbasemgr.JDBCType4Connection.createXAConnection(JDBCType4Connection.java:222)
com.ibm.broker.jdbctype4.jdbcdbasemgr.JDBCType4Connection.getT4NodeConnection(JDBCType4Connection.java:1112)
com.ibm.broker.jdbctype4.localtrxn.JDBCType4SinglePhaseTrxnHandler.getConnection(JDBCType4SinglePhaseTrxnHandler.java:245)
com.ibm.broker.jdbctype4.connfact.JDBCType4ConnectionFactory.getConnection(JDBCType4ConnectionFactory.java:155)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:4
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
j


I think there is a documentation error for MB v7 product, the documentation says:

Quote:

http://publib.boulder.ibm.com/infocenter/wmbhelp/v7r0m0/index.jsp?topic=%2Fcom.ibm.etools.mft.doc%2Fah10030_.htm

For non-XA transactions, you can create a JDBC type 4 connection from a broker to all the database servers that are listed in the ODBC support table. Connections are supported from all broker platforms, including z/OS.

For XA connections, the following restrictions apply:

On distributed platforms, only DB2 and Oracle are supported.
On z/OS, XA connections are not supported.
JDBC type 4 drivers are not supplied with WebSphere Message Broker; obtain these files from your database vendor. For the latest details of the drivers that are supported, visit the WebSphere Message Broker Requirements website.


I wanted non-XA connections only, however "com.ibm.broker.plugin.MbNode.getJDBCType4Connection("AS400DB", JDBC_TransactionType.MB_TRANSACTION_AUTO) always tries to create a XA Connection even when I supply the non-XA database source ( "type4DatasourceClassName" ="com.ibm.as400.access.AS400JDBCDataSource)". The error which I get in this case is:

Quote:
Insert
Type:INTEGER:5
Text:CHARACTER: java.lang.ClassCastException : com.ibm.as400.access.AS400JDBCDataSource incompatible with javax.sql.XADataSource stack trace: [com.ibm.broker.jdbctype4.jdbcdbasemgr.JDBCType4Connection.createXAConnection(JDBCType4Connection.java:181)
com.ibm.broker.jdbctype4.jdbcdbasemgr.JDBCType4DatabaseManager.getThreadOwnedConnections(JDBCType4DatabaseManager.java:313)
com.ibm.broker.jdbctype4.localtrxn.JDBCType4SinglePhaseTrxnHandler.getConnection(JDBCType4SinglePhaseTrxnHandler.java:221)
com.ibm.broker.jdbctype4.connfact.JDBCType4ConnectionFactory.getConnection(JDBCType4ConnectionFactory.java:155)


So the document says that it is possible to create a non-XA connection to DB2 on i5/OS and OS/400, however the above error shows that always XA Connections are created.

So, may I ask if anyone has seen it in action i.e. Message Broker JDBC provider making a non-XA/XA connections to DB2 V5R4 on AS400 using jt400.jar JDBC driver?? Please remember this is not DB2 UDB, it is DB2 that comes embedded within AS400.

There is no "connectionURLFormat" provided for as400 db2 connection (neither in documentation nor from the output from mqsireportproperties!!). Hence, I'm using 'jdbc:as400://[serverName];[connectionUrlFormatAttr1]'.

Thanks in advance.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Fri Nov 16, 2012 7:02 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

Quote:
jdbc:db2://[serverName]:[portNumber]/[databaseName]:user=[user];password=[password];
is not the original template....
The original template says (from memory look it up in the infocenter)
Code:
jdbc:[databaseType]://[serverName]:[portNumber]/[databaseName]:user=[user];password=[password];

and may have some dbparm1, dbparm2, dbparm3 added somewhere...

Have fun
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
prasadpav
PostPosted: Tue Dec 04, 2012 8:53 am    Post subject: Reply with quote

Centurion

Joined: 03 Oct 2004
Posts: 142

@ftp_saper - My apologies for taking so long to reply to your previous post. I had to park investigating this problem because of other project related matters.

Anyway, here are the JDBC URL setting's which have worked for me:

Code:

AS400DB
    connectionUrlFormat='jdbc:as400://[serverName]/[databaseName];[connectionUrlFormatAttr1];user=[user];password=[password];'
    connectionUrlFormatAttr1='naming=system'
    connectionUrlFormatAttr2=''
    connectionUrlFormatAttr3=''
    connectionUrlFormatAttr4=''
    connectionUrlFormatAttr5=''
    databaseName='KDKD80A1'
    databaseType='default_Database_Type'
    databaseVersion=''
    description='default_Description'
    environmentParms='default_none'
    jarsURL='/home/wmb/prasad'
    maxConnectionPoolSize='0'
    portNumber=''
    securityIdentity='as400Security'
    serverName='111.99.99.99'
    type4DatasourceClassName='com.ibm.as400.access.AS400JDBCXADataSource'
    type4DriverClassName='com.ibm.as400.access.AS400JDBCDriver'


My SQL statements needed to have the schema prefix to the tables & stored procedures in order to work. I tried the option of providing list of libraries like "jdbc:as400://111.99.99.99;naming=sql;libraries=\"MYSCHEMA1,MYSCHEMA2\";prompt=false;user=[user];password=[password];". It didn't worked. It behaved as if it simply ignored those libraries and always defaulted to the userid with which it is authenticated. But atleast I'm able to connect & query AS400 databases using configurable service.

Other JDBC URL which also worked is (NOTE: there is no database name & port number specified and yet it works. I'm not good at how AS400 database works, but I suspect it is how it is configured that allows this JDBC setting to work):

Code:
mqsicreateconfigurableservice BDAHEBL1 -c JDBCProviders -o AS400DB -n connectionUrlFormat,jarsURL,type4DriverClassName,type4DatasourceClassName,serverName,securityIdentity,databaseName,databaseVersion,portNumber -v "jdbc:as400://[serverName];naming=sql;prompt=false;user=[user];password=[password];",/home/wmb/prasad,com.ibm.as400.access.AS400JDBCDriver,com.ibm.as400.access.AS400JDBCXADataSource,111.99.99.99,as400Security,"","",""

[b]mqsireportproperties command dump for JDBCProviders gives the following[/b]:

AS400DB
    connectionUrlFormat='jdbc:as400://[serverName];naming=sql;prompt=false;user=[user];password=[password];'
    connectionUrlFormatAttr1=''
    connectionUrlFormatAttr2=''
    connectionUrlFormatAttr3=''
    connectionUrlFormatAttr4=''
    connectionUrlFormatAttr5=''
    databaseName=''
    databaseType='default_Database_Type'
    databaseVersion=''
    description='default_Description'
    environmentParms='default_none'
    jarsURL='/home/wmb/prasad'
    maxConnectionPoolSize='0'
    portNumber='default_Port_Number'
    securityIdentity='as400Security'
    serverName='111.99.99.99'
    type4DatasourceClassName='com.ibm.as400.access.AS400JDBCXADataSource'
    type4DriverClassName='com.ibm.as400.access.AS400JDBCDriver'



Other details which I learned during this painful exercise are:

1) The JDBC URL *MUST* have the "user=[user];password=[password]" attributes. Eventhough the "securityIdentity" object is assigned, the configurable service still expects these two attributes

2) The JDBC URL starting with "jdbc:db2://.." can be used to connect to AS400 database *ONLY* when there is DB2 Connect or DB2 UDB 9.* installed locally. I have not tested this but i think that is the case. If DB2 is not available, then, one can use the samples shown above.

3) The second setting in the above samples is quite unusual where there is no database name & portnumber. But somehow it works.

4) "libraries=myschema1,myschema2" attribute setting did not worked on Message Broker 7.0.0.2. Hopefully it may work on next versions. If someone got this setting working on this version, please do share.

Thanks for going through this and hope the above information helps someone in future.
Back to top
View user's profile Send private message
jpwhicker
PostPosted: Mon Dec 24, 2012 8:16 am    Post subject: Reply with quote

Newbie

Joined: 24 Dec 2012
Posts: 1

This post helped me tremendously in working out a JDBCProvider for our IBM i (iSeries) machine.

====================================
prasadpav wrote: 4) "libraries=myschema1,myschema2" attribute setting did not worked on Message Broker 7.0.0.2. Hopefully it may work on next versions. If someone got this setting working on this version, please do share.
====================================

I thought I would share a few things I have learned about JDBC connections to the IBM i in general and with regards to Message Broker in particular.

First, in general. If you take a look at an IBM i using iSeries Navigator you will see an icon named "Databases". In my view, this is slightly deceptive. There is only 1 database, and that has the same name as the IBM i machine. The only way to have additional databases is through setting up a REMOTE database.

Second, each library is considered a SCHEMA. I mention this so that I can report how I set up a JDBCProvider which knows the default schema and therefore has no need of "schema.library" syntax.

I started with the DB2 JDBCProvider template URL: jdbc:db2://[serverName]:[portNumber]/[databaseName]:user=[user];password=[password];

To make this work, I changed "db2:" to "as400:" as has already been shown in this post. I left everything else exactly as it is except I added two properties just prior to the "user=[user]" section. I added "prompt=false;naming=sql;" I got that idea from this post as well so thank you.

Everything else is as it needs to be. The port defaults to 50000 which is the correct default for DB2 on IBM i. The user and password have to come from the security identity configured using mqsisetdbparms command.

The key is to realize that "databaseName" is, in the case of IBM i, a bit different. Essentially most modern dbms such as Oracle and DB2 can have multiple databases and multiple schemas inside of the machine hosting the dbms. IBM i, as I mentioned previously, has only 1 database per IBM i machine. Any other "databases" are remote databases configured using the WRKRDBDIRE (Work with Relational Database Directory Entries) command.

So the key is to understand that the "databaseName" is the default schema or library. The url that worked for me is:
jdbc:as400://[serverName]:[portNumber]/[databaseName];prompt=false;naming=sql;user=[user];password=[password];

All I had to do was enter the serverName (hostname or ip of the IBM i), the databaseName (which is the library I wish to be my default schema), and use the mqsisetdbparms to provide a user and password.

Thank you for working on this post. I struggled as you did but you blazed the path and made it much, much easier for me.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Configuring JDBCProvider to connect to DB2 v5r4 on AS400
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.