FreeKB - Create a data source in WebSphere
Create a data source in WebSphere

Home > Search

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.

Create the data source.

  1. In the left panel of the WebSphere web console, expand Resources > JDBC, and select Data sources.
  2. In the scope drop-down selector, select the scope (node and server or cluster) that the data source will reside on.
  3. Select New.
  4. 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.
  5. Choose "Select an existing JDBC provider" and then select your JDBC provider. Select Next.
  6. When prompted to enter database specific properties for the data source, just select Next.
  7. When prompted to setup the security aliases, keep all selections at none, and select Next. The security aliases will be configured after the J2C alias (username, password) are configured.
  8. 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.

Next, create the J2C alias.


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 in the box below so that we can be sure you are a human.