

# Using third-party software with your RDS for Oracle DB instance
<a name="Oracle.Resources"></a>

You can host an RDS for Oracle DB instance that supports tools and third-party software.

**Topics**
+ [Using Oracle GoldenGate with Amazon RDS for Oracle](Appendix.OracleGoldenGate.md)
+ [Using the Oracle Repository Creation Utility on RDS for Oracle](Oracle.Resources.RCU.md)
+ [Configuring Oracle Connection Manager on an Amazon EC2 instance](oracle-cman.md)
+ [Installing a Siebel database on Oracle on Amazon RDS](Oracle.Resources.Siebel.md)

# Using Oracle GoldenGate with Amazon RDS for Oracle
<a name="Appendix.OracleGoldenGate"></a>

Oracle GoldenGate collects, replicates, and manages transactional data between databases. It is a log-based change data capture (CDC) and replication software package used with databases for online transaction processing (OLTP) systems. Oracle GoldenGate creates trail files that contain the most recent changed data from the source database. It then pushes these files to the server, where a process converts the trail file into standard SQL to be applied to the target database.

Oracle GoldenGate with RDS for Oracle supports the following features:
+ Active-Active database replication
+ Disaster recovery
+ Data protection
+ In-Region and cross-Region replication
+ Zero-downtime migration and upgrades
+ Data replication between an RDS for Oracle DB instance and a non-Oracle database
**Note**  
For a list of supported databases, see [Oracle Fusion Middleware Supported System Configurations](https://www.oracle.com/middleware/technologies/fusion-certification.html) in the Oracle documentation.

You can use Oracle GoldenGate with RDS for Oracle to upgrade to major versions of Oracle Database. For example, you can use Oracle GoldenGate to upgrade from an Oracle Database 11g on-premises database to Oracle Database 19c on an Amazon RDS DB instance.

**Topics**
+ [Supported versions and licensing options for Oracle GoldenGate](#Appendix.OracleGoldenGate.licensing)
+ [Requirements and limitations for Oracle GoldenGate](#Appendix.OracleGoldenGate.requirements)
+ [Oracle GoldenGate architecture](Appendix.OracleGoldenGate.Overview.md)
+ [Setting up Oracle GoldenGate](Appendix.OracleGoldenGate.setting-up.md)
+ [Working with the EXTRACT and REPLICAT utilities of Oracle GoldenGate](Appendix.OracleGoldenGate.ExtractReplicat.md)
+ [Monitoring Oracle GoldenGate](Appendix.OracleGoldenGate.Monitoring.md)
+ [Troubleshooting Oracle GoldenGate](Appendix.OracleGoldenGate.Troubleshooting.md)

## Supported versions and licensing options for Oracle GoldenGate
<a name="Appendix.OracleGoldenGate.licensing"></a>

You can use Standard Edition 2 (SE2) or Enterprise Edition (EE) of RDS for Oracle with Oracle GoldenGate version 12c and higher. You can use the following Oracle GoldenGate features:
+ Oracle GoldenGate Remote Capture (extract) is supported.
+ Capture (extract) is supported on RDS for Oracle DB instances that use the traditional non-CDB database architecture. Oracle GoldenGate Remote PDB capture is supported on CDBs running Oracle Database 21c or Oracle Database 19c version 19.0.0.0.ru-2024-04.rur-2024-04.r1 or higher.
+ Oracle GoldenGate Remote Delivery (replicat) is supported on RDS for Oracle DB instances that use either the non-CDB or CDB architectures. Remote Delivery supports Integrated Replicat, Parallel Replicat, Coordinated Replicat, and classic Replicat.
+ RDS for Oracle supports the Classic and Microservices architectures of Oracle GoldenGate.
+ Oracle GoldenGate DDL and Sequence value replication is supported when using Integrated capture mode.

You are responsible for managing Oracle GoldenGate licensing (BYOL) for use with Amazon RDS in all AWS Regions. For more information, see [RDS for Oracle licensing options](Oracle.Concepts.Licensing.md).

## Requirements and limitations for Oracle GoldenGate
<a name="Appendix.OracleGoldenGate.requirements"></a>

When you're working with Oracle GoldenGate and RDS for Oracle, consider the following requirements and limitations: 
+ You're responsible for setting up and managing Oracle GoldenGate for use with RDS for Oracle. 
+ You're responsible for setting up an Oracle GoldenGate version that is certified with the source and the target databases. For more information, see [Oracle Fusion Middleware Supported System Configurations](https://www.oracle.com/middleware/technologies/fusion-certification.html) in the Oracle documentation.
+ You can use Oracle GoldenGate on many different AWS environments for many different use cases. If you have a support-related issue relating to Oracle GoldenGate, contact Oracle Support Services.
+ You can use Oracle GoldenGate on RDS for Oracle DB instances that use Oracle Transparent Data Encryption (TDE). To maintain the integrity of replicated data, configure encryption on the Oracle GoldenGate hub using Amazon EBS encrypted volumes or trail file encryption. Also configure encryption for data sent between the Oracle GoldenGate hub and the source and target database instances. RDS for Oracle DB instances support encryption with [Oracle Secure Sockets Layer](Appendix.Oracle.Options.SSL.md) or [Oracle native network encryption](Appendix.Oracle.Options.NetworkEncryption.md).

# Oracle GoldenGate architecture
<a name="Appendix.OracleGoldenGate.Overview"></a>

The Oracle GoldenGate architecture for use with Amazon RDS consists of the following decoupled modules:

Source database  
Your source database can be either an on-premises Oracle database, an Oracle database on an Amazon EC2 instance, or an Oracle database on an Amazon RDS DB instance.

Oracle GoldenGate hub  
An Oracle GoldenGate hub moves transaction information from the source database to the target database. Your hub can be either of the following:  
+ An Amazon EC2 instance with Oracle Database and Oracle GoldenGate installed
+ An on-premises Oracle installation
You can have more than one Amazon EC2 hub. We recommend that you use two hubs if you use Oracle GoldenGate for cross-Region replication.

Target database  
Your target database can be on either an Amazon RDS DB instance, an Amazon EC2 instance, or an on-premises location.

The following sections describe common scenarios for Oracle GoldenGate on Amazon RDS.

**Topics**
+ [On-premises source database and Oracle GoldenGate hub](#Appendix.OracleGoldenGate.on-prem-source-gg-hub)
+ [On-premises source database and Amazon EC2 hub](#Appendix.OracleGoldenGate.on-prem-source-ec2-hub)
+ [Amazon RDS source database and Amazon EC2 hub](#Appendix.OracleGoldenGate.rds-source-ec2-hub)
+ [Amazon EC2 source database and Amazon EC2 hub](#Appendix.OracleGoldenGate.ec2-source-ec2-hub)
+ [Amazon EC2 hubs in different AWS Regions](#Appendix.OracleGoldenGate.cross-region-hubs)

## On-premises source database and Oracle GoldenGate hub
<a name="Appendix.OracleGoldenGate.on-prem-source-gg-hub"></a>

In this scenario, an on-premises Oracle source database and on-premises Oracle GoldenGate hub provides data to a target Amazon RDS DB instance. 

![\[Oracle GoldenGate configuration 0 using Amazon RDS\]](http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/images/oracle-gg0.png)


## On-premises source database and Amazon EC2 hub
<a name="Appendix.OracleGoldenGate.on-prem-source-ec2-hub"></a>

In this scenario, an on-premises Oracle database acts as the source database. It's connected to an Amazon EC2 instance hub. This hub provides data to a target RDS for Oracle DB instance.

![\[Oracle GoldenGate configuration 1 using Amazon RDS\]](http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/images/oracle-gg1.png)


## Amazon RDS source database and Amazon EC2 hub
<a name="Appendix.OracleGoldenGate.rds-source-ec2-hub"></a>

In this scenario, an RDS for Oracle DB instance acts as the source database. It's connected to an Amazon EC2 instance hub. This hub provides data to a target RDS for Oracle DB instance.

![\[Oracle GoldenGate configuration 2 using Amazon RDS\]](http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/images/oracle-gg2.png)


## Amazon EC2 source database and Amazon EC2 hub
<a name="Appendix.OracleGoldenGate.ec2-source-ec2-hub"></a>

In this scenario, an Oracle database on an Amazon EC2 instance acts as the source database. It's connected to an Amazon EC2 instance hub. This hub provides data to a target RDS for Oracle DB instance.

![\[Oracle GoldenGate configuration 3 using Amazon RDS\]](http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/images/oracle-gg3.png)


## Amazon EC2 hubs in different AWS Regions
<a name="Appendix.OracleGoldenGate.cross-region-hubs"></a>

In this scenario, an Oracle database on an Amazon RDS DB instance is connected to an Amazon EC2 instance hub in the same AWS Region. The hub is connected to an Amazon EC2 instance hub in a different AWS Region. This second hub provides data to the target RDS for Oracle DB instance in the same AWS Region as the second Amazon EC2 instance hub.

![\[Oracle GoldenGate configuration 4 using Amazon RDS\]](http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/images/oracle-gg4.png)


**Note**  
Any issues that affect running Oracle GoldenGate on an on-premises environment also affect running Oracle GoldenGate on AWS. We strongly recommend that you monitor the Oracle GoldenGate hub to ensure that `EXTRACT` and `REPLICAT` are resumed if a failover occurs. Because the Oracle GoldenGate hub is run on an Amazon EC2 instance, Amazon RDS does not manage the Oracle GoldenGate hub and cannot ensure that it is running.

# Setting up Oracle GoldenGate
<a name="Appendix.OracleGoldenGate.setting-up"></a>

To set up Oracle GoldenGate using Amazon RDS, configure the hub on an Amazon EC2 instance, and then configure the source and target databases. The following sections give an example of how to set up Oracle GoldenGate for use with Amazon RDS for Oracle.

**Topics**
+ [Setting up an Oracle GoldenGate hub on Amazon EC2](#Appendix.OracleGoldenGate.Hub)
+ [Setting up a source database for use with Oracle GoldenGate on Amazon RDS](#Appendix.OracleGoldenGate.Source)
+ [Setting up a target database for use with Oracle GoldenGate on Amazon RDS](#Appendix.OracleGoldenGate.Target)

## Setting up an Oracle GoldenGate hub on Amazon EC2
<a name="Appendix.OracleGoldenGate.Hub"></a>

To create an Oracle GoldenGate hub on an Amazon EC2 instance, you first create an Amazon EC2 instance with a full client installation of Oracle RDBMS. The Amazon EC2 instance must also have Oracle GoldenGate software installed. The Oracle GoldenGate software versions depend on the source and target database versions. For more information about installing Oracle GoldenGate, see the [Oracle GoldenGate documentation](https://docs.oracle.com/en/middleware/goldengate/core/index.html).

The Amazon EC2 instance that serves as the Oracle GoldenGate hub stores and processes the transaction information from the source database into trail files. To support this process, make sure that you meet the following requirements:
+ You have allocated enough storage for the trail files.
+ The Amazon EC2 instance has enough processing power to manage the amount of data.
+ The EC2 instance has enough memory to store the transaction information before it's written to the trail file.

**To set up an Oracle GoldenGate classic architecture hub on an Amazon EC2 instance**

1. Create subdirectories in the Oracle GoldenGate directory.

   In the Amazon EC2 command line shell, start `ggsci`, the Oracle GoldenGate command interpreter. The `CREATE SUBDIRS` command creates subdirectories under the `/gg` directory for parameter, report, and checkpoint files.

   ```
   prompt$ cd /gg
   prompt$ ./ggsci
   
   GGSCI> CREATE SUBDIRS
   ```

1. Configure the `mgr.prm` file.

   The following example adds lines to the `$GGHOME/dirprm/mgr.prm` file.

   ```
   PORT 8199
   PurgeOldExtracts ./dirdat/*, UseCheckpoints, MINKEEPDAYS 5
   ```

1. Start the manager.

   The following example starts `ggsci` and runs the `start mgr` command.

   ```
   GGSCI> start mgr
   ```

The Oracle GoldenGate hub is now ready for use.

## Setting up a source database for use with Oracle GoldenGate on Amazon RDS
<a name="Appendix.OracleGoldenGate.Source"></a>

Complete the following tasks to set up a source database for use with Oracle GoldenGate.

**Topics**
+ [Step 1: Turn on supplemental logging on the source database](#Appendix.OracleGoldenGate.Source.Logging)
+ [Step 2: Set the ENABLE\$1GOLDENGATE\$1REPLICATION initialization parameter to true](#Appendix.OracleGoldenGate.Source.enable-gg-rep)
+ [Step 3: Set the log retention period on the source database](#Appendix.OracleGoldenGate.Source.Retention)
+ [Step 4: Create an Oracle GoldenGate user account on the source database](#Appendix.OracleGoldenGate.Source.Account)
+ [Step 5: Grant user account privileges on the source database](#Appendix.OracleGoldenGate.Source.Privileges)
+ [Step 6: Add a TNS alias for the source database](#Appendix.OracleGoldenGate.Source.TNS)

### Step 1: Turn on supplemental logging on the source database
<a name="Appendix.OracleGoldenGate.Source.Logging"></a>

To turn on the minimum database-level supplemental logging, run the following PL/SQL procedure: 

```
EXEC rdsadmin.rdsadmin_util.alter_supplemental_logging(p_action => 'ADD')
```

### Step 2: Set the ENABLE\$1GOLDENGATE\$1REPLICATION initialization parameter to true
<a name="Appendix.OracleGoldenGate.Source.enable-gg-rep"></a>

When you set the `ENABLE_GOLDENGATE_REPLICATION` initialization parameter to `true`, it allows database services to support logical replication. If your source database is on an Amazon RDS DB instance, make sure that you have a parameter group assigned to the DB instance with the `ENABLE_GOLDENGATE_REPLICATION` initialization parameter set to `true`. For more information about the `ENABLE_GOLDENGATE_REPLICATION` initialization parameter, see the [Oracle Database documentation](https://docs.oracle.com/en/database/oracle/oracle-database/19/refrn/ENABLE_GOLDENGATE_REPLICATION.html).

### Step 3: Set the log retention period on the source database
<a name="Appendix.OracleGoldenGate.Source.Retention"></a>

Make sure that you configure the source database to retain archived redo logs. Consider the following guidelines:
+ Specify the duration for log retention in hours. The minimum value is one hour.
+ Set the duration to exceed any potential downtime of the source DB instance, any potential period of communication, and any potential period of networking issues for the source instance. Such a duration lets Oracle GoldenGate recover logs from the source instance as needed.
+ Ensure that you have sufficient storage on your instance for the files.

For example, set the retention period for archived redo logs to 24 hours.

```
EXEC rdsadmin.rdsadmin_util.set_configuration('archivelog retention hours',24)
```

If you don't have log retention enabled, or if the retention value is too small, you receive an error message similar to the following.

```
2022-03-06 06:17:27  ERROR   OGG-00446  error 2 (No such file or directory) 
opening redo log /rdsdbdata/db/GGTEST3_A/onlinelog/o1_mf_2_9k4bp1n6_.log for sequence 1306 
Not able to establish initial position for begin time 2022-03-06 06:16:55.
```

Because your DB instance retains your archived redo logs, make sure that you have sufficient space for the files. To see how much space you have used in the last *num\$1hours* hours, run the following query, replacing *num\$1hours* with the number of hours.

```
SELECT SUM(BLOCKS * BLOCK_SIZE) BYTES FROM V$ARCHIVED_LOG 
   WHERE NEXT_TIME>=SYSDATE-num_hours/24 AND DEST_ID=1;
```

### Step 4: Create an Oracle GoldenGate user account on the source database
<a name="Appendix.OracleGoldenGate.Source.Account"></a>

Oracle GoldenGate runs as a database user and requires the appropriate database privileges to access the redo and archived redo logs for the source database. To provide these, create a user account on the source database. For more information about the permissions for an Oracle GoldenGate user account, see the [Oracle documentation](https://docs.oracle.com/en/middleware/goldengate/core/19.1/oracle-db/establishing-oracle-goldengate-credentials.html#GUID-79122058-27B0-4FB6-B3DC-B7D1B67EB053).

The following statements create a user account named `oggadm1`. 

```
CREATE TABLESPACE administrator;
CREATE USER oggadm1  IDENTIFIED BY "password"
   DEFAULT TABLESPACE ADMINISTRATOR TEMPORARY TABLESPACE TEMP;
ALTER USER oggadm1 QUOTA UNLIMITED ON administrator;
```

**Note**  
Specify a password other than the prompt shown here as a security best practice.

### Step 5: Grant user account privileges on the source database
<a name="Appendix.OracleGoldenGate.Source.Privileges"></a>

In this task, you grant necessary account privileges for database users on your source database.

**To grant account privileges on the source database**

1. Grant the necessary privileges to the Oracle GoldenGate user account using the SQL command `grant` and the `rdsadmin.rdsadmin_util` procedure `grant_sys_object`. The following statements grant privileges to a user named `oggadm1`.

   ```
   GRANT CREATE SESSION, ALTER SESSION TO oggadm1;
   GRANT RESOURCE TO oggadm1;
   GRANT SELECT ANY DICTIONARY TO oggadm1;
   GRANT FLASHBACK ANY TABLE TO oggadm1;
   GRANT SELECT ANY TABLE TO oggadm1;
   GRANT SELECT_CATALOG_ROLE TO rds_master_user_name WITH ADMIN OPTION;
   EXEC rdsadmin.rdsadmin_util.grant_sys_object ('DBA_CLUSTERS', 'OGGADM1');
   GRANT EXECUTE ON DBMS_FLASHBACK TO oggadm1;
   GRANT SELECT ON SYS.V_$DATABASE TO oggadm1;
   GRANT ALTER ANY TABLE TO oggadm1;
   ```

1. Grant the privileges needed by a user account to be an Oracle GoldenGate administrator. Run the following PL/SQL program.

   ```
   EXEC rdsadmin.rdsadmin_dbms_goldengate_auth.grant_admin_privilege (
       grantee                 => 'OGGADM1',
       privilege_type          => 'capture',
       grant_select_privileges => true, 
       do_grants               => TRUE);
   ```

   To revoke privileges, use the procedure `revoke_admin_privilege` in the same package.

### Step 6: Add a TNS alias for the source database
<a name="Appendix.OracleGoldenGate.Source.TNS"></a>

Add the following entry to `$ORACLE_HOME/network/admin/tnsnames.ora` in the Oracle home to be used by the `EXTRACT` process. For more information on the `tnsnames.ora` file, see the [Oracle documentation](https://docs.oracle.com/en/database/oracle/oracle-database/19/netrf/local-naming-parameters-in-tns-ora-file.html#GUID-7F967CE5-5498-427C-9390-4A5C6767ADAA).

```
OGGSOURCE=
   (DESCRIPTION= 
        (ENABLE=BROKEN)
        (ADDRESS_LIST= 
            (ADDRESS=(PROTOCOL=TCP)(HOST=goldengate-source.abcdef12345.us-west-2.rds.amazonaws.com)(PORT=8200)))
        (CONNECT_DATA=(SERVICE_NAME=ORCL))
    )
```

## Setting up a target database for use with Oracle GoldenGate on Amazon RDS
<a name="Appendix.OracleGoldenGate.Target"></a>

In this task, you set up a target DB instance for use with Oracle GoldenGate.

**Topics**
+ [Step 1: Set the ENABLE\$1GOLDENGATE\$1REPLICATION initialization parameter to true](#Appendix.OracleGoldenGate.Target.enable-gg-rep)
+ [Step 2: Create an Oracle GoldenGate user account on the target database](#Appendix.OracleGoldenGate.Target.User)
+ [Step 3: Grant account privileges on the target database](#Appendix.OracleGoldenGate.Target.Privileges)
+ [Step 4: Add a TNS alias for the target database](#Appendix.OracleGoldenGate.Target.TNS)

### Step 1: Set the ENABLE\$1GOLDENGATE\$1REPLICATION initialization parameter to true
<a name="Appendix.OracleGoldenGate.Target.enable-gg-rep"></a>

When you set the `ENABLE_GOLDENGATE_REPLICATION` initialization parameter is to `true`, it allows database services to support logical replication. If your source database is on an Amazon RDS DB instance, make sure that you have a parameter group assigned to the DB instance with the `ENABLE_GOLDENGATE_REPLICATION` initialization parameter set to `true`. For more information about the `ENABLE_GOLDENGATE_REPLICATION` initialization parameter, see the [Oracle Database documentation](https://docs.oracle.com/en/database/oracle/oracle-database/19/refrn/ENABLE_GOLDENGATE_REPLICATION.html).

### Step 2: Create an Oracle GoldenGate user account on the target database
<a name="Appendix.OracleGoldenGate.Target.User"></a>

Oracle GoldenGate runs as a database user and requires the appropriate database privileges. To make sure it has these privileges, create a user account on the target database.

The following statement creates a user named `oggadm1`.

```
CREATE TABLESPSACE administrator;
CREATE USER oggadm1  IDENTIFIED BY "password" 
   DEFAULT TABLESPACE administrator 
   TEMPORARY TABLESPACE temp;
ALTER USER oggadm1 QUOTA UNLIMITED ON administrator;
```

**Note**  
Specify a password other than the prompt shown here as a security best practice.

### Step 3: Grant account privileges on the target database
<a name="Appendix.OracleGoldenGate.Target.Privileges"></a>

In this task, you grant necessary account privileges for database users on your target database.

**To grant account privileges on the target database**

1. Grant necessary privileges to the Oracle GoldenGate user account on the target database. In the following example, you grant privileges to `oggadm1`.

   ```
   GRANT CREATE SESSION        TO oggadm1;
   GRANT ALTER SESSION         TO oggadm1;
   GRANT CREATE CLUSTER        TO oggadm1;
   GRANT CREATE INDEXTYPE      TO oggadm1;
   GRANT CREATE OPERATOR       TO oggadm1;
   GRANT CREATE PROCEDURE      TO oggadm1;
   GRANT CREATE SEQUENCE       TO oggadm1;
   GRANT CREATE TABLE          TO oggadm1;
   GRANT CREATE TRIGGER        TO oggadm1;
   GRANT CREATE TYPE           TO oggadm1;
   GRANT SELECT ANY DICTIONARY TO oggadm1;
   GRANT CREATE ANY TABLE      TO oggadm1;
   GRANT ALTER ANY TABLE       TO oggadm1;
   GRANT LOCK ANY TABLE        TO oggadm1;
   GRANT SELECT ANY TABLE      TO oggadm1;
   GRANT INSERT ANY TABLE      TO oggadm1;
   GRANT UPDATE ANY TABLE      TO oggadm1;
   GRANT DELETE ANY TABLE      TO oggadm1;
   ```

1. Grant the privileges needed by a user account to be an Oracle GoldenGate administrator. Run the following PL/SQL program.

   ```
   EXEC rdsadmin.rdsadmin_dbms_goldengate_auth.grant_admin_privilege (
       grantee                 => 'OGGADM1',
       privilege_type          => 'apply',
       grant_select_privileges => true, 
       do_grants               => TRUE);
   ```

   To revoke privileges, use the procedure `revoke_admin_privilege` in the same package.

### Step 4: Add a TNS alias for the target database
<a name="Appendix.OracleGoldenGate.Target.TNS"></a>

Add the following entry to `$ORACLE_HOME/network/admin/tnsnames.ora` in the Oracle home to be used by the `REPLICAT` process. For Oracle Multitenant databases, make sure that the TNS alias points to the service name of the PDB. For more information on the `tnsnames.ora` file, see the [Oracle documentation](https://docs.oracle.com/en/database/oracle/oracle-database/19/netrf/local-naming-parameters-in-tns-ora-file.html#GUID-7F967CE5-5498-427C-9390-4A5C6767ADAA).

```
OGGTARGET=
    (DESCRIPTION= 
        (ENABLE=BROKEN)
        (ADDRESS_LIST= 
            (ADDRESS=(PROTOCOL=TCP)(HOST=goldengate-target.abcdef12345.us-west-2.rds.amazonaws.com)(PORT=8200)))
        (CONNECT_DATA=(SERVICE_NAME=ORCL))
    )
```

# Working with the EXTRACT and REPLICAT utilities of Oracle GoldenGate
<a name="Appendix.OracleGoldenGate.ExtractReplicat"></a>

The Oracle GoldenGate utilities `EXTRACT` and `REPLICAT` work together to keep the source and target databases in sync via incremental transaction replication using trail files. All changes that occur on the source database are automatically detected by `EXTRACT`, then formatted and transferred to trail files on the Oracle GoldenGate on-premises or Amazon EC2 instance hub. After initial load is completed, the data is read from these files and replicated to the target database by the `REPLICAT` utility.

## Running the Oracle GoldenGate EXTRACT utility
<a name="Appendix.OracleGoldenGate.Extract"></a>

The `EXTRACT` utility retrieves, converts, and outputs data from the source database to trail files. The basic process is as follows:

1. `EXTRACT` queues transaction details to memory or to temporary disk storage.

1. The source database commits the transaction.

1. `EXTRACT` writes the transaction details to a trail file.

1. The trail file routes these details to the Oracle GoldenGate on-premises or the Amazon EC2 instance hub and then to the target database.

The following steps start the `EXTRACT` utility, capture the data from `EXAMPLE.TABLE` in source database `OGGSOURCE`, and create the trail files. 

**To run the EXTRACT utility**

1. Configure the `EXTRACT` parameter file on the Oracle GoldenGate hub (on-premises or Amazon EC2 instance). The following listing shows an example `EXTRACT` parameter file named `$GGHOME/dirprm/eabc.prm`.

   ```
   EXTRACT EABC
    
   USERID oggadm1@OGGSOURCE, PASSWORD "my-password"
   EXTTRAIL /path/to/goldengate/dirdat/ab 
    
   IGNOREREPLICATES
   GETAPPLOPS
   TRANLOGOPTIONS EXCLUDEUSER OGGADM1
   	 
   TABLE EXAMPLE.TABLE;
   ```

1. On the Oracle GoldenGate hub, log in to the source database and launch the Oracle GoldenGate command line interface `ggsci`. The following example shows the format for logging in.

   ```
   dblogin oggadm1@OGGSOURCE
   ```

1. Add transaction data to turn on supplemental logging for the database table.

   ```
   add trandata EXAMPLE.TABLE
   ```

1. Using the `ggsci` command line, enable the `EXTRACT` utility using the following commands.

   ```
   add extract EABC tranlog, INTEGRATED tranlog, begin now
   add exttrail /path/to/goldengate/dirdat/ab 
      extract EABC, 
      MEGABYTES 100
   ```

1. Register the `EXTRACT` utility with the database so that the archive logs are not deleted. This task allows you to recover old, uncommitted transactions if necessary. To register the `EXTRACT` utility with the database, use the following command.

   ```
   register EXTRACT EABC, DATABASE
   ```

1. Start the `EXTRACT` utility with the following command.

   ```
   start EABC
   ```

## Running the Oracle GoldenGate REPLICAT utility
<a name="Appendix.OracleGoldenGate.Replicat"></a>

The `REPLICAT` utility "pushes" transaction information in the trail files to the target database.

The following steps enable and start the `REPLICAT` utility so that it can replicate the captured data to the table `EXAMPLE.TABLE` in target database `OGGTARGET`.

**To run the REPLICATE utility**

1. Configure the `REPLICAT` parameter file on the Oracle GoldenGate hub (on-premises or EC2 instance). The following listing shows an example `REPLICAT` parameter file named `$GGHOME/dirprm/rabc.prm`.

   ```
   REPLICAT RABC
    
   USERID oggadm1@OGGTARGET, password "my-password"
    
   ASSUMETARGETDEFS
   MAP EXAMPLE.TABLE, TARGET EXAMPLE.TABLE;
   ```
**Note**  
Specify a password other than the prompt shown here as a security best practice.

1. Log in to the target database and launch the Oracle GoldenGate command line interface (`ggsci`). The following example shows the format for logging in.

   ```
   dblogin userid oggadm1@OGGTARGET
   ```

1. Using the `ggsci` command line, add a checkpoint table. The user indicated should be the Oracle GoldenGate user account, not the target table schema owner. The following example creates a checkpoint table named `gg_checkpoint`.

   ```
   add checkpointtable oggadm1.oggchkpt
   ```

1. To enable the `REPLICAT` utility, use the following command.

   ```
   add replicat RABC EXTTRAIL /path/to/goldengate/dirdat/ab CHECKPOINTTABLE oggadm1.oggchkpt 
   ```

1. Start the `REPLICAT` utility by using the following command.

   ```
   start RABC
   ```

# Monitoring Oracle GoldenGate
<a name="Appendix.OracleGoldenGate.Monitoring"></a>

When you use Oracle GoldenGate for replication, make sure that the Oracle GoldenGate process is up and running and the source and target databases are synchronized. You can use the following monitoring tools:
+ [Amazon CloudWatch](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/WhatIsCloudWatch.html) is a monitoring service that is used in this pattern to monitor GoldenGate error logs.
+ [Amazon SNS](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/US_SetupSNS.html) is a message notification service that is used in this pattern to send email notifications.

For detailed instructions, see [Monitor Oracle GoldenGate logs by using Amazon CloudWatch](https://docs.aws.amazon.com/prescriptive-guidance/latest/patterns/monitor-oracle-goldengate-logs-by-using-amazon-cloudwatch.html).

# Troubleshooting Oracle GoldenGate
<a name="Appendix.OracleGoldenGate.Troubleshooting"></a>

This section explains the most common issues when using Oracle GoldenGate with Amazon RDS for Oracle.

**Topics**
+ [Error opening an online redo log](#Appendix.OracleGoldenGate.Troubleshooting.Logs)
+ [Oracle GoldenGate appears to be properly configured but replication is not working](#Appendix.OracleGoldenGate.Troubleshooting.Replication)
+ [Integrated REPLICAT slow due to query on SYS."\$1DBA\$1APPLY\$1CDR\$1INFO"](#Appendix.OracleGoldenGate.IR)

## Error opening an online redo log
<a name="Appendix.OracleGoldenGate.Troubleshooting.Logs"></a>

Make sure that you configure your databases to retain archived redo logs. Consider the following guidelines:
+ Specify the duration for log retention in hours. The minimum value is one hour.
+ Set the duration to exceed any potential downtime of the source DB instance, any potential period of communication, and any potential period of networking issues for the source DB instance. Such a duration lets Oracle GoldenGate recover logs from the source DB instance as needed.
+ Ensure that you have sufficient storage on your instance for the files.

If you don't have log retention enabled, or if the retention value is too small, you receive an error message similar to the following.

```
2022-03-06 06:17:27  ERROR   OGG-00446  error 2 (No such file or directory) 
opening redo log /rdsdbdata/db/GGTEST3_A/onlinelog/o1_mf_2_9k4bp1n6_.log for sequence 1306 
Not able to establish initial position for begin time 2022-03-06 06:16:55.
```

## Oracle GoldenGate appears to be properly configured but replication is not working
<a name="Appendix.OracleGoldenGate.Troubleshooting.Replication"></a>

For pre-existing tables, you must specify the SCN that Oracle GoldenGate works from.

**To fix this issue**

1. Log in to the source database and launch the Oracle GoldenGate command line interface (`ggsci`). The following example shows the format for logging in.

   ```
   dblogin userid oggadm1@OGGSOURCE
   ```

1. Using the `ggsci` command line, set up the start SCN for the `EXTRACT` process. The following example sets the SCN to 223274 for the `EXTRACT`.

   ```
   ALTER EXTRACT EABC SCN 223274
   start EABC
   ```

1. Log in to the target database. The following example shows the format for logging in.

   ```
   dblogin userid oggadm1@OGGTARGET
   ```

1. Using the `ggsci` command line, set up the start SCN for the `REPLICAT` process. The following example sets the SCN to 223274 for the `REPLICAT`.

   ```
   start RABC atcsn 223274
   ```

## Integrated REPLICAT slow due to query on SYS."\$1DBA\$1APPLY\$1CDR\$1INFO"
<a name="Appendix.OracleGoldenGate.IR"></a>

Oracle GoldenGate Conflict Detection and Resolution (CDR) provides basic conflict resolution routines. For example, CDR can resolve a unique conflict for an `INSERT` statement.

When CDR resolves a collision, it can insert records into the exception table `_DBA_APPLY_CDR_INFO` temporarily. Integrated `REPLICAT` deletes these records later. In a rare scenario, the integrated `REPLICAT` can process a large number of collisions, but a new integrated `REPLICAT` does not replace it. Instead of being removed, the existing rows in `_DBA_APPLY_CDR_INFO` are orphaned. Any new integrated `REPLICAT` processes slow down because they are querying orphaned rows in `_DBA_APPLY_CDR_INFO`.

To remove all rows from `_DBA_APPLY_CDR_INFO`, use the Amazon RDS procedure `rdsadmin.rdsadmin_util.truncate_apply$_cdr_info`. This procedure is released as part of the October 2020 release and patch update. The procedure is available in the following database versions:
+ [ Version 21.0.0.0.ru-2022-01.rur-2022-01.r1](https://docs.aws.amazon.com/AmazonRDS/latest/OracleReleaseNotes/oracle-version-21-0.html#oracle-version-RU-RUR.21.0.0.0.ru-2022-01.rur-2022-01.r1) and higher
+ [ Version 19.0.0.0.ru-2020-10.rur-2020-10.r1](https://docs.aws.amazon.com/AmazonRDS/latest/OracleReleaseNotes/oracle-version-19-0.html#oracle-version-RU-RUR.19.0.0.0.ru-2020-10.rur-2020-10.r1) and higher

The following example truncates the table `_DBA_APPLY_CDR_INFO`.

```
SET SERVEROUTPUT ON SIZE 2000
EXEC rdsadmin.rdsadmin_util.truncate_apply$_cdr_info;
```

# Using the Oracle Repository Creation Utility on RDS for Oracle
<a name="Oracle.Resources.RCU"></a>

You can use Amazon RDS to host an RDS for Oracle DB instance that holds the schemas to support your Oracle Fusion Middleware components. Before you can use Fusion Middleware components, create and populate schemas for them in your database. You create and populate the schemas by using the Oracle Repository Creation Utility (RCU).

## Supported versions and licensing options for RCU
<a name="Oracle.Resources.RCU.Versions"></a>

Amazon RDS supports Oracle Repository Creation Utility (RCU) version 12c only. You can use the RCU in the following configurations: 
+ RCU 12c with Oracle Database 21c
+ RCU 12c with Oracle Database 19c

Before you can use RCU, make sure that you do the following:
+ Obtain a license for Oracle Fusion Middleware.
+ Follow the Oracle licensing guidelines for the Oracle database that hosts the repository. For more information, see [ Oracle Fusion Middleware Licensing Information User Manual](https://docs.oracle.com/en/middleware/fusion-middleware/fmwlc/) in the Oracle documentation.

Fusion MiddleWare supports repositories on Oracle Database Enterprise Edition and Standard Edition 2. Oracle recommends Enterprise Edition for production installations that require partitioning and installations that require online index rebuild.

Before you create your RDS for Oracle instance, confirm the Oracle database version that you need to support the components that you want to deploy. To find the requirements for the Fusion Middleware components and versions you want to deploy, use the Certification Matrix. For more information, see [Oracle Fusion Middleware Supported System Configurations](http://www.oracle.com/technetwork/middleware/ias/downloads/fusion-certification-100350.html) in the Oracle documentation. 

Amazon RDS supports Oracle database version upgrades as needed. For more information, see [Upgrading a DB instance engine version](USER_UpgradeDBInstance.Upgrading.md). 

## Requirements and limitations for RCU
<a name="Oracle.Resources.RCU.BeforeYouBegin"></a>

To use RCU, you need an Amazon VPC. Your Amazon RDS DB instance must be available only to your Fusion Middleware components, and not to the public Internet. Thus, host your Amazon RDS DB instance in a private subnet, which provides greater security. You also need an RDS for Oracle DB instance. For more information, see [Creating and connecting to an Oracle DB instance](CHAP_GettingStarted.CreatingConnecting.Oracle.md).

You can store the schemas for any Fusion Middleware components in your Amazon RDS DB instance. The following schemas have been verified to install correctly: 
+ Analytics (ACTIVITIES)
+ Audit Services (IAU)
+ Audit Services Append (IAU\$1APPEND)
+ Audit Services Viewer (IAU\$1VIEWER)
+ Discussions (DISCUSSIONS)
+ Metadata Services (MDS)
+ Oracle Business Intelligence (BIPLATFORM)
+ Oracle Platform Security Services (OPSS)
+ Portal and Services (WEBCENTER)
+ Portlet Producers (PORTLET)
+ Service Table (STB)
+ SOA Infrastructure (SOAINFRA)
+ User Messaging Service (UCSUMS)
+ WebLogic Services (WLS)

## Guidelines for using RCU
<a name="Oracle.Resources.RCU.Recommendations"></a>

The following are some recommendations for working with your DB instance in this scenario: 
+ We recommend that you use Multi-AZ for production workloads. For more information about working with multiple Availability Zones, see [Regions, Availability Zones, and Local Zones](Concepts.RegionsAndAvailabilityZones.md). 
+ For additional security, Oracle recommends that you use Transparent Data Encryption (TDE) to encrypt your data at rest. If you have an Enterprise Edition license that includes the Advanced Security Option, you can enable encryption at rest by using the TDE option. For more information, see [Oracle Transparent Data Encryption](Appendix.Oracle.Options.AdvSecurity.md). 

  Amazon RDS also provides an encryption at rest option for all database editions. For more information, see [Encrypting Amazon RDS resources](Overview.Encryption.md). 
+ Configure your VPC Security Groups to allow communication between your application servers and your Amazon RDS DB instance. The application servers that host the Fusion Middleware components can be on Amazon EC2 or on-premises. 

## Running RCU
<a name="Oracle.Resources.RCU.Installing"></a>

To create and populate the schemas to support your Fusion Middleware components, use the Oracle Repository Creation Utility (RCU). You can run RCU in different ways.

**Topics**
+ [Running RCU using the command line in one step](#Oracle.Resources.RCU.SilentSingle)
+ [Running RCU using the command line in multiple steps](#Oracle.Resources.RCU.SilentMulti)
+ [Running RCU in interactive mode](#Oracle.Resources.RCU.Interactive)

### Running RCU using the command line in one step
<a name="Oracle.Resources.RCU.SilentSingle"></a>

If you don't need to edit any of your schemas before populating them, you can run RCU in a single step. Otherwise, see the following section for running RCU in multiple steps. 

You can run the RCU in silent mode by using the command-line parameter `-silent`. When you run RCU in silent mode, you can avoid entering passwords on the command line by creating a text file containing the passwords. Create a text file with the password for `dbUser` on the first line, and the password for each component on subsequent lines. You specify the name of the password file as the last parameter to the RCU command. 

**Example**  
The following example creates and populates schemas for the SOA Infrastructure component (and its dependencies) in a single step.   
For Linux, macOS, or Unix:  

```
export ORACLE_HOME=/u01/app/oracle/product/12.2.1.0/fmw
export JAVA_HOME=/usr/java/jdk1.8.0_65
${ORACLE_HOME}/oracle_common/bin/rcu \
-silent \
-createRepository \
-connectString ${dbhost}:${dbport}:${dbname} \
-dbUser ${dbuser} \
-dbRole Normal \
-honorOMF \
-schemaPrefix ${SCHEMA_PREFIX} \
-component MDS \
-component STB \
-component OPSS \
-component IAU \
-component IAU_APPEND \
-component IAU_VIEWER \
-component UCSUMS \
-component WLS \
-component SOAINFRA \
-f < /tmp/passwordfile.txt
```

For more information, see [ Running Repository Creation Utility from the command line](https://docs.oracle.com/middleware/1221/core/RCUUG/GUID-0D3A2959-7CC8-4001-997E-718ADF04C5F2.htm#RCUUG248) in the Oracle documentation. 

### Running RCU using the command line in multiple steps
<a name="Oracle.Resources.RCU.SilentMulti"></a>

To manually edit your schema scripts, run RCU in multiple steps: 

1. Run RCU in **Prepare Scripts for System Load** mode by using the `-generateScript` command-line parameter to create the scripts for your schemas. 

1. Manually edit and run the generated script `script_systemLoad.sql`. 

1. Run RCU again in **Perform Product Load** mode by using the `-dataLoad` command-line parameter to populate the schemas. 

1. Run the generated cleanup script `script_postDataLoad.sql`.

To run RCU in silent mode, specify the command-line parameter `-silent`. When you run RCU in silent mode, you can avoid typing passwords on the command line by creating a text file containing the passwords. Create a text file with the password for `dbUser` on the first line, and the password for each component on subsequent lines. Specify the name of the password file as the last parameter to the RCU command. 

**Example**  
The following example creates schema scripts for the SOA Infrastructure component and its dependencies.   
For Linux, macOS, or Unix:  

```
export ORACLE_HOME=/u01/app/oracle/product/12.2.1.0/fmw
export JAVA_HOME=/usr/java/jdk1.8.0_65
${ORACLE_HOME}/oracle_common/bin/rcu \
-silent \
-generateScript \
-connectString ${dbhost}:${dbport}:${dbname} \
-dbUser ${dbuser} \
-dbRole Normal \
-honorOMF \
[-encryptTablespace true] \
-schemaPrefix ${SCHEMA_PREFIX} \
-component MDS \
-component STB \
-component OPSS \
-component IAU \
-component IAU_APPEND \
-component IAU_VIEWER \
-component UCSUMS \
-component WLS \
-component SOAINFRA \
-scriptLocation /tmp/rcuscripts \
-f < /tmp/passwordfile.txt
```
Now you can edit the generated script, connect to your Oracle DB instance, and run the script. The generated script is named `script_systemLoad.sql`. For information about connecting to your Oracle DB instance, see [Step 3: Connect your SQL client to an Oracle DB instance](CHAP_GettingStarted.CreatingConnecting.Oracle.md#CHAP_GettingStarted.Connecting.Oracle).   
The following example populates the schemas for the SOA Infrastructure component (and its dependencies).   
For Linux, macOS, or Unix:  

```
export JAVA_HOME=/usr/java/jdk1.8.0_65
${ORACLE_HOME}/oracle_common/bin/rcu \
-silent \
-dataLoad \
-connectString ${dbhost}:${dbport}:${dbname} \
-dbUser ${dbuser} \
-dbRole Normal \
-honorOMF \
-schemaPrefix ${SCHEMA_PREFIX} \
-component MDS \
-component STB \
-component OPSS \
-component IAU \
-component IAU_APPEND \
-component IAU_VIEWER \
-component UCSUMS \
-component WLS \
-component SOAINFRA \
-f < /tmp/passwordfile.txt
```
To finish, you connect to your Oracle DB instance, and run the clean-up script. The script is named `script_postDataLoad.sql`. 

For more information, see [ Running Repository Creation Utility from the command line](https://docs.oracle.com/middleware/1221/core/RCUUG/GUID-0D3A2959-7CC8-4001-997E-718ADF04C5F2.htm#RCUUG248) in the Oracle documentation. 

### Running RCU in interactive mode
<a name="Oracle.Resources.RCU.Interactive"></a>

To use the RCU graphical user interface, run RCU in interactive mode. Include the `-interactive` parameter and omit the `-silent` parameter. For more information, see [ Understanding Repository Creation Utility screens](https://docs.oracle.com/middleware/1213/core/RCUUG/rcu_screens.htm#RCUUG143) in the Oracle documentation. 

**Example**  
The following example starts RCU in interactive mode and pre-populates the connection information.   
For Linux, macOS, or Unix:  

```
export ORACLE_HOME=/u01/app/oracle/product/12.2.1.0/fmw
export JAVA_HOME=/usr/java/jdk1.8.0_65
${ORACLE_HOME}/oracle_common/bin/rcu \
-interactive \
-createRepository \
-connectString ${dbhost}:${dbport}:${dbname} \
-dbUser ${dbuser} \
-dbRole Normal
```

## Troubleshooting RCU
<a name="Oracle.Resources.RCU.KnownIssues"></a>

Be mindful of the following issues.

**Topics**
+ [Oracle Managed Files (OMF)](#Oracle.Resources.RCU.KnownIssues.OMF)
+ [Object privileges](#Oracle.Resources.RCU.KnownIssues.object-privs)
+ [Enterprise Scheduler Service](#Oracle.Resources.RCU.KnownIssues.Scheduler)

### Oracle Managed Files (OMF)
<a name="Oracle.Resources.RCU.KnownIssues.OMF"></a>

Amazon RDS uses OMF data files to simplify storage management. You can customize tablespace attributes, such as size and extent management. However, if you specify a data file name when you run RCU, the tablespace code fails with `ORA-20900`. You can use RCU with OMF in the following ways: 
+ In RCU 12.2.1.0 and later, use the `-honorOMF` command-line parameter. 
+ In RCU 12.1.0.3 and later, use multiple steps and edit the generated script. For more information, see [Running RCU using the command line in multiple steps](#Oracle.Resources.RCU.SilentMulti). 

### Object privileges
<a name="Oracle.Resources.RCU.KnownIssues.object-privs"></a>

Because Amazon RDS is a managed service, you don't have full `SYSDBA` access to your RDS for Oracle DB instance. However, RCU 12c supports users with lower privileges. In most cases, the master user privilege is sufficient to create repositories. 

The master account can directly grant privileges that it has already been granted `WITH GRANT OPTION`. In some cases, when you attempt to grant `SYS` object privileges, the RCU might fail with `ORA-01031`. You can retry and run the `rdsadmin_util.grant_sys_object` stored procedure, as shown in the following example:

```
BEGIN
  rdsadmin.rdsadmin_util.grant_sys_object('GV_$SESSION','MY_DBA','SELECT');
END;
/
```

If you attempt to grant `SYS` privileges on the object `SCHEMA_VERSION_REGISTRY`, the operation might fail with `ORA-20199: Error in rdsadmin_util.grant_sys_object`. You can qualify the table `SCHEMA_VERSION_REGISTRY$` and the view `SCHEMA_VERSION_REGISTRY` with the schema owner name, which is `SYSTEM`, and retry the operation. Or, you can create a synonym. Log in as the master user and run the following statements:

```
CREATE OR REPLACE VIEW SYSTEM.SCHEMA_VERSION_REGISTRY 
  AS SELECT * FROM SYSTEM.SCHEMA_VERSION_REGISTRY$;
CREATE OR REPLACE PUBLIC SYNONYM SCHEMA_VERSION_REGISTRY FOR SYSTEM.SCHEMA_VERSION_REGISTRY;
CREATE OR REPLACE PUBLIC SYNONYM SCHEMA_VERSION_REGISTRY$ FOR SCHEMA_VERSION_REGISTRY;
```

### Enterprise Scheduler Service
<a name="Oracle.Resources.RCU.KnownIssues.Scheduler"></a>

When you use the RCU to drop an Enterprise Scheduler Service repository, the RCU might fail with `Error: Component drop check failed`.

# Configuring Oracle Connection Manager on an Amazon EC2 instance
<a name="oracle-cman"></a>

Oracle Connection Manager (CMAN) is a proxy server that forwards connection requests to database servers or other proxy servers. You can use CMAN to configure the following:

Access control  
You can create rules that filter out user-specified client requests and accept others.

Session multiplexing  
You can funnel multiple client sessions through a network connection to a shared server destination.

Typically, CMAN resides on a host separate from the database server and client hosts. For more information, see [Configuring Oracle Connection Manager](https://docs.oracle.com/en/database/oracle/oracle-database/19/netag/configuring-oracle-connection-manager.html#GUID-AF8A511E-9AE6-4F4D-8E58-F28BC53F64E4) in the Oracle Database documentation.

**Topics**
+ [Supported versions and licensing options for CMAN](#oracle-cman.Versions)
+ [Requirements and limitations for CMAN](#oracle-cman.requirements)
+ [Configuring CMAN](#oracle-cman.configuring-cman)

## Supported versions and licensing options for CMAN
<a name="oracle-cman.Versions"></a>

CMAN supports the Enterprise Edition of all versions of Oracle Database that Amazon RDS supports. For more information, see [RDS for Oracle releases](Oracle.Concepts.database-versions.md).

You can install Oracle Connection Manager on a separate host from the host where Oracle Database is installed. You don't need a separate license for the host that runs CMAN.

## Requirements and limitations for CMAN
<a name="oracle-cman.requirements"></a>

To provide a fully managed experience, Amazon RDS restricts access to the operating system. You can't modify database parameters that require operating system access. Thus, Amazon RDS doesn't support features of CMAN that require you to log in to the operating system.

## Configuring CMAN
<a name="oracle-cman.configuring-cman"></a>

When you configure CMAN, you perform most of the work outside of your RDS for Oracle database.

**Topics**
+ [Step 1: Configure CMAN on an Amazon EC2 instance in the same VPC as the RDS for Oracle instance](#oracle-cman.configuring-cman.vpc)
+ [Step 2: Configure database parameters for CMAN](#oracle-cman.configuring-cman.parameters)
+ [Step 3: Associate your DB instance with the parameter group](#oracle-cman.configuring-cman.parameter-group)

### Step 1: Configure CMAN on an Amazon EC2 instance in the same VPC as the RDS for Oracle instance
<a name="oracle-cman.configuring-cman.vpc"></a>

To learn how to set up CMAN, follow the detailed instructions in the blog post [Configuring and using Oracle Connection Manager on Amazon EC2 for Amazon RDS for Oracle](https://aws.amazon.com/blogs/database/configuring-and-using-oracle-connection-manager-on-amazon-ec2-for-amazon-rds-for-oracle/).

### Step 2: Configure database parameters for CMAN
<a name="oracle-cman.configuring-cman.parameters"></a>

For CMAN features such as Traffic Director Mode and session multiplexing, set `REMOTE_LISTENER` parameter to the address of CMAN instance in a DB parameter group. Consider the following scenario:
+ The CMAN instance resides on a host with IP address `10.0.159.100` and uses port `1521`.
+ The databases `orcla`, `orclb`, and `orclc` reside on separate RDS for Oracle DB instances.

The following table shows how to set the `REMOTE_LISTENER` value. The `LOCAL_LISTENER` value is set automatically by Amazon RDS.


| DB instance name | DB instance IP | Local listener value (set automatically) | Remote listener value (set by user) | 
| --- | --- | --- | --- | 
| orcla | 10.0.159.200 |  <pre>( address=<br />  (protocol=tcp)<br />  (host=10.0.159.200)<br />  (port=1521)<br />)</pre>  | 10.0.159.100:1521 | 
| orclb | 10.0.159.300 |  <pre>( address=<br />  (protocol=tcp)<br />  (host=10.0.159.300)<br />  (port=1521)<br />)</pre>  | 10.0.159.100:1521 | 
| orclc | 10.0.159.400 |  <pre>( address=<br />  (protocol=tcp)<br />  (host=10.0.159.400)<br />  (port=1521)<br />)</pre>  | 10.0.159.100:1521 | 

### Step 3: Associate your DB instance with the parameter group
<a name="oracle-cman.configuring-cman.parameter-group"></a>

Create or modify your DB instance to use the parameter group that you configured in [Step 2: Configure database parameters for CMAN](#oracle-cman.configuring-cman.parameters). For more information, see [Associating a DB parameter group with a DB instance in Amazon RDS](USER_WorkingWithParamGroups.Associating.md).

# Installing a Siebel database on Oracle on Amazon RDS
<a name="Oracle.Resources.Siebel"></a>

You can use Amazon RDS to host a Siebel Database on an Oracle DB instance. The Siebel Database is part of the Siebel Customer Relationship Management (CRM) application architecture. For an illustration, see [ Generic architecture of Siebel business application](https://docs.oracle.com/cd/E63029_01/books/PerformTun/performtun_archinfra.htm#i1043361). 

Use the following topic to help set up a Siebel Database on an Oracle DB instance on Amazon RDS. You can also find out how to use Amazon Web Services to support the other components required by the Siebel CRM application architecture. 

**Note**  
To install a Siebel Database on Oracle on Amazon RDS, you need to use the master user account. You don't need `SYSDBA` privilege; master user privilege is sufficient. For more information, see [Master user account privileges](UsingWithRDS.MasterAccounts.md). 

## Licensing and versions
<a name="Oracle.Resources.Siebel.Versions"></a>

To install a Siebel Database on Amazon RDS, you must use your own Oracle Database license, and your own Siebel license. You must have the appropriate Oracle Database license (with Software Update License and Support) for the DB instance class and Oracle Database edition. For more information, see [RDS for Oracle licensing options](Oracle.Concepts.Licensing.md). 

Oracle Database Enterprise Edition is the only edition certified by Siebel for this scenario. Amazon RDS supports Siebel CRM version 15.0 or 16.0.

Amazon RDS supports database version upgrades. For more information, see [Upgrading a DB instance engine version](USER_UpgradeDBInstance.Upgrading.md). 

## Before you begin
<a name="Oracle.Resources.Siebel.BeforeYouBegin"></a>

Before you begin, you need an Amazon VPC. Because your Amazon RDS DB instance needs to be available only to your Siebel Enterprise Server, and not to the public Internet, your Amazon RDS DB instance is hosted in a private subnet, providing greater security. For information about how to create an Amazon VPC for use with Siebel CRM, see [Creating and connecting to an Oracle DB instance](CHAP_GettingStarted.CreatingConnecting.Oracle.md). 

Before you begin, you also need an Oracle DB instance. For information about how to create an Oracle DB instance for use with Siebel CRM, see [Creating an Amazon RDS DB instance](USER_CreateDBInstance.md). 

## Installing and configuring a Siebel database
<a name="Oracle.Resources.Siebel.Database.Siebel"></a>

After you create your Oracle DB instance, you can install your Siebel Database. You install the database by creating table owner and administrator accounts, installing stored procedures and functions, and then running the Siebel Database Configuration Wizard. For more information, see [ Installing the Siebel database on the RDBMS](https://docs.oracle.com/cd/E63029_01/books/SiebInstWIN/SiebInstCOM_ConfigDB.html). 

To run the Siebel Database Configuration Wizard, you need to use the master user account. You don't need `SYSDBA` privilege; master user privilege is sufficient. For more information, see [Master user account privileges](UsingWithRDS.MasterAccounts.md). 

## Using other Amazon RDS features with a Siebel database
<a name="Oracle.Resources.Siebel.Miscellaneous"></a>

After you create your Oracle DB instance, you can use additional Amazon RDS features to help you customize your Siebel Database.

### Collecting statistics with the Oracle Statspack option
<a name="Oracle.Resources.Siebel.Options"></a>

You can add features to your DB instance through the use of options in DB option groups. When you created your Oracle DB instance, you used the default DB option group. If you want to add features to your database, you can create a new option group for your DB instance. 

If you want to collect performance statistics on your Siebel Database, you can add the Oracle Statspack feature. For more information, see [Oracle Statspack](Appendix.Oracle.Options.Statspack.md). 

Some option changes are applied immediately, and some option changes are applied during the next maintenance window for the DB instance. For more information, see [Working with option groups](USER_WorkingWithOptionGroups.md). After you create a customized option group, modify your DB instance to attach it. For more information, see [Modifying an Amazon RDS DB instance](Overview.DBInstance.Modifying.md). 

### Performance tuning with parameters
<a name="Oracle.Resources.Siebel.Parameters"></a>

You manage your DB engine configuration through the use of parameters in a DB parameter group. When you created your Oracle DB instance, you used the default DB parameter group. If you want to customize your database configuration, you can create a new parameter group for your DB instance. 

When you change a parameter, depending on the type of the parameter, the changes are applied either immediately or after you manually reboot the DB instance. For more information, see [Parameter groups for Amazon RDS](USER_WorkingWithParamGroups.md). After you create a customized parameter group, modify your DB instance to attach it. For more information, see [Modifying an Amazon RDS DB instance](Overview.DBInstance.Modifying.md). 

To optimize your Oracle DB instance for Siebel CRM, you can customize certain parameters. The following table shows some recommended parameter settings. For more information about performance tuning Siebel CRM, see [Siebel CRM Performance Tuning Guide](https://docs.oracle.com/cd/E63029_01/books/PerformTun/toc.htm). 


****  

| Parameter name | Default value | Guidance for optimal Siebel CRM performance | 
| --- | --- | --- | 
| \$1always\$1semi\$1join | `CHOOSE` | `OFF`  | 
| \$1b\$1tree\$1bitmap\$1plans | `TRUE` | `FALSE`  | 
| \$1like\$1with\$1bind\$1as\$1equality | `FALSE` | `TRUE`  | 
| \$1no\$1or\$1expansion | `FALSE` | `FALSE`  | 
| \$1optimizer\$1join\$1sel\$1sanity\$1check | `TRUE` | `TRUE`  | 
| \$1optimizer\$1max\$1permutations | 2000 | 100  | 
| \$1optimizer\$1sortmerge\$1join\$1enabled | `TRUE` | `FALSE`  | 
| \$1partition\$1view\$1enabled | `TRUE` | `FALSE`  | 
| open\$1cursors | `300` | At least **2000**.  | 

### Creating snapshots
<a name="Oracle.Resources.Siebel.Snapshots"></a>

After you create your Siebel Database, you can copy the database by using the snapshot features of Amazon RDS. For more information, see [Creating a DB snapshot for a Single-AZ DB instance for Amazon RDS](USER_CreateSnapshot.md) and [Restoring to a DB instance](USER_RestoreFromSnapshot.md). 

## Support for other Siebel CRM components
<a name="Oracle.Resources.Siebel.OtherComponents"></a>

In addition to your Siebel Database, you can also use Amazon Web Services to support the other components of your Siebel CRM application architecture. You can find more information about the support provided by Amazon AWS for additional Siebel CRM components in the following table. 


****  

| Siebel CRM component | Amazon AWS Support | 
| --- | --- | 
| Siebel Enterprise(with one or more Siebel Servers) |  You can host your Siebel Servers on Amazon Elastic Compute Cloud (Amazon EC2) instances. You can use Amazon EC2 to launch as many or as few virtual servers as you need. Using Amazon EC2, you can scale up or down easily to handle changes in requirements. For more information, see [What is Amazon EC2?](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/concepts.html)  You can put your servers in the same VPC with your DB instance and use the VPC security group to access the database. For more information, see [Working with a DB instance in a VPC](USER_VPC.WorkingWithRDSInstanceinaVPC.md).   | 
| Web Servers(with Siebel Web Server Extensions) |  You can install multiple Web Servers on multiple EC2 instances. You can then use Elastic Load Balancing to distribute incoming traffic among the instances. For more information, see [What is Elastic Load Balancing?](https://docs.aws.amazon.com/elasticloadbalancing/latest/userguide/elastic-load-balancing.html)   | 
| Siebel Gateway Name Server |  You can host your Siebel Gateway Name Server on an EC2 instance. You can then put your server in the same VPC with the DB instance and use the VPC security group to access the database. For more information, see [Working with a DB instance in a VPC](USER_VPC.WorkingWithRDSInstanceinaVPC.md).   | 