Log out?

Exercise 8.1 – Setting Up the Database


To set up the database to use for SQLXML exercises.


  1. Start H2
    1. The H2 database will be used for these exercises. It is a free, lightweight database, and its also bundled with the eiConsole
    2. To use the bundled H2, the eiConsole must be running. The bundled H2 instance will shut down when the eiConsole does.
    3. From the File Management screen, open the Tools menu and click “H2 Database…”.
    4. A dialog will appear called “H2 Database Manager”. It will say whether or not the H2 Database is currently running.
    5. To start or stop the H2 database, use the “Start the Database” or “Stop the Database” buttons in this dialog. “Return to Console” closes the dialog but leaves the H2 state unchanged.
    6. Once the H2 database is started a web browser window with the H2 login screen should appear.

  2. Sign Into Database
    1. The H2 Login Screen may look slightly different than the screenshot, depending on what the default settings are.
    2. Don’t change the JDBC URL, unless you are an experienced H2 user, and put in “eip” as both the User Name and Password.
    3. Remember or write down the JDBC URL. It will be important in the following exercises.
    4. Click “Connect” to log in.

  3. Create People Table
    1. Locate the sample file create_people.sql.
    2. Open it and copy its contents into the main text box in the H2 browser application.
    3. Execute the SQL query. If done correctly, there should now be a PEOPLE item in the left hand panel, and a success message below the text field.
    4. The People table now exists in the database.

  4. Exit the H2 Console
    1. In the top left corner of the screen, there is a button shaped like the letter “N”.
    2. Click it to close the console and log out.
    3. IMPORTANT: Make sure you always log out of the H2 console before attempting to run a Route from a database exercise. Otherwise, being logged into H2 may prevent another connection from being made.

This is a unique website which will require a more modern browser to work! Please upgrade today!


Our editors are notified.