`

DataSource configuration guide

阅读更多
This page describes how to create the DB2 data source in WAS/WPS 6.0.2.
Step 1: Create the J2C authentication alias for the database

1 Login the WAS console, click "Security" - > "GlobalSecurity" -> "Authentication" -> "JAAS Configuration" -> "J2C Authentication data";
2 Click "New", input "MTPDBAuthAlias" as the "Alias", the database user name and password in "User ID" and "Password" feilds, for example "db2admin" and "db2admin" are the user id and password of our local database;

Step 2: Create the DB2 JDBC Provider if there is no such one

1 Click "Resources" -> "JDBC Providers" in the left navigation bar; the existing JDBC providers will be listed;
2 If there has the JDBC provider for DB2 (such as "DB2 JDBC2-compliant Provider " or "DB2 Universal JDBC Driver provider"), then do not need to create it again, skip this step and go to "Step 3"; Otherwise continue;
3 Click "New" button; select "DB2" as Database type, "DB2 Universal JDBC Driver provider" as Provider type, "Connection pool data source" as Implementation type.
4 Click "Next", this page shows the path of the DB2 JDBC driver; The path is defined with the variable "DB2UNIVERSAL_JDBC_DRIVER_PATH";
5 Click "Finish", and then save the changes to the master configuration.
6 Click "Environment" -> "WebSpehre variables" in the left navigation bar; find the value of viarable "UNIVERSAL_JDBC_DRIVER_PATH"; make sure the value is the correct location that DB2 driver jar/zip files exist; for example "C:\IBM\SQLLIB\java";

Step 3: Create the Data source

1 Click "Resources" -> "JDBC Providers" in the left navigation bar; the existing JDBC providers will be listed;
2 Click the DB2 JDBC driver that you just created or has existed, then click the "Data sources" link;
3 Click "New" button, input "MTPDS" as the name, "jdbc/MTPDS" as the "JNDI name"; in the drop down list "Component-managed authentication alias", select "yourNodeName/MTPDBAuthAlias"; in "Database name", input the name of the database: "MTPDB";
4 If the driver is of JDBC type 4 ("DB2 Universal JDBC Driver provider"), you also need to input the server name and port number, like "localhost" and "50000";
5 Click "Save" to save the settings, and then save the changes to the master configuration.
Step 3: Test the data source

1 Click "Resources" -> "JDBC Providers" in the left navigation bar; the existing JDBC providers will be listed;
2 Click the DB2 JDBC driver that you just created or has existed, then click the "Data sources" link;
3 Select "MTPDS", and then click "Test connection" button. The result will be shown, if the test is failed, go back again to check if there is anything wrong.
分享到:
评论

相关推荐

    DB2+II数据源配置指南

    标题和描述表明,这份文件是一份由IBM发布的DB2 Information Integrator的DataSource Configuration Guide(数据源配置指南)的第8版。这本书是一份指南,旨在帮助用户配置DB2数据源,以便更好地使用DB2。这本指南不...

    mybatis-3-user-guide

    这个构建器可以从XML配置文件或Configuration类的实例中获取。为了从XML构建SqlSessionFactory,推荐使用类路径下的资源文件进行配置。MyBatis提供了一些工具类,用于加载资源文件。这些工具类方法使得从类路径或...

    MyBatis_3_User_Guide_Simplified_Chinese.pdf

    - **dataSource**:配置数据源,可以是UNPOOLED、POOLED或JNDI。 - **mappers**:指定映射器文件或类,将SQL语句与Java接口绑定起来。 #### 六、SQL映射文件 - **SQL语句**: - `<select>`:用于执行查询语句。 ...

    MyBatis User Guide.rar

    dataSource .. 19 mappers .......... 21 SQL Map XML Files ............. 21 select 22 insert, update, delete ...... 24 sql ..... 26 Parameters ...... 26 MyBatis 3 - User Guide 5 November 2010 4...

    apache hbase reference guide

    - **HBase as a MapReduce Job DataSource and Data Sink**(HBase作为MapReduce作业的数据源和数据接收器):如何将HBase作为MapReduce作业的输入输出。 - **Writing HFiles Directly During Bulk Import**(批量...

    MyBatis+3+User+Guide+Simplified+Chinese

    - **创建方式**:`SqlSessionFactory`实例通常通过`SqlSessionFactoryBuilder`对象来构建,后者可以从XML配置文件或预先配置好的`Configuration`类实例中创建。 **2. SqlSessionFactoryBuilder** - **功能**:...

    MyBatis-3-User-Guide-Simplified-Chinese.pdf

    以上是基于《MyBatis-3-User-Guide-Simplified-Chinese.pdf》文件内容整理的关键知识点,涵盖了MyBatis的基本概念、使用方法以及高级特性等方面。这些知识点对于理解和使用MyBatis非常关键,希望能帮助读者更好地...

    MyBatis 3 User Guide Simplified Chinese.pdf

    - **dataSource**:配置数据源,可以是POOLED、UNPOOLED或JNDI等类型。 - **mappers**:注册映射器,指定映射文件的位置或直接映射接口。 #### 六、SQL映射的XML文件 - **select**:用于执行查询操作。 - **...

    MyBatis-3-User-Guide-Simplified-Chinese

    `SqlSessionFactory` 可以通过 `SqlSessionFactoryBuilder` 构建出来,而后者可以从 XML 配置文件或预先配置好的 `Configuration` 类实例中构建出 `SqlSessionFactory`。 ##### 2.1 从 XML 中构建 ...

    Hibernate配置数据源.

    1. [Hibernate官方文档](https://docs.jboss.org/hibernate/orm/5.4/userguide/html_single/Hibernate_User_Guide.html) 2. [Spring Boot官方文档]...

    MyBatis3_用户指南(附JavaDB实例)

    可以通过SqlSessionFactoryBuilder来构建SqlSessionFactory实例,而构建实例可以基于XML配置文件或通过编程方式提供的配置类(Configuration class)。SqlSessionFactory一旦建立,可以被用来创建多个SqlSession实例...

    Java邮件开发Fundamentals of the JavaMail API

    Fundamentals of the JavaMail API Presented by developerWorks, your source for great tutorials ... Table of Contents If you're viewing this document online, you can click any of the topics below ...

Global site tag (gtag.js) - Google Analytics