This is the latest release in the 6.x.x family. For EI 7.0.0, click here.

All docs This doc
Skip to end of metadata
Go to start of metadata

The following sections describe how to set up an Oracle database to replace the default H2 database in your WSO2 product: 

Setting up the database and users

Follow the steps below to set up an Oracle database.

  1. Create a new database by using the Oracle database configuration assistant (dbca) or manually.

  2. Make the necessary changes in the Oracle tnsnames.ora and listner.ora files in order to define addresses of the databases for establishing connections to the newly created database.

  3. After configuring the .ora files, start the Oracle instance using the following command:

    sudo /etc/init.d/oracle-xe restart
  4. Connect to Oracle using SQL*Plus as SYSDBA as follows:

    ./$<ORACLE_HOME>/config/scripts/ sysadm/password as SYSDBA

  5. Connect to the instance with the username and password using the following command:

  6. As SYSDBA, create a database user and grant privileges to the user as shown below:

    Create user <USER_NAME> identified by <PASSWORD> account unlock;
    grant connect to <USER_NAME>;
    grant create session, create table, create sequence, create trigger to <USER_NAME>;
  7. Exit from the SQL*Plus session by executing the quit command.

Setting up the JDBC driver

  1. Copy the Oracle JDBC libraries (for example, <ORACLE_HOME/jdbc/lib/ojdbc14.jar) to the <PRODUCT_HOME>/lib/ directory.
  2. Remove the old database driver from the <PRODUCT_HOME>/dropins/ directory.

If you get a "timezone region not found" error when using the ojdbc6.jar file with WSO2 servers, set the Java property as follows: export JAVA_OPTS="-Duser.timezone='+05:30'"

The value of this property should be the GMT difference of the country. If it is necessary to set this property permanently, define it inside the as a new JAVA_OPT property.

What's next

By default, all WSO2 products are configured to use the embedded H2 database. To configure your product with Oracle, see Changing to Oracle.

  • No labels