# OracleConfigurator Operator

This page introduces the **OracleConfigurator** operator, a workflow operator that allows configuring the optimized parameters of an Oracle instance.

## Prerequisites <a href="#prerequisites" id="prerequisites"></a>

This section provides the minimum requirements that you should meet in order to use the OracleConfigurator operator.

### Supported versions <a href="#supported-versions" id="supported-versions"></a>

* Oracle 12c or later

### Network requirements <a href="#network-requirements" id="network-requirements"></a>

* The Oracle operator must be able to connect to the Oracle URL or IP address and port (default port: 1521).

### Permissions <a href="#permissions" id="permissions"></a>

* The user used to log into the database must have `ALTER SYSTEM` privileges.

### Supported component types <a href="#supported-component-types" id="supported-component-types"></a>

In order to configure the tuned parameters the Oracle Configurator operator requires to be bound to a component with one of the following types:

* Oracle Database 12c
* Oracle Database 18c
* Oracle Database 19c

Databases hosted on Amazon RDS are not supported.

## Configuration options <a href="#configuration-options" id="configuration-options"></a>

When you define an OracleExecutor task in the workflow you should specify some configuration information to allow the operator to connect to the Oracle instance.

You can specify configuration information within the `config` part of the YAML of the instance definition. The operator can also inherit some specific arguments from the `properties` of a bound component when not specified in the task.

### Operator arguments <a href="#required-properties" id="required-properties"></a>

The following table describes all the properties for the definition of a task using the OracleConfigurator operator.

| Field                 | Type    | Description                                                   | Default Value | Restrictions                                                                                                                                                                                                                                                                   | Required        | Source          |
| --------------------- | ------- | ------------------------------------------------------------- | ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | --------------- | --------------- |
| `connection.dsn`      | String  | DSN or EasyConnect string                                     |               | <p>Is possible to define only one of the following sets of configurations:</p><ul><li><code>dsn</code></li><li><code>host</code>, <code>service</code> and optionally <code>port</code></li><li><code>host</code>, <code>sid</code> and optionally <code>port</code></li></ul> |                 | task, component |
| `connection.host`     | String  | Address of the database instance                              |               |                                                                                                                                                                                                                                                                                | task, component |                 |
| `connection.port`     | Integer | listening port of the database instance                       | 1521          |                                                                                                                                                                                                                                                                                | task, component |                 |
| `connection.service`  | String  | Database service name                                         |               |                                                                                                                                                                                                                                                                                | task, component |                 |
| `connection.sid`      | String  | Database SID                                                  |               |                                                                                                                                                                                                                                                                                | task, component |                 |
| `connection.user`     | String  | User name                                                     |               |                                                                                                                                                                                                                                                                                | Yes             | task, component |
| `connection.password` | String  | User password                                                 |               |                                                                                                                                                                                                                                                                                | Yes             | task, component |
| `connection.mode`     | String  | Connection mode                                               |               | `sysdba`, `sysoper`                                                                                                                                                                                                                                                            |                 | task, component |
| `component`           | String  | Name of the component to fetch properties and parameters from |               |                                                                                                                                                                                                                                                                                | Yes             | task            |

### Examples <a href="#examples" id="examples"></a>

#### Update database entries <a href="#update-database-entries" id="update-database-entries"></a>

In the following example, the workflow leverages the OracleConfigurator operator to update the database parameters before triggering the execution of the load test for a component `oracledb`:

```yaml
name: oracledb
componentType: Oracle Database 18c
properties:
  connection:
    user: application
    password: password
    host: oradb.dev.akamas.io
    service: XE
```

```yaml
tasks:
- name: update parameters
  operator: OracleConfigurator
  arguments:
    component: oracledb

- name: run load test
  operator: Executor
  arguments:
    command: sh run_test.sh
    component: generator
```
