FreeKB - IBM WebSphere Create JDBC data source
IBM WebSphere - Create JDBC data source

Before creating a data source, you will need to add a JDBC driver to WebSphere for the database that you want to connect to, such as MySQL, MariaDB, Oracle, DB2, or SQL Server.


In the WebSphere admin console, expand Resources > JDBC, and select Data sources. In the scope drop-down selector, select the scope (node and server or cluster) that the data source will reside on. If you are not familiar with scopes, check out our scopes article. Select New. At Step 1, give the data source a unique name and a unique JNDI name, such as "jdbc/mySQL" or "jdbc/DB2" or "jdbc/Oracle". Select Next.

 

It is usually best to have already created the JDBC Provider so that you can choose "Select an existing JDBC provider" and then select your JDBC provider.

 

At step 3, in this example, the data source is usng the generic helper class com.ibm.websphere.rsadapter.GenericDataSourceHelper. Each helper class contains error codes for fatal exceptions. In this way, each helper class knows about different fatal errors. Typically, you'll use GenericDataSourceHelper.

 

When prompted to setup the security aliases, if you've already created the J2C alias, you can optionally select the J2C alias. See IBM WebSphere - JDBC data source and J2C alias.

 

Select Finish. The new data source should now be listed. 

 


Configure the database name, port, and hostname.

  1. Select your data source.
  2. Select Custom properties.
  3. Select or add databaseName, enter your database name, and select OK.
  4. Select or add serverName, enter your server hostname, and select OK.
  5. If using MySQL, add serverTimezone, enter UTC, and select OK.
  6. Select Save.

 



Add a Comment




We will never share your name or email with anyone. Enter your email if you would like to be notified when we respond to your comment.




Please enter 693f8 in the box below so that we can be sure you are a human.




Comments

Web design by yours truely - me, myself, and I   |   jeremy.canfield@freekb.net   |