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).
- Collation should be set to
BINARY
.
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
). It's important that this user is only granted the required privileges: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>;
- Specify the
tablespace
for the table objects as shown above. - The
connect
role is required to set up a connection. - The
resource
role is required to allow the user to create objects in its own schema. Theresource
role includescreate table
,create sequence
, andcreate trigger
by default. If you've altered theresource
role to remove these, you'll need to grant these privileges to the user directly, or through some other role. - Don't grant the
select any table
permission as this can cause problems with other schemas.
- Specify the
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. |
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.