Querying the Current Confluence Database using JNDI
You can execute a query against the current Confluence database. Here’s how:
Querying the Current Confluence Database without JNDI
The next example shows how to connect to the default Confluence H2 database:
Your database connection configuration is stored in the server.xml or <confluence_home>/confluence.cfg.xml file. For more info have a look at the Atlassian documentation.
Direct database update queries are not recommended in Confluence. Instead, we recommend adding or modifying data using Confluence’s APIs (via ScriptRunner). If you absolutely must modify data in your database via direct database queries, always back up your data before performing any modification to the database.