The data source Setup for DB2 in IBM WebSphere Application Server

1) Run Administrative Console once your server is started successfully as shown below.






2) Once the admin console is opened. Go to resources > JDBC > JDBC providers and check if you have existing JDBC providers like DB2 Universal JDBC Driver Provider or DB2 Using IBM JCC Driver etc. if it's present then you can move to data source else create new JDBC providers as shown below.




3. Upon clicking on new JDBC Providers, select Database type as "DB2", select required provider type as for example DB2 Universal JDBC Driver Provider or DB2 Using IBM JCC Driver and connection type as connection pool data source. This JDBC will support the type 4 connection.


4. Once JDBC providers are setup, Go to Datasource and click on new 



5. Provide datasource Name and JNDI name which will be used from your application to connect to the database and click on next.


6. Choose the option "Select an existing JDBC provider" and select the required JDBC provider from the dropdown and click on next. 




7. Enter database-specific properties for the data source as mentioned below and click on next.


8. you will prompt with "Setup security aliases" screen. Skip for now and click on next 


9. Review the Summary and click on Finish


10.  Click on your data source before you go for "Test Connection" to set up security aliases. 


11.  Click on "J2C authentication Data" and click on new to setup user id and password.





 12. Provide user id and details and click on "ok".



13. Go to Data sources screen again and click on your datasource and scroll down to security settings.Select the secutiry alias created before from drowdown of "Component- managed authentication alias" and "container-managed authentication alias" and click on Ok.




14. Go to Data source screen and select the data source that you created and click on test connection and you must see connection successful message as  mentioned below.




Please let me know if you face any issues while setting up the datasource. Thanks and Happy learning. 
















































Comments