Friday, April 20, 2012

How to browse the H2 database of WSO2 products?


All the WSO2 products are default shipped with H2 database.
Sometimes, you will be required to browse through the database and see.

This can be easily achieved by enabling the H2DatabaseConfiguration in carbon.xml.
  1. Go to the CARBON_HOME/repository/config
  2. Open the carbon.xml file.
  3. Enable the H2DatabaseConfiguration as follows.

    <H2DatabaseConfiguration>
            <property name="web"/>
            <property name="webPort">8082</property>
            <property name="webAllowOthers"/>        
    </H2DatabaseConfiguration>
    
  1. Start the the server.
  2. Locate your browser to http://localhost:8082
  3. Fill the JDBC URL, username and password as follows.
JDBC URL : jdbc:h2:<file path to CARBON_HOME>/repository/database/WSO2CARBON_DB
username : wso2carbon
password  : wso2carbon
8) Click on connect.