Database Setup for Oracle
This page provides instructions for configuring Confluence to use an Oracle database.
Before you start
- See Supported Platforms to check your version of Oracle is supported. You may need to upgrade your database before installing Confluence.
- If you're switching from another database, including the embedded evaluation database, read Migrating to Another Database before you begin.
You'll need an experienced Oracle database administrator (DBA) to set up and maintain your database.
Our support team can assist with Confluence problems, but are unable to help you administer your Oracle database.
If you don't have access to an experienced Oracle DBA, consider using a different supported database.
On this page:
Related pages:
1. Install Oracle
If you don't already have an operational Oracle server, download and install it now. See the Oracle documentation for instructions.
When setting up your Oracle server:
- Character encoding must be set to AL32UTF8 (this the Oracle equivalent of Unicode UTF-8).
2. Create database user
To create the user and assign its privileges:
Use the
sqlplus
command to access Oracle via the command linesqlplus user/password <as sysdba|as sysoper>
If you're logging in with the user 'sys' you'll need to include the "as sysdba" or "as sysoper" to determine which sys role you want to use.
Create a Confluence user (for example
confluenceuser
), and grant the following only to that user:create user <user> identified by <password> default tablespace <tablespace_name> quota unlimited on <tablespace_name>; grant connect to <user>; grant resource to <user>; grant create table to <user>; grant create sequence to <user>; grant create trigger to <user>;
It is very important that the user is granted the exact privileges indicated above. Confluence requires only these privileges so you should grant specific privileges to the user. create table, create sequence, and create trigger shouldn't be assigned as part of a role.
Do not grant the user the
select any table
permission. That permission can cause problems with other schemas.When you create a user, specify the
tablespace
for the table objects as shown above.
3. Install Confluence
Check out the Confluence Installation Guide for step-by-step instructions on how to install Confluence on your operating system.
4. Download and install the Oracle thin driver
Due to licensing restrictions, we're not able to bundle an Oracle driver with Confluence. To make your database driver available to Confluence:
- Stop Confluence.
- Head to Database JDBC Drivers and download the appropriate driver. The driver file will be called something like
ojdbc8.jar
- Drop the .jar file in your
<installation-directory>/confluence/WEB-INF/lib
directory. - Restart Confluence then go to
http://localhost:<port>
in your browser to continue the setup process.
5. Enter your database details
The Confluence setup wizard will guide you through the process of connecting Confluence to your database.
Use a JDBC connection (default)
JDBC is the recommended method for connecting to your database.
The Confluence setup wizard will provide you with two setup options:
- Simple - this is the most straightforward way to connect to your database.
- By connection string - use this option if you want to specify additional parameters and are comfortable constructing a database URL.
Depending on the setup type, you'll be prompted for the following information.
Setup type | Field | Description |
---|---|---|
Simple | Hostname | This is the hostname or IP address of your database server. |
Simple | Port | This is the Oracle port. If you didn't change the port when you installed Oracle, it will default to 1521 . |
Simple | Service name | This is the service name (of your confluence database. |
By connection string | Database URL | The database URL is entered in this format: <SERVICE> can be either the SID or Service Name. For example: By default, we use the new style URL provided by the thin driver. You can also use the |
Both | Username | This is the username of your dedicated database user. In the example above, this is confluenceuser . |
Both | Password | This is the password for your dedicated database user. |
Use a JNDI datasource
If you want to use a JNDI datasource, see Configuring a datasource connection for the steps you'll need to take before you set up Confluence, as the setup wizard will only provide the option to use a datasource if it detects a datasource in your Tomcat configuration.
6. Test your database connection
In the database setup screen, hit the Test connection button to check:
- that Confluence can connect to your database server
- that the database character encoding is correct
- that your database user has appropriate permissions for the database
- that your database user has NOT been granted the SELECT ANY TABLE privilege
Once the test is successful, hit Next to continue with the Confluence setup process.
Troubleshooting
- If Confluence complains that it is missing a class file, you may have placed the JDBC driver in the wrong folder.
- The following page contains common issues encountered when setting up your Oracle database to work with Confluence: Known Issues for Oracle.
- There's a known issue when running Oracle with Native Network Encryption that can cause Confluence to become unresponsive. See - CONFSERVER-60152Getting issue details... STATUS for more details and Confluence Unresponsive Due to High Database Connection Latency for some suggested mitigation strategies.
- There's a known issue when username or schema names contain dots. See - CONFSERVER-60274Getting issue details... STATUS for more information.