Content Server Manual / Version 2307
Table Of Contents
For the Oracle database you need the Oracle JDBC Thin Driver oracle.jdbc.driver.OracleDriver
.
It is available at https://mvnrepository.com/artifact/com.oracle.database.jdbc/ojdbc10
.
Pick the latest version, and add the dependency to the database-drivers
pom.xml,
like this:
<!-- https://mvnrepository.com/artifact/com.oracle.database.jdbc/ojdbc10 --> <dependency> <groupId>com.oracle.database.jdbc</groupId> <artifactId>ojdbc10</artifactId> <version>19.16.0.0</version> </dependency>
You should delete all other dependencies in database-drivers
.
They do not harm, but you do not need them, and libraries always bear
the risk of introducing security vulnerabilities.
There also exists the Oracle OCI driver which could be used. However, this driver can cause some problems:
If the database crashes, the OCI driver hangs/blocks and the Content Server must be restarted.
Connections can hang during rollback.
Problems with the streaming of blobs can occur.
Oracle recommends the thin driver for performance reasons.
Furthermore, the driver needs an additional Oracle client installation on the Content Server host. Therefore, the OCI driver is not recommended.
In order to optimize queries, Oracle gathers statistics about the database content. By default, this process runs once per day, which is an appropriate setting.
The following settings must be made for an Oracle database:
sql.store.driver=oracle.jdbc.driver.OracleDriver sql.store.url=jdbc:oracle:thin:@<DB-HOST>:<DB-PORT>:<DB-INSTANCE> sql.store.user=<DB-USER> sql.store.password=<DB-USER-PASSWORD>
The name of the database user may be given in lowercase, but it must be stored as all uppercase in the database.
The Oracle database instance must be configured with a sufficient number of DB
Cursors. The number is set in the Oracle initialization script init<Instancename>.ora
in the entry open_cursors
(for further details see the documentation of the database
manufacturer).
The number of cursors for a JDBC connection in the CoreMedia Server is calculated with the following formula:
<Number of Cursors> = 110 + (<Number of content types> * 7)
For a server with 15 content types therefore, 215 cursors are needed per connection and an
open_cursors
value of 215 has to be configured, unless other applications require a higher value.
Alternatively the property sql.store.preparedStatementCacheSize
can be used to control the number of open cursors from the Content Server.
This property limits the number of cached prepared SQL statements. If the property is not set, the cache has an
unlimited size and the above formula applies. Otherwise, the value of the property should be at least 50.
Increasing this parameter generally improves the database performance. Set the number of Oracle cursor to the
size of the statement cache plus 10 for other statements that are not prepared, but that still use a cursor when
executed.
create user <DB-USER> identified by <DB-USER-PASSWORD>; grant connect, create view, resource to <DB-USER>;
Example 3.1. Oracle: create DB User
For Oracle 12c you need to add privileges to the user as described in http://docs.oracle.com/database/121/DBSEG/release_changes.htm#BABEBGDI.