Monday, February 11, 2013

How to create H2 database from H2 DB engine UI

Using following simple steps you can create your own H2 database with in few minutes.

1. Download H2 database engine UI from here.

2. Extract downloaded pack and go to the bin directory.
   ex : "/h2/bin"

3. Start DB console.
    if you are in Linux : sh h2.sh
    if you are in windows : h2.bat


4. Once you start it, you will see H2 database console you browser.
   "https://127.0.1.1:8082/login.jsp?jsessionid=db5908d78d9d265318c24cdcd69697a0"


   

















5. if your console doesn't have H2 configuration go to the ".h2.server.properties" file locates in your home directory (Linux). if you are using windows this will be at user/documents and settings.

6. Open it and add below entry in .h2.server.properties file.
 "2=Generic H2 (Embedded)|org.h2.Driver|jdbc\:h2\:LOCATION-OF-DATABASE-WANT-TO-CRATE"

7. Now restart h2.sh and now you will see H2 configuration.

8. Enter database name what you add in properties file and enter new user name and password to that database.

9. Click connect button and now it creates new database and login to the database.


No comments: