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 lineCode Block sqlplus 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:Code Block 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 Database Setup for OracleConfluence 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 Setup for OracleJDBC 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)
Anchor | ||||
---|---|---|---|---|
|
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. |
Expand | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||
To determine the host, port, service name, and/or SID, execute the following command as the user running Oracle (usually 'Oracle'):
Here's an example of the output:
For example, if you are running Confluence on the same server as the Oracle database, with the above
The URL can be used in either a direct JDBC connection or a datasource. See the Oracle JDBC FAQ for more information on Oracle JDBC URLs. |
Use a JNDI datasource
Excerpt Include | ||||||
---|---|---|---|---|---|---|
|
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.