Wednesday, April 17, 2013

on
The steps involved to create and configure JDBC resource in WebSphere Application Server are as follows.
1. Please Ensure WebSphere Application Server and db2 is installed on the computer.
2. Please start the WAS

3. Open the IBM Console by typing the URL http://server-ip-address:9060/ibm/console (For http secure -> https://server-ip-address:9043/ibm/console where 9060 / 9043 is the default port for WAS

4. Now it will ask userid will be asked. If security is enabled , then you have to enter both userid and password. Enter userid and password and login (blank userid will also work for security not enabled)

5. After login , Expand Resources menu (leftside) and open JDBC providers . The following screen appears. 

6. Select the scope at which applications can use the JDBC provider . Server Resources such as JDBC providers, namespace bindings, or shared libraries can be defined at Cell / Node / Server level . If you set the scope at node level means , JDBC providers is applied to all servers at the Node. In our example we have set the scope for server level.
7. By Default there is no JDBC providers for DB2 . Now click on the New button to create a new JDBC provider.

8.Now you have to select type of JDBC provider to create . Select the database type as DB2 and Select the provider type as Db2 Universal JDBC Driver Provider and Select the implementation type as Connection Pool Data Source as shown in the above screen .
Then press Next.

9. Now you have to give Class path where db2 drivers are located. and Give Native Library Path . By default the db2 drivers are located in the folder in linux /opt/IBM/db2/V8.1/java and in windows Drive:\Program Files\IBM\SQLLIB\java . Make a folder db2drivers under /opt (Windows under any drive create db2drivers ) . Copy the db2 driver files db2java.zip , db2jcc.jar , db2jcc_javax.jar, db2jcc_license_cu.jar , db2jcc_license_cu.jar from the default location to the db2drivers folder which is now created (/opt/db2drivers (in windows e:\db2drivers). Now the Classpath for linux will be
/opt/db2drivers/db2jcc.jar
/opt/db2drivers/db2jcc_javax.jar
/opt/db2drivers/db2jcc_license_cu.jar
/opt/db2drivers/db2java.zip
and Native library path will be /opt/db2drivers as shown in the following screen Note : In windows replace the path /opt/db2drivers by e:\db2drivers . Now Apply -> Save -> Save

10.Now DB2 Universal JDBC Driver Provider is created as shown on the below screen

11. Let us now create the data sources for any database , in our example it is employee. For creating datasource , select datasource from the rightside Additional Properties

12. Select new which will open the below screen
13. Fill the Name , JNDI Name , Data Base Name , Driver Type , Server Name , Port Number . JNDI Name is the data source name which will be used any applications to connect to the database. In our example Name is Employee and JNDI name is /jdbc/EmployeeDS , Database Name is Employee , Driver Type 4 , Server Name (ip address of server where db2 is installed) , Port Number then apply->save ->save. Now Data sources Employee is created. Select JDBC providers -> DB2 Universal JDBC Driver Provider > Data sources ->Employee

14. In the previous page where you gave name & jndi name, you have to select Component-managed authentication alias , Container-managed authentication . For Component-managed authentication alias , you have to create a new entry by giving user name and password by selecting right side menu J2EE Connector Architecture (J2C) authentication data entries under related items.
15. Now create new alias (eg. db2admin) by giving user IDs (db2inst1 or created new user in linux) and passwords for Java 2 connector security , Now Apply->save ->save.

16 Select db2admin for Component-managed authentication alias and Container-managed authentication by opening JDBC providers > DB2 Universal JDBC Driver Provider > Data sources > Employee , then apply ->save -> save.
Now the datasource (EmployeeDS is created. You can do test connection by selecting JDBC providers > DB2 Universal JDBC Driver Provider > Data sources . Select employee and test connection.

Note : Any changes will be updated by selecting Apply->Save->Save.
EmployeeDS will be used by any applications which needs to connect to the database Employee.

9 comments:

  1. Websphere admin --- "
    Websphere admin Online Training

    Send ur Enquiry to contact@21cssindia.com
    Introduction
    Presentation – Oriented (Standalone)
    Service Oriented
    Client/Server Application
    Client/Server VS Web Application" more… Online Training- Corporate Training- IT Support U Can Reach Us On +917386622889 - +919000444287 http://www.21cssindia.com/courses/websphere-admin-online-training-75.html

    ReplyDelete
  2. I just see the post i am so happy the post of information's.So I have really enjoyed and reading your blogs for these posts.


    Weblogic Server 12cR2 Training

    ReplyDelete
  3. Its So Great And Very thankful to you.Very Nice Website Provide Some Valuable Information.Coming to Our self, We are the top most Providers For Urgent Care In Chicago.thanks for Posting Have A Nice Day.

    ReplyDelete
  4. Spell Bound Explanation And Great Information From the Blogger Cleared All My Doubts.Coming to Ourself We are the leading provider for Restaurant Equipment Parts In US.Thanks For Posting.Have A Nice Day.

    ReplyDelete
  5. Really Thanks For Posting Such a Useful and informative article. I would like to share this blog with my friends and Colleagues medical residency in USA

    ReplyDelete
  6. Thanks For Providing Such an Useful and Important Information....

    Just NewsTo U 99

    ReplyDelete
  7. If you are stuck with your management assignment then in this case you can opt for our Law Assignments. we provide the best assignment help online.We also provide Australian Law Assignment Help for students across the globe. for more information contact us +16692714848

    ReplyDelete
  8. Your website is very nice. It provides some interesting insights and stories. If you want to find out how fast you type, you can check your typing speed. You can discover your typing speed using our free typing test profile.

    ReplyDelete