Alfresco recommends that you use a separate Oracle instance for the Sync Service.
Note
Only the Sync Service communicates with the database. It persists events taken from the JMS queue into the database. The repository does not communicate with the database.
The Sync Service isn't packaged with an Oracle driver, so it'll need to be downloaded separately and cited in the start-up. See step Starting the Sync Service.
-
Download the Oracle database connector
ojdbc7.jarfrom the Oracle JDBC Driver download page. -
Copy the JAR file into the same directory as the Sync Service JAR.
The JDBC driver for Oracle is in the JAR file:
ojdbc7.jar.However, if you see the following error, then add the
Doracle.jdbc.thinLogonCapability=o3parameter toJAVA_OPTS:java.sql.SQLException: OAUTH marshaling failure -
The Oracle database must be created with the AL32UTF8 character set. Check the current character set by executing:
SELECT value$ FROM sys.props$ WHERE name = 'NLS_CHARACTERSET' ;Have a look at this quick tutorial to alter the character set: Change Oracle Database Character Set : NLS_CHARACTERSET.
-
Increase the maximum connections setting in the Oracle configuration file. The property
processesspecifies the maximum number of operating system user processes that can simultaneously connect to Oracle. This effectively determines the maximum number of concurrent users in the system.alter system set processes=450 scope=spfileThe value of the
db.pool.maxproperty in theconfig.ymlfile must be less thanprocesses.If there are multiple Sync Service instances forming a cluster hidden behind a load balancer,
processesshould be greater than or equal to the sum of alldb.pool.maxfrom allconfig.ymlfiles.For example, if
processes=450, and there are 3 Sync Service instances, then the correct setting inconfig.ymlisdb.pool.max : 150. -
Create a user with the username given by the sync property,
sql.db.username, with password given by the sync property,sql.db.password:CREATE USER alfresco IDENTIFIED BY admin; -
Grant the alfresco user Connect and Resource privileges in Oracle.
-
Grant the user write permissions on all tables and sequences:
GRANT CONNECT, RESOURCE TO alfresco; -
Configure the privileges by using one of the following commands:
ALTER USER alfresco QUOTA <QUOTE_M> ON Users;or
GRANT UNLIMITED TABLESPACE TO alfrescoNote
If the privileges on tablespace "USERS" aren't set correctly, you may see the following error:
ORA-01950: no privileges on tablespace 'USERS'
-
-
Ensure
sql.db.driverandsql.db.urlare correctly updated in theconfig.ymlfile, for example:sql: db: driver: oracle.jdbc.OracleDriver url: jdbc:oracle:thin:@//localhost:1521/xe