There are basically two ways to accomplish above mentioned.
1st method
- Download H2 database from[1].
- Extract and cd into the h2/bin directory.
- Stop your carbon server.
- Run sh h2.sh.
- You need to enter correct JDBC URL, User Name and Password and press Connect.
2nd method
This is what interests everyone. In this method you don't need to download anything as we are going to use H2 Console embedded in WSO2 Product.
- Update carbon.xml resides in CARBON_SERVER/repository/conf directory.
- Search for "H2DatabaseConfiguration" and uncomment configuration parameters as in following screen-shot.
- Save the configuration file and start carbon server.
- Browse http://localhost:8082/ in your favorite browser.
- Enter correct JDBC URL, User Name and Password and press Connect. In my scenario,
User Name : wso2carbon
Password : wso2carbon
You will get the H2 Console now.
[1] http://www.h2database.com/html/download.html
If its a Windows environment we have to use jdbc:h2:file:: as the JDBC URL.
ReplyDeleteEg:- jdbc:h2:file:C:\Users\urathnayake\workspace\WSO2METRICS_DB