[Other doc versions]
This page describes how to connect Stash to a Oracle database.
The overall process for using a Oracle database with Stash is:
It is assumed here that you already have Oracle installed and running. For information about installing Oracle and creating Oracle databases, see the Oracle documentation pages. For the versions of Oracle supported by Stash see Supported platforms.
If you are migrating your data from the internal Stash database, back up the Stash home directory.
If you are migrating your Stash data from a different external database, back up that database by following the instructions provided by the database vendor before proceeding with these instructions.
Before you can use Stash with Oracle, you must set up Oracle as follows:
UTF8, to support storage of Unicode data as per the Oracle documentation.
resource roles only. The
connect role is required to set up a connection, while
resource role is required to allow the user to create objects in its own schema.
all_objects view to the user's schema, so that there is no possibility that a table with the same name as one of the Stash tables in another schema will cause any conflicts.
The format of the command to create a user in Oracle is:
Here is a simple example, using SQL*Plus, of how one might create a user called
stash with password
jdHyd6Sn21 in tablespace
users, and grant the user a minimal set of privileges. When you run the command on your machine, remember to replace the user name, password and tablespace names with your own values.
This creates an empty Oracle schema with the name
stash, and a user that can log in from the host that Stash is running on and who has full access to the newly created schema. In particular, the user is allowed to create sessions and tables.
Stash will generally require about 25–30 connections to the database. The maximum number of connections is a configurable system property – see Database pool.
You can now connect Stash to the Oracle database, either:
The host name or IP address of the computer running the Oracle server.
|The TCP port with which Stash can connect to the database server. The default value is the default port that Oracle runs against. You can change that if you know the port that your Oracle instance is using.
|The system identifier of the Oracle instance that Stash should connect to. Stash does not support connecting to
Oracle servers which are using
SIDs or TNS Alias to identify themselves; it requires
the fully qualified Service Name instead.
|The username that Stash should use to access the database.
|The password that Stash should use to access the database.
This section is only relevant to some distributions of Stash, for example if you are running Stash via the Atlassian Plugin SDK, or have built Stash from source.
If the Oracle JDBC driver is not bundled with Stash, you will need to download and install the driver yourself.