One, the IBM WebSphere MQ7.0 JDBC Support database has:
- DB2
- Informix
- Informix_with_date_format
- Microsoft_sql_server
- Oracle
- Sybase_jconnect6_05
In this paper, we use Oracle JDBC as an example to build JDBC in two ways, with the following details:
Ii. command to build JDBC
1. Open the MB command Console (refer to http://www.cnblogs.com/hhl-kf/archive/2012/09/25/2694052.html)
2. Create Configuration service (Oracle JDBC)
Mqsicreateconfigurableservice mb7broker-c jdbcproviders-o simplerroutedb
-N Connectionurlformat,connectionurlformatattr1,description,jarsurl,portnumber,
Servername,type4datasourceclassname,type4driverclassname
-V "JDBC:ORACLE:THIN:[USER]/[PASSWORD]@[SERVERNAME]:[PORTNUMBER]:[CONNECTIONURLFORMATATTR1],
<sid>,simplified Database Routing Sample database,<jars url>,<port number>
<server Name>,oracle.jdbc.xa.client.oraclexadatasource,oracle.jdbc.oracledriver "
which
-C Jdbcproviders: The Configuration service type is JDBC;-o simplerroutedb:jdbc is named simplerroutedb;
-N is the parameter name, multiple parameters are separated by ",", and-V is the corresponding value of the parameter, and multiple values are "," separated;
<jars url> Oracle's JDBC Driver full path
<port number> Oracle Port, default is 1521
<SID> Oracle Instance name, the write service name is correct when the service name and SID are not met when the cluster is not tried
<server name> Oracle Server IP Address
For example, the JDBC named CQMSTCDB is built for Oracle:
(1)mqsicreateconfigurableservice mb7broker-c jdbcproviders-o cqmstcdb-n Connectionurlformat, Connectionurlformatattr1,description,jarsurl,portnumber,servername,type4datasourceclassname, Type4driverclassname-v "Jdbc:oracle:thin:[email protected]:1521:cqmstc,cqmstc,simplified Database Routing Sample Database,d:\oracle\product\10.2.0\db_1\jdbc\lib,1521,192.168.4.248,oracle.jdbc.xa.client.oraclexadatasource, Oracle.jdbc.OracleDriver "
(2) Mqsicreateconfigurableservice mb7broker-c jdbcproviders-o cqmstcdb-n Connectionurlformat, Connectionurlformatattr1,description,jarsurl,portnumber,servername,type4datasourceclassname, Type4driverclassname-v "JDBC:ORACLE:THIN:[USER]/[PASSWORD]@[SERVERNAME]:[PORTNUMBER]:[CONNECTIONURLFORMATATTR1] , cqmstc,simplified Database Routing Sample database,d:\oracle\product\10.2.0\db_1\jdbc\lib,1521,192.168.4.248, Oracle.jdbc.xa.client.oraclexadatasource,oracle.jdbc.oracledriver "
Note that above (1), (2),-V "jdbc:oracle:thin:[user]/[password]@[servername]:[portnumber]:[connectionurlformatattr1]" can be defined by the value, can also be ambiguous values.
3, set the security ID: mysecurityidentity, and bind user name password-u cqmstc-p CQMSTC
Mqsisetdbparms mb7broker-n jdbc::mysecurityidentity-u cqmstc-p CQMSTC
4. Hook the security ID to the configuration service
Mqsichangeproperties mb7broker-c jdbcproviders-o cqmstcdb-n securityidentity-v mysecurityidentity
5. Restart agent, execution Group: mqsireload mb7broker-e Default
6. Delete Configuration Service
Mqsideleteconfigurableservice mb7broker-c Jdbcproviders-o cqmstcdb
7. Command View Configuration service (Oracle JDBC)
Mqsireportproperties Mb7broker-o cqmstcdb-c Jdbcproviders-r
8, the Interface view Configuration service, you can select the Configuration service, right-click "Properties" to edit the changes
Third, graphical interface to create JDBC
1. Open MQ Resource Manager, WebSphere MQ Explorer
2. Right click on "Configurable Service" and select "New"-"configurable service"
3. Enter the JDBC name, cqmstcdb, select the type: jdbcproviders, select the template as: Oracle
4. Modify the values corresponding to the parameters as follows:
5, click "Done", save the success, see also the same above;
6. Bind user name password and restart to make password effective:
Mqsisetdbparms mb7broker-n jdbc::mysecurityidentity-u cqmstc-p CQMSTC
Mqsireload MB7BROKER-E Default
Reference: WebSphere MQ Explorer Tutorial
Oracle JDBC for IBM WebSphere MQ