

# Transition roles for an Oracle PeopleSoft application on Amazon RDS Custom for Oracle
<a name="transition-roles-for-an-oracle-peoplesoft-application-on-amazon-rds-custom-for-oracle"></a>

*sampath kathirvel, Amazon Web Services*

## Summary
<a name="transition-roles-for-an-oracle-peoplesoft-application-on-amazon-rds-custom-for-oracle-summary"></a>

To run the [Oracle PeopleSoft](https://www.oracle.com/applications/peoplesoft/) enterprise resource planning (ERP) solution on Amazon Web Services (AWS), you can use [Amazon Relational Database Service (Amazon RDS)](https://aws.amazon.com/rds/) or [Amazon RDS Custom for Oracle](https://aws.amazon.com/rds/custom/), which supports legacy, custom, and packaged applications that require access to the underlying operating system (OS) and database environment. For key factors to consider when planning a migration, see [Oracle database migration strategies](https://docs.aws.amazon.com/prescriptive-guidance/latest/migration-oracle-database/strategies.html) in AWS Prescriptive Guidance.

This pattern focuses on the steps to perform an Oracle Data Guard switchover, or role transition, for a PeopleSoft application database running on Amazon RDS Custom as the primary database with a read replica database. The pattern includes steps to configure [fast-start failover (FSFO)](https://docs.oracle.com/en/database/oracle/oracle-database/19/dgbkr/using-data-guard-broker-to-manage-switchovers-failovers.html#GUID-D26D79F2-0093-4C0E-98CD-224A5C8CBFA4). During this process, the databases in the Oracle Data Guard configuration continue to function in their new roles. Typical use cases for Oracle Data Guard switchover are disaster recovery (DR) drills, scheduled maintenance activities on databases, and [Standby-First Patch Apply](https://docs.oracle.com/en/database/oracle/oracle-database/19/sbydb/upgrading-patching-downgrading-oracle-data-guard-configuration.html#GUID-A5226768-DB6B-4714-BB9A-0A3EF17A01C8) rolling patches. For more information, see the blog post [Reduce database patching downtime in Amazon RDS Custom](https://aws.amazon.com/blogs/database/reduce-database-patching-downtime-in-amazon-rds-custom-for-oracle-using-oracle-data-guard-standby-first-patch-apply/).

## Prerequisites and limitations
<a name="transition-roles-for-an-oracle-peoplesoft-application-on-amazon-rds-custom-for-oracle-prereqs"></a>

**Prerequisites **
+ Completion of the [Add HA to Oracle PeopleSoft on Amazon RDS Custom by using a read replica](https://docs.aws.amazon.com/prescriptive-guidance/latest/patterns/add-ha-to-oracle-peoplesoft-on-amazon-rds-custom-by-using-a-read-replica.html) pattern.

**Limitations **
+ Limitations and unsupported configurations for [RDS Custom for Oracle](https://docs.amazonaws.cn/en_us/AmazonRDS/latest/UserGuide/custom-reqs-limits.html#custom-reqs-limits.limits)
+ Limitations associated with [Amazon RDS Custom for Oracle read replicas](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/custom-rr.html#custom-rr.limitations)

**Product versions**
+ For Oracle Database versions supported by Amazon RDS Custom, see [RDS Custom for Oracle](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Concepts.RDS_Fea_Regions_DB-eng.Feature.RDSCustom.html#Concepts.RDS_Fea_Regions_DB-eng.Feature.RDSCustom.ora).
+ For Oracle Database instance classes supported by Amazon RDS Custom, see [DB instance class support for RDS Custom for Oracle](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/custom-reqs-limits.html#custom-reqs-limits.instances).

## Architecture
<a name="transition-roles-for-an-oracle-peoplesoft-application-on-amazon-rds-custom-for-oracle-architecture"></a>

**Technology stack**
+ Amazon RDS Custom for Oracle

**Target architecture**

The following diagram shows an Amazon RDS Custom DB instance and an Amazon RDS Custom read replica. Oracle Data Guard provides role transition during failover for DR.

![\[Oracle Data Guard switchover for a primary RDS Custom DB instance with a read replica database.\]](http://docs.aws.amazon.com/prescriptive-guidance/latest/patterns/images/pattern-img/da3b011c-1668-4de4-9079-0982888a74b4/images/4e2a2f3b-b5bd-44b7-9b5a-13a663ee3be6.png)


For a representative architecture using Oracle PeopleSoft on AWS, see [Set up a highly available PeopleSoft architecture on AWS](https://docs.aws.amazon.com/prescriptive-guidance/latest/patterns/set-up-a-highly-available-peoplesoft-architecture-on-aws.html).

## Tools
<a name="transition-roles-for-an-oracle-peoplesoft-application-on-amazon-rds-custom-for-oracle-tools"></a>

**AWS services**
+ [Amazon RDS Custom for Oracle](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/working-with-custom-oracle.html) is a managed database service for legacy, custom, and packaged applications that require access to the underlying OS and database environment.
+ [AWS Secrets Manager](https://docs.aws.amazon.com/secretsmanager/latest/userguide/intro.html) helps you replace hardcoded credentials in your code, including passwords, with an API call to Secrets Manager to retrieve the secret programmatically. In this pattern, you retrieve the database user passwords from Secrets Manager for `RDS_DATAGUARD` with the secret name `do-not-delete-rds-custom-+<<RDS Resource ID>>+-dg`.

**Other services**
+ [Oracle Data Guard](https://docs.oracle.com/en/database/oracle/oracle-database/21/sbydb/introduction-to-oracle-data-guard-concepts.html#GUID-5E73667D-4A56-445E-911F-1E99092DD8D7) helps you create, maintain, manage, and monitor standby databases. This pattern uses Oracle Data Guard Maximum Performance for transitioning roles ([Oracle Data Guard switchover](https://docs.oracle.com/database/121/DGBKR/sofo.htm#DGBKR330)).

## Best practices
<a name="transition-roles-for-an-oracle-peoplesoft-application-on-amazon-rds-custom-for-oracle-best-practices"></a>

For your production deployment, we recommend launching the observer instance in a third Availability Zone, separate from the primary and read replica nodes.

## Epics
<a name="transition-roles-for-an-oracle-peoplesoft-application-on-amazon-rds-custom-for-oracle-epics"></a>

### Initiate role transition
<a name="initiate-role-transition"></a>


| Task | Description | Skills required | 
| --- | --- | --- | 
| Pause database automation for both the primary and the replica. | Although the RDS Custom automation framework doesn't interfere with the role transition process, it's a good practice to pause automation during Oracle Data Guard switchover.To pause and resume RDS Custom database automation, follow the instructions at [Pausing and resuming RDS Custom automation](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/custom-managing.html#custom-managing.pausing). | Cloud administrator, DBA | 
| Check the Oracle Data Guard status. | To check the Oracle Data Guard status, log in to the primary database. This pattern includes code for using a multitenant container database (CDB) or a non-CDB instance.**Non-CDB**<pre>-bash-4.2$ dgmgrl RDS_DATAGUARD@RDS_CUSTOM_ORCL_A<br />DGMGRL for Linux: Release 19.0.0.0.0 - Production on Mon Nov 28 20:55:50 2022<br />Version 19.10.0.0.0<br />Copyright (c) 1982, 2019, Oracle and/or its affiliates. All rights reserved.<br />Welcome to DGMGRL, type "help" for information.<br />Password:<br />Connected to "ORCL_A"<br />Connected as SYSDG.<br />DGMGRL> show configuration<br />Configuration - rds_dg<br />Protection Mode: MaxAvailability<br />Members:<br />orcl_a - Primary database<br />orcl_d - Physical standby database <br />Fast-Start Failover: Disabled<br />Configuration Status:<br />SUCCESS (status updated 59 seconds ago)<br />DGMGRL></pre>**CDB**<pre>CDB-bash-4.2$ dgmgrl C##RDS_DATAGUARD@RDS_CUSTOM_RDSCDB_A<br />DGMGRL for Linux: Release 19.0.0.0.0 - Production on Wed Jan 18 06:13:07 2023<br />Version 19.16.0.0.0<br />Copyright (c) 1982, 2019, Oracle and/or its affiliates.  All rights reserved.<br />Welcome to DGMGRL, type "help" for information.<br />Password:<br />Connected to "RDSCDB_A"<br />Connected as SYSDG.<br />DGMGRL> show configuration<br />Configuration - rds_dg<br />  Protection Mode: MaxAvailability<br />  Members:<br />  rdscdb_a - Primary database<br />    rdscdb_b - Physical standby database <br />Fast-Start Failover:  Disabled<br />Configuration Status:<br />SUCCESS   (status updated 52 seconds ago)<br />DGMGRL></pre> | DBA | 
| Verify the instance role. | Open the AWS Management Console, and navigate to the Amazon RDS console. In the database’s **Replication** section, on the **Connectivity & security** tab, verify the instance role for the primary and replica.The primary role should match the Oracle Data Guard primary database, and the replica role should match the Oracle Data Guard physical standby database. | Cloud administrator, DBA | 
| Perform the switchover. | To perform the switchover, connect to `DGMGRL` from the primary node.**Non-CDB**<pre>DGMGRL> switchover to orcl_d;<br />Performing switchover NOW, please wait...<br />Operation requires a connection to database "orcl_d"<br />Connecting ...<br />Connected to "ORCL_D"<br />Connected as SYSDG.<br />New primary database "orcl_d" is opening...<br />Operation requires start up of instance "ORCL" on database "orcl_a"<br />Starting instance "ORCL"...<br />Connected to an idle instance.<br />ORACLE instance started.<br />Connected to "ORCL_A"<br />Database mounted.<br />Database opened.<br />Connected to "ORCL_A"<br />Switchover succeeded, new primary is "orcl_d"<br />DGMGRL>  </pre>**CDB**<pre>DGMGRL> switchover to rdscdb_b<br />Performing switchover NOW, please wait...<br />New primary database "rdscdb_b" is opening...<br />Operation requires start up of instance "RDSCDB" on database "rdscdb_a"<br />Starting instance "RDSCDB"...<br />Connected to an idle instance.<br />ORACLE instance started.<br />Connected to "RDSCDB_A"<br />Database mounted.<br />Database opened.<br />Connected to "RDSCDB_A"<br />Switchover succeeded, new primary is "rdscdb_b"</pre> | DBA | 
| Verify the Oracle Data Guard connection. | After switchover, verify the Oracle Data Guard connection from the primary node to `DGMGRL`.**Non-CDB**<pre>DGMGRL> show configuration;<br />Configuration - rds_dg<br />Protection Mode: MaxAvailability<br />Members:<br />orcl_d - Primary database<br />orcl_a - Physical standby database <br />Fast-Start Failover: Disabled<br />Configuration Status:<br />SUCCESS (status updated 60 seconds ago)<br />DGMGRL> <br /><br />DGMGRL> show configuration lag;<br />Configuration - rds_dg<br />Protection Mode: MaxAvailability<br />Members:<br />orcl_d - Primary database<br />orcl_a - Physical standby database <br />Transport Lag: 0 seconds (computed 0 seconds ago)<br />Apply Lag: 0 seconds (computed 0 seconds ago)<br />Fast-Start Failover: Disabled<br />Configuration Status:<br />SUCCESS (status updated 44 seconds ago)<br />DGMGRL> </pre>**CDB**<pre>DGMGRL> show configuration<br />DGMGRL> show configuration<br />Configuration - rds_dg<br />  Protection Mode: MaxAvailability<br />  Members:<br />  rdscdb_b - Primary database<br />    rdscdb_a - Physical standby database <br />Fast-Start Failover:  Disabled<br />Configuration Status:<br />SUCCESS   (status updated 52 seconds ago)<br />DGMGRL> <br /><br />DGMGRL> show configuration lag<br />Configuration - rds_dg<br />  Protection Mode: MaxAvailability<br />  Members:<br />  rdscdb_b - Primary database<br />    rdscdb_a - Physical standby database <br />               Transport Lag:      0 seconds (computed 0 seconds ago)<br />               Apply Lag:          0 seconds (computed 0 seconds ago)<br />Fast-Start Failover:  Disabled<br />Configuration Status:<br />SUCCESS   (status updated 53 seconds ago)<br />DGMGRL></pre> | DBA | 
| Verify the instance role on the Amazon RDS console. | After you perform the role switch, the Amazon RDS console shows the new roles under the **Replication** section on the **Connectivity & Security** tab under **Databases**. It might take a few minutes for **Replication state** to update from empty to **Replicating**. | DBA | 

### Configure FSFO
<a name="configure-fsfo"></a>


| Task | Description | Skills required | 
| --- | --- | --- | 
| Reset the switchover. | Set the switchover back to the primary node. | DBA | 
| Install and start the observer. | An observer process is a `DGMGRL` client component, typically running in a different machine from the primary and standby databases. The ORACLE HOME installation for the observer can be an Oracle Client Administrator installation, or you can install either Oracle Database Enterprise Edition or Personal Edition. For more information about observer installation for your database release, see [Installing and Starting the Observer](https://docs.oracle.com/en/database/oracle/oracle-database/19/dgbkr/using-data-guard-broker-to-manage-switchovers-failovers.html#GUID-11EF3897-8FCA-4A54-B63B-E8C1668AE21B). To configure high availability for the observer process, you might want to do the following:[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/prescriptive-guidance/latest/patterns/transition-roles-for-an-oracle-peoplesoft-application-on-amazon-rds-custom-for-oracle.html)For Oracle 12c Release 2 and later, you can deploy up to three observers. One observer is the primary observer, and the rest are backup observers. When the primary observer fails, one of the backup observers takes the primary role. | DBA | 
| Connect to DGMGRL from the observer host. | The observer host is configured with `tnsnames.ora` entries for primary and standby database connectivity. You can enable FSFO with maximum performance protection mode as long as data loss is within the [FastStartFailoverLagLimit](https://docs.oracle.com/en/database/oracle/oracle-database/19/dgbkr/oracle-data-guard-broker-properties.html) configuration (value in seconds), However, you must use maximum availability protection mode to work to achieve zero data loss (RPO=0).**Non-CDB**<pre>DGMGRL> show configuration;<br />Configuration - rds_dg<br />Protection Mode: MaxAvailability<br />Members:<br />orcl_a - Primary database<br />orcl_d - Physical standby database <br />Fast-Start Failover: Disabled<br />Configuration Status:<br />SUCCESS (status updated 58 seconds ago)<br />DGMGRL> show configuration lag<br />Configuration - rds_dg<br />Protection Mode: MaxAvailability<br />Members:<br />orcl_a - Primary database<br />orcl_d - Physical standby database <br />Transport Lag: 0 seconds (computed 1 second ago)<br />Apply Lag: 0 seconds (computed 1 second ago)<br />Fast-Start Failover: Disabled<br />Configuration Status:<br />SUCCESS (status updated 5 seconds ago)<br />DGMGRL></pre>**CDB**<pre>-bash-4.2$ dgmgrl C##RDS_DATAGUARD@RDS_CUSTOM_RDSCDB_A<br />DGMGRL for Linux: Release 19.0.0.0.0 - Production on Wed Jan 18 06:55:09 2023<br />Version 19.16.0.0.0<br />Copyright (c) 1982, 2019, Oracle and/or its affiliates.  All rights reserved.<br />Welcome to DGMGRL, type "help" for information.<br />Password:<br />Connected to "RDSCDB_A"<br />Connected as SYSDG.<br />DGMGRL> show configuration<br />Configuration - rds_dg<br />  Protection Mode: MaxAvailability<br />  Members:<br />  rdscdb_a - Primary database<br />    rdscdb_b - Physical standby database <br />Fast-Start Failover:  Disabled<br />Configuration Status:<br />SUCCESS   (status updated 18 seconds ago)<br />DGMGRL></pre> | DBA | 
| Modify the standby database to be the failover target. | Connect from either the primary node or the observer node to one standby database. (Although your onfiguration could have mulitiple standby databases, you need to connect to only one at this time.)**Non-CDB**<pre>DGMGRL> edit database orcl_a set property FastStartFailoverTarget='orcl_d';<br />Property "faststartfailovertarget" updated<br />DGMGRL> edit database orcl_d set property FastStartFailoverTarget='orcl_a';<br />Property "faststartfailovertarget" updated<br />DGMGRL> show database orcl_a FastStartFailoverTarget;<br />FastStartFailoverTarget = 'orcl_d'<br />DGMGRL> show database orcl_d FastStartFailoverTarget;<br />FastStartFailoverTarget = 'orcl_a'<br />DGMGRL></pre>**CDB**<pre>DGMGRL> edit database orcl_a set property FastStartFailoverTarget='rdscdb_b';<br />Object "orcl_a" was not found<br />DGMGRL> edit database rdscdb_a set property FastStartFailoverTarget='rdscdb_b';<br />Property "faststartfailovertarget" updated<br />DGMGRL> edit database rdscdb_b set property FastStartFailoverTarget='rdscdb_a';<br />Property "faststartfailovertarget" updated<br />DGMGRL> show database rdscdb_a FastStartFailoverTarget;<br />  FastStartFailoverTarget = 'rdscdb_b'<br />DGMGRL> show database rdscdb_b FastStartFailoverTarget;<br />  FastStartFailoverTarget = 'rdscdb_a'<br />DGMGRL></pre> | DBA | 
| Configure FastStartFailoverThreshold for the connection to DGMGRL. | The default value is 30 seconds in Oracle 19c, and the minimum value is 6 seconds. A lower value can potentially shorten the recovery time objective (RTO) during the failover. A higher value helps reduce the chance of unnecessary failover transient errors on the primary database.The RDS Custom for Oracle automation framework monitors database health and performs corrective actions every few seconds. Therefore, we recommend setting FastStartFailoverThreshold to a value higher than 10 seconds. The following example configures the threshold value at 35 seconds.**Non-CBD or CDB**<pre>DGMGRL> edit configuration set property FastStartFailoverThreshold=35;<br />Property "faststartfailoverthreshold" updated<br />DGMGRL> show configuration FastStartFailoverThreshold;<br />FastStartFailoverThreshold = '35'<br />DGMGRL></pre> | DBA | 
| Enable FSFO by connecting to DGMGRL from the primary or observer node. | If the database doesn’t have [Flashback Database](https://docs.oracle.com/en/database/oracle/oracle-database/19/rcmrf/FLASHBACK-DATABASE.html#GUID-584AC79A-40C5-45CA-8C63-DED3BE3A4511) enabled, the warning message `ORA-16827` appears. The optional flashback database helps automatically reinstate failed primary databases to a point in time before failover if the [FastStartFailoverAutoReinstate](https://docs.oracle.com/en/database/oracle/oracle-database/19/dgbkr/oracle-data-guard-broker-properties.html#GUID-824E97C0-EEB0-4E1B-BD4A-F5AE282CEA28) configuration property is set to `TRUE` (which is the default).**Non-CDB**<pre>DGMGRL> enable fast_start failover;<br />Warning: ORA-16827: Flashback Database is disabled<br />Enabled in Zero Data Loss Mode.<br />DGMGRL> <br />DGMGRL> show configuration<br />Configuration - rds_dg<br />Protection Mode: MaxAvailability<br />Members:<br />orcl_a - Primary database<br />Warning: ORA-16819: fast-start failover observer not started<br />orcl_d - (*) Physical standby database <br />Warning: ORA-16819: fast-start failover observer not started<br />Fast-Start Failover: Enabled in Zero Data Loss Mode<br />Configuration Status:<br />WARNING (status updated 29 seconds ago)<br />DGMGRL></pre>**CDB**<pre>DGMGRL> enable fast_start failover;<br />Warning: ORA-16827: Flashback Database is disabled<br />Enabled in Zero Data Loss Mode.<br />DGMGRL> show configuration;<br />Configuration - rds_dg<br />  Protection Mode: MaxAvailability<br />  Members:<br />  rdscdb_a - Primary database<br />    Warning: ORA-16819: fast-start failover observer not started<br />    rdscdb_b - (*) Physical standby database <br />Fast-Start Failover: Enabled in Zero Data Loss Mode<br />Configuration Status:<br />WARNING   (status updated 11 seconds ago)<br />DGMGRL></pre> | DBA | 
| Start the observer for FSFO monitoring, and verify the status. | You can start the observer before or after you enable FSFO. If FSFO is already enabled, the observer immediately begins monitoring the status and connections to the primary and target standby databases. If FSFO is not enabled, the observer doesn’t start monitoring until after FSFO is enabled.When you start the observer, the primary DB configuration will be displayed without any error messages, as evidenced by the previous `show configuration` command.**Non-CDB**<pre>DGMGRL> start observer;<br />[W000 2022-12-01T06:16:51.271+00:00] FSFO target standby is orcl_d<br />Observer 'ip-10-0-1-89' started<br />[W000 2022-12-01T06:16:51.352+00:00] Observer trace level is set to USER<br /><br />DGMGRL> show configuration<br />Configuration - rds_dg<br />Protection Mode: MaxAvailability<br />Members:<br />orcl_a - Primary database<br />orcl_d - (*) Physical standby database <br />Fast-Start Failover: Enabled in Zero Data Loss Mode<br />Configuration Status:<br />SUCCESS (status updated 56 seconds ago)<br />DGMGRL> <br /><br />DGMGRL> show observer<br />Configuration - rds_dg<br />Primary: orcl_a<br />Active Target: orcl_d<br />Observer "ip-10-0-1-89" - Master<br />Host Name: ip-10-0-1-89<br />Last Ping to Primary: 1 second ago<br />Last Ping to Target: 1 second ago<br />DGMGRL></pre>**CDB**<pre>DGMGRL> start observer;<br />Succeeded in opening the observer file "/home/oracle/fsfo_ip-10-0-1-56.dat".<br />[W000 2023-01-18T07:31:32.589+00:00] FSFO target standby is rdscdb_b<br />Observer 'ip-10-0-1-56' started<br />The observer log file is '/home/oracle/observer_ip-10-0-1-56.log'.<br /><br />DGMGRL> show configuration<br />Configuration - rds_dg<br />  Protection Mode: MaxAvailability<br />  Members:<br />  rdscdb_a - Primary database<br />    rdscdb_b - (*) Physical standby database <br />Fast-Start Failover: Enabled in Zero Data Loss Mode<br />Configuration Status:<br />SUCCESS   (status updated 12 seconds ago)<br />DGMGRL> <br /><br />DGMGRL> show observer;<br />Configuration - rds_dg<br />  Primary:            rdscdb_a<br />  Active Target:      rdscdb_b<br />Observer "ip-10-0-1-56" - Master<br />  Host Name:                    ip-10-0-1-56<br />  Last Ping to Primary:         1 second ago<br />  Last Ping to Target:          2 seconds ago<br />DGMGRL></pre> | DBA | 
| Verify the failover. | In this scenario, a failover test can be performed by manually stopping the primary EC2 instance. Before stopping the EC2 instance, use the `tail` command to monitor the observer log file based on your configuration. Use `DGMGRL` to log in to standby database `orcl_d` with user `RDS_DATAGUARD`, and check the Oracle Data Guard status. It should show that `orcl_d` is the new primary database.In this failover testing scenario, `orcl_d` is the non-CDB database.Before failover, the flashback database has been enabled on `orcl_a`. After the former primary database returns online and starts in `MOUNT` state, the observer reinstates it into a new standby database. The reinstated database acts as the FSFO target for the new primary database. You can verify the details in observer logs.<pre>DGMGRL> show configuration<br />Configuration - rds_dg<br />Protection Mode: MaxAvailability<br />Members:<br />orcl_d - Primary database<br />Warning: ORA-16824: multiple warnings, including fast-start failover-related warnings, detected for the database<br />orcl_a - (*) Physical standby database (disabled)<br />ORA-16661: the standby database needs to be reinstated<br />Fast-Start Failover: Enabled in Zero Data Loss Mode<br />Configuration Status:<br />WARNING (status updated 25 seconds ago)<br />DGMGRL></pre>The following shows example output in `observer.log`.<pre>$ tail -f /tmp/observer.log<br />Unable to connect to database using rds_custom_orcl_a<br />[W000 2023-01-18T07:50:32.589+00:00] Primary database cannot be reached.<br />[W000 2023-01-18T07:50:32.589+00:00] Fast-Start Failover threshold has expired.<br />[W000 2023-01-18T07:50:32.590+00:00] Try to connect to the standby.<br />[W000 2023-01-18T07:50:32.590+00:00] Making a last connection attempt to primary database before proceeding with Fast-Start Failover.<br />[W000 2023-01-18T07:50:32.591+00:00] Check if the standby is ready for failover.<br />[S002 2023-01-18T07:50:32.591+00:00] Fast-Start Failover started...<br />2023-01-18T07:50:32.591+00:00<br />Initiating Fast-Start Failover to database "orcl_d"...<br />[S002 2023-01-18T07:50:32.592+00:00] Initiating Fast-start Failover.<br />Performing failover NOW, please wait...<br />Failover succeeded, new primary is "orcl_d"<br />2023-01-18T07:55:32.101+00:00<br />[S002 2023-01-18T07:55:32.591+00:00] Fast-Start Failover finished...<br />[W000 2023-01-18T07:55:32.591+00:00] Failover succeeded. Restart pinging.<br />[W000 2023-01-18T07:55:32.603+00:00] Primary database has changed to orcl_d.<br />[W000 2023-01-18T07:55:33.618+00:00] Try to connect to the primary.<br />[W000 2023-01-18T07:55:33.622+00:00] Try to connect to the primary rds_custom_orcl_d.<br />[W000 2023-01-18T07:55:33.634+00:00] The standby orcl_a needs to be reinstated<br />[W000 2023-01-18T07:55:33.654+00:00] Try to connect to the new standby orcl_a.<br />[W000 2023-01-18T07:55:33.654+00:00] Connection to the primary restored!<br />[W000 2023-01-18T07:55:35.654+00:00] Disconnecting from database rds_custom_orcl_d.<br />[W000 2023-01-18T07:55:57.701+00:00] Try to connect to the new standby orcl_a.<br />ORA-12170: TNS:Connect timeout occurred</pre> | DBA | 

### Configure connectivity between the Oracle Peoplesoft application and the database
<a name="configure-connectivity-between-the-oracle-peoplesoft-application-and-the-database"></a>


| Task | Description | Skills required | 
| --- | --- | --- | 
| Create and start the service in the primary database. | You can avoid application configuration changes during a role transition by using a TNS entry that contains both the primary and standby database endpoints in the configuration. You can define two role-based database services to support both read/write and read-only workloads. In the following example, `orcl_rw` is the read/write service that’s active on the primary database. `orcl_ro` is the read-only service and is active on the standby database that has been opened in read-only mode.<pre>SQL> select name,open_mode from v$database;<br />NAME OPEN_MODE<br />--------- --------------------<br />ORCL READ WRITE<br />SQL> exec dbms_service.create_service('orcl_rw','orcl_rw');<br />PL/SQL procedure successfully completed.<br />SQL> exec dbms_service.create_service('orcl_ro','orcl_ro');<br />PL/SQL procedure successfully completed.<br /><br />SQL> exec dbms_service.start_service('orcl_rw');<br />PL/SQL procedure successfully completed.<br />SQL></pre> | DBA | 
| Start the service in the standby database. | To start the service in the read-only standby database, use the following code.<pre>SQL> select name,open_mode from v$database;<br />NAME OPEN_MODE<br />--------- --------------------<br />ORCL READ ONLY WITH APPLY<br />SQL> exec dbms_service.start_service('orcl_ro');<br />PL/SQL procedure successfully completed.<br />SQL></pre> | DBA | 
| Automate starting the service when the primary DB is restarted. | To automatically start the service in the primary database when it’s restarted, use the following code.<pre>SQL> CREATE OR REPLACE TRIGGER TrgDgServices after startup on database<br />DECLARE<br />db_role VARCHAR(30);<br />db_open_mode VARCHAR(30);<br />BEGIN<br />SELECT DATABASE_ROLE, OPEN_MODE INTO db_role, db_open_mode FROM V$DATABASE;<br />IF db_role = 'PRIMARY' THEN<br />DBMS_SERV 2 ICE.START_SERVICE('orcl_rw');<br />END IF;<br />IF db_role = 'PHYSICAL STANDBY' AND db_open_mode LIKE 'READ ONLY%' THEN<br />DBMS_SERVICE.START_SERVICE('orcl_ro');<br />END IF;<br />END;<br />/ <br />Trigger created.<br />SQL> </pre> | DBA | 
| Configure a connection between the read/write and read-only databases. | You can use the following application-configuration example for the read/write and read-only connection.<pre>ORCL_RW = (DESCRIPTION =<br />(CONNECT_TIMEOUT= 120)(RETRY_COUNT=20)(RETRY_DELAY=3)(TRANSPORT_CONNECT_TIMEOUT=3)<br />(ADDRESS_LIST =<br />(ADDRESS = (PROTOCOL = TCP)(HOST=devpsftdb.******.us-west-2.rds.amazonaws.com)(PORT=1521))<br />(ADDRESS = (PROTOCOL = TCP)(HOST=psftread.******.us-west-2.rds.amazonaws.com)(PORT=1521))<br />)<br />(CONNECT_DATA=(SERVICE_NAME = orcl_rw))<br />)<br />ORCL_RO = (DESCRIPTION =<br />(CONNECT_TIMEOUT= 120)(RETRY_COUNT=20)(RETRY_DELAY=3)(TRANSPORT_CONNECT_TIMEOUT=3)<br />(ADDRESS_LIST =<br />(ADDRESS = (PROTOCOL = TCP)(HOST=devpsftdb.******.us-west-2.rds.amazonaws.com)(PORT=1521))<br />(ADDRESS = (PROTOCOL = TCP)(HOST=psftread.******.us-west-2.rds.amazonaws.com)(PORT=1521))<br />)<br />(CONNECT_DATA=(SERVICE_NAME = orcl_ro))<br />)</pre> | DBA | 

## Related resources
<a name="transition-roles-for-an-oracle-peoplesoft-application-on-amazon-rds-custom-for-oracle-resources"></a>
+ [Enabling High Availability with Data Guard on Amazon RDS Custom for Oracle](https://d1.awsstatic.com/whitepapers/enabling-high-availability-with-data-guard-on-amazon-rds-custom-for-oracle.pdf) (AWS Technical Guide)
+ [Configuring Amazon RDS as an Oracle PeopleSoft Database](https://d1.awsstatic.com/whitepapers/configuring-amazon-rds-as-peoplesoft-database.pdf) (AWS whitepaper)
+ [Oracle Data Guard Broker guide ](https://docs.oracle.com/en/database/oracle/oracle-database/19/dgbkr/index.html)(Oracle reference documentation)
+ [Data Guard Concepts and Administration ](https://docs.oracle.com/en/database/oracle/oracle-database/19/sbydb/index.html)(Oracle reference documentation)
+ [Oracle Data Guard Specific FAN and FCF Configuration Requirements ](https://docs.oracle.com/en/database/oracle/oracle-database/19/dgbkr/using-data-guard-broker-to-manage-switchovers-failovers.html#GUID-DFFDAA2B-A889-49AD-AB85-747D73FF0FF5)(Oracle reference documentation)