WSO2 products include a default H2 database which would contain the queries,unless you change it to another like MYSQL etc. Specially when debugging , there are instances you need to check and query results in your database tables. So this is how you can access the default H2 database. This is an example on how to access H2 database of API manager. You could follow similar steps for other products as well.
1. Go to <APIM HOME>\repository\conf and open carbon.xml.
2. Enable the following configuration in carbon.xml.
<property name="web" />
<property name="webAllowOthers" />
3. Restart the server.
4.Go to http://localhost:8082 and provide given values for the listed fields to access the DB.
for JDBCURL: jdbc:h2:repository/database/WSO2AM_DB
for username : wso2carbon.
for password: wso2carbon.