Configuring an External Database for Oozie
The default database for Oozie is the embedded PostgreSQL database. You can also choose to use an external database. The databases that Oozie supports are listed at:
See the following sections for the procedures for setting one of the supported database types for Oozie and configuring database purge settings.
PostgreSQL
Create the Oozie User and Oozie Database
For example, using the PostgreSQL psql command-line tool:
$ psql -U postgres Password for user postgres: ***** postgres=# CREATE ROLE oozie LOGIN ENCRYPTED PASSWORD 'oozie' NOSUPERUSER INHERIT CREATEDB NOCREATEROLE; CREATE ROLE postgres=# CREATE DATABASE "oozie" WITH OWNER = oozie ENCODING = 'UTF8' TABLESPACE = pg_default LC_COLLATE = 'en_US.UTF8' LC_CTYPE = 'en_US.UTF8' CONNECTION LIMIT = -1; CREATE DATABASE postgres=# \q
Configure PostgreSQL to Accept Network Connections for the Oozie User
- Edit the postgresql.conf file and set the listen_addresses property to *, to make sure that the PostgreSQL server starts listening on all your network interfaces. Also make sure that the standard_conforming_strings property is set to off.
- Edit the PostgreSQL data/pg_hba.conf file as follows:
host oozie oozie 0.0.0.0/0 md5
MySQL
See MySQL Database.
Create the Oozie Database and Oozie MySQL User
For example, using the MySQL mysql command-line tool:
$ mysql -u root -p Enter password: mysql> create database oozie default character set utf8; Query OK, 1 row affected (0.00 sec) mysql> grant all privileges on oozie.* to 'oozie'@'localhost' identified by 'oozie'; Query OK, 0 rows affected (0.00 sec) mysql> grant all privileges on oozie.* to 'oozie'@'%' identified by 'oozie'; Query OK, 0 rows affected (0.00 sec) mysql> exit Bye
Oracle
Create the Oozie Oracle User and Grant Privileges
The following example uses the Oracle sqlplus command-line tool, and shows the privileges Cloudera recommends.
$ sqlplus system@localhost Enter password: ****** SQL> create user oozie identified by oozie default tablespace users temporary tablespace temp; User created. SQL> grant alter any index to oozie; grant alter any table to oozie; grant alter database link to oozie; grant create any index to oozie; grant create any sequence to oozie; grant create database link to oozie; grant create session to oozie; grant create table to oozie; grant drop any sequence to oozie; grant select any dictionary to oozie; grant drop any table to oozie; grant create procedure to oozie; grant create trigger to oozie; SQL> exit $
Configuring Oozie Data Purge Settings
You can change your Oozie configuration to control when data is purged in order to improve performance, cut down on database disk usage, or to keep the history for a longer period of time. Limiting the size of the Oozie database can also improve performance during upgrades. See Configuring Oozie Data Purge Settings Using Cloudera Manager.