Monday, August 10, 2015

Creating new Oracle database and connecting it with WSO2 products

When we deal with oracle, creating a new database means creating a new user to hold the tables, therefore let's first create a new user in the oracle database and then connect the bps product as an example.
  • Connect to the oracle database using the following command.
    • CONNECT sys AS sysdba;
    • Enter the password when requested.
  • Now let's create a new user with the name "bps" and password "password".
    • CREATE USER bps IDENTIFIED BY password;
  • Now in-order to create tables we must first grant permission to newly created user using the below command.
    • GRANT ALL PRIVILEGES TO bps;
Now Let's connect the BPS product to newly created oracle user.
  • Modify the below parameters in <BPS_HOME>/repository/conf/datasources/bps-datasources.xml as follows.
                    <url>jdbc:oracle:thin:bps@localhost:1521/xe</url>
                    <username>bps</username>
                    <password>password</password>
                    <driverClassName>oracle.jdbc.driver.OracleDriver</driverClassName>
                    <validationQuery>SELECT 1 FROM DUAL</validationQuery>
    • Leave the other parameters as it is.
  • Copy the ojdbc.jar to  <BPS_HOME>/repository/components/lib/ folder.
  • Restart the BPS server with -Dsetup.
    • sh wso2server.sh -Dsetup

Cheers !!

No comments:

Post a Comment