title: Cannot browse a H2 database file?
body: <p>I am creating a H2 database in my unit tests. The database uses the following properties:</p>
  
  <pre><code>&lt;bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" 
      destroy-method="close"&gt;
    &lt;property name="driverClassName" value="org.h2.Driver"/&gt;
    &lt;property name="url" value="jdbc:h2:file:target/db/testdb"/&gt;
    &lt;property name="username" value="sa"/&gt;
    &lt;property name="password" value=""/&gt;
  &lt;/bean&gt;
  </code></pre>
  
  <p>I am using version 1.3.166 of the <code>com.h2database.h2</code> jar file.</p>
  
  <p>When I run my tests, I see the database created in <code>target/db</code> directory, and a <code>testdb.h2.db</code> file exists. My tests run and load data from the database. I can open the <code>target/db/testdb.h2.db</code> file and see the SQL statements that I used to create the database.</p>
  
  <p>However, when I try to load the <code>target/db/testsb.h2.db</code> file into a database browsing tool such as DBVisualizer, I cannot see any tables or data. For DBVisualizer I specify the H2(Embedded) mode.</p>
  
  <p>I also tried the H2 console but a <code>show tables</code> command returns an empty result set.</p>
  
  <p>I can't see what I am doing wrong: the database file exists, the tests run against it correctly, but I cannot open this file in a database browser.</p>
  
  <p>Any suggestions?</p>