0% found this document useful (0 votes)
137 views

ADG Document 1944539

Active Data Gaurd

Uploaded by

Ravindra Mallina
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
137 views

ADG Document 1944539

Active Data Gaurd

Uploaded by

Ravindra Mallina
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 16

1/10/2017 Document 1944539.

1
  Ravindra (Available) (0) Contact Us Help
PowerView is Off

 
Dashboard Knowledge Service Requests Patches & Updates Community

Give Feedback...

Using Active Data Guard Reporting with Oracle E­Business Suite Release 12.2 and an Oracle 11g or 12c Database To Bottom
(Doc ID 1944539.1)

Oracle E­Business Suite Release 12.2 has numerous configuration options that can be chosen to suit particular business    
Was this document helpful?
scenarios, uptime requirements, hardware capabilities, and availability requirements. This document describes how to configure
g c
Oracle E­Business Suite Release 12.2 on Oracle Database 11 R2 or 12  for Active Data Guard Reporting on a physical standby. Yes
No
 
Note: This document applies to UNIX and Linux platforms only. This document applies to Non­RAC database only with Active
Data Guard Reporting configured to run on single standby site.    
Document Details

The most current version of this document can be obtained in My Oracle Support Knowledge Document 1944539.1,  Using Active Type:


Data Guard Reporting with Oracle E­Business Suite Release 12.2 and Oracle Databases 11g and 12c
. Status:
REFERENCE
PUBLISHED
Last Major
22­Mar­2016
This document is divided into the following sections: Update:
22­Mar­2016
Last Update:
Section 1: Overview  
Section 2: Concurrent Manager Reporting
Section 3: Configuration  
Related Products
 
Section 4: Managing ADG Support Oracle Applications
Section 5: Managing Simulated Standby Mode Technology Stack
Section 6: Managing Concurrent Programs  
Section 7: Database Triggers
   
Section 8: Understanding the ADG Process Flow Information Centers
Section 9: Maintenance and Housekeeping Information Center: Using EBS
Section 10: Understanding Read­Only Violations Technology Stack OID and SSO
[1461466.2]
Section 11: Validated Reports
Information Center: Oracle E­
Appendix A: Example Configuration Business Suite Extensions for
Appendix B: Opening a Physical Standby Read Only Oracle Endeca Install &
Configure [1487000.2]
Appendix C: Example ADG Concurrent Manager Configuration
Appendix D: Creating and Using Database Services Information Center: Using EBS
Appendix E: ADG Reporting Tables Technology Stack ­ Framework
[1478640.2]
There is a change log at the end of this document. Information Center: Overview
E­Business Suite Technology ­
A number of conventions are used in describing the Oracle E­Business Suite architecture: Forms [1411953.2]

Information Center: Using EBS
Convention Meaning Technology Stack Java
[1462269.2]
Application
Machines (or nodes) running Forms, web, and other services (servers). Sometimes called middle tier. Show More
tier  
Database tier Machines (or nodes) running the Oracle E­Business Suite database.    
Document References
Primary No References available for
Primary Oracle E­Business Suite system.
system this document.
 
Standby Oracle E­Business Suite system running as a Data Guard standby to the primary system, open for read­only
   
system access. Recently Viewed
How To Generate Entity
oracle User account that owns the database file system (database ORACLE_HOME and files). Relationship Diagram (ERD)
For Fusion Applications ?
The CONTEXT_NAME variable specifies the name of the Oracle E­Business Suite context that is used by [1334336.1]
CONTEXT_NAME
AutoConfig. The default is <SID>_<hostname>.
Oracle Fusion HCM ­ Release
5 (11.1.5) Update Bundle 11
[1582029.1]
Full path to the Oracle E­Business Suite context file on the application tier or database tier. The default
locations are as follows. EBS Human Capital
Management (HCM)
CONTEXT_FILE
Technical Analyzer
Application tier context file: <INST_TOP >/appl/admin/<CONTEXT_NAME>.xml [1562530.1]
Database tier context file: <RDBMS ORACLE_HOME>/appsutil/<CONTEXT_NAME>.xml
What is the Purpose of the
Synchronize Positions
(PERPSFSN) Function?
APPSpwd Oracle E­Business Suite database user password. [417229.1]
Monospace Updates to US HRMS To
Represents command line text. Type such a command exactly as shown. Accommodate the Employer
text
Shared Responsibility
Text enclosed in angle brackets represents a variable. Substitute a value for the variable text. Do not type the Provision of the Affordable
< > Care Act ­ Release 12.1
angle brackets. [1616427.1]
On UNIX or Linux, the backslash character can be entered to indicate continuation of the command line on the Show More
\  
next screen line.

https://support.oracle.com/epmos/faces/DocumentDisplay?_afrLoop=244415059001474&id=1944539.1&_afrWindowMode=0&_adf.ctrl­state=hdwi74grb_4#1.3… 1/16
1/10/2017 Document 1944539.1

Section 1: Overview
This document assumes that you have an Oracle Active Data Guard (ADG) database, which is an Oracle Data Guard physical
standby database that has been configured and opened for read access. To set up a physical standby for Oracle E­Business Suite
Release 12.2, refer to My Oracle Support Knowledge Document 1491855.1,  Business Continuity for Oracle E­Business Release
12.2 Using Oracle 11g Physical Standby Database  or for 12c database refer to My Oracle Support Knowledge Document
1963472.1, Business Continuity for Oracle E­Business Suite Release 12.2 Using Oracle 12cR1 (12.1.0.2) Physical Standby
Database.

This document details the required steps to enable Concurrent Manager Reports to be run on ADG.

1.1 Active Data Guard
1.2 Software Prerequisites
1.3 Parallel Concurrent Processing
1.4 Read­Only Limitations
1.5 Security

1.1 Active Data Guard

An Active Data Guard (ADG) database applies redo from the primary. Although ADG guarantees query consistency (by using a
standby query SCN), the redo should be applied as soon as possible to the standby to ensure that reports are using up­to­date
data. With regard to concurrent processing, a delay of 30 seconds is no different to a job being held on a concurrent manager
queue for 30 seconds.

1.2 Software Prerequisites

This document assumes the following minimum software versions:

Software Component Applicable Version(s) Additional Patches

Patch 18228563 18228563:R12.FND.C
Oracle E­Business Suite 12.2.2, 12.2.3, 12.2.4, 12.2.5
Patch 20893664 20893664:R12.TXK.C

g
Oracle Database 11  Release 2 11.2.0.2, 11.2.0.3, 11.2.0.4 None ­ included in patchset

Oracle Database 12c 12.1.0.2 None ­ included in patchset

1.3 Parallel Concurrent Processing

In order to use Concurrent Manager Reporting, you must be using parallel concurrent processing (PCP) with new processing
nodes set up to handle ADG reports. It is recommended that these nodes, although part of the primary system, be co­located
with the ADG database as the majority of network traffic will be between the report programs and the ADG database. This
decision will also depend on the network latency and amount of available bandwidth between the primary and ADG (standby)
servers.

In a standard ADG manager configuration, the concurrent manager connects to the primary database; only the reports run on
the ADG database.

1.4 Read­Only Limitations

The ADG instance is a READ­ONLY database. No Data Manipulation Language (DML) commands of any sort are permitted, except
for DML executed through database links back to the primary. This limitation applies to both user and dictionary DML. For
example, even simple SQL such as <sequence>.nextval is not supported as this requires a dictionary update.

Concurrent Reporting requires some level of application level DML, from updating the FND_CONCURRENT_REQUESTS table through
to setting Row Level Security by using the multi­org temporary table. Temporary tables provide the greatest challenge for ADG
Concurrent Reporting, as all access must be through a database link. In the current implementation, temporary tables are
resolved to the primary. For higher performance over high­latency networks, it is, of course, technically possible to change the
database link for temporary tables to a local, read­write "scratch" database. However, while this is relatively easy to implement,
the steps are not included in this solution. For security reasons, all database links are checked to ensure that they resolve to
primary.

1.5 Security

Standard database security practices recommend that the SQL*Net traffic between the standby and the primary should be
encrypted using standard SSL. For further information, refer to My Oracle Support Knowledge Document 1367293.1,  Enabling SSL
in Oracle E­Business Suite Release 12.2.
Section 2: Concurrent Manager Reporting
Concurrent Manager support for ADG reporting has the following restrictions:

Only Oracle Reports with no direct or indirect DML (Data Manipulation Language) are supported.
A report that is to be run on the ADG instance must have been previously run on the primary.
FND Debug and other types of debugging are not supported.

https://support.oracle.com/epmos/faces/DocumentDisplay?_afrLoop=244415059001474&id=1944539.1&_afrWindowMode=0&_adf.ctrl­state=hdwi74grb_4#1.3… 2/16
1/10/2017 Document 1944539.1
The process for running ADG reporting is as follows:

2.1 Identify Reports That Can Be Run on Active Data Guard
2.2 Redirect Reports to Active Data Guard

2.1 Identify Reports That Can Be Run on Active Data Guard

There are hundreds of Oracle E­Business Suite Reports, not to mention custom reports. Section 11: Validated Reports contains a
cross­section of reports that have been validated with Active Data Guard. This solution provides a process (simulation mode) that
enables you to differentiate between reports that can and cannot be run on ADG. As mentioned, a report that is to be run on
ADG must first be run on the primary using the simulation mode. During this time, READ­ONLY violations are logged to a trace
file and the report will not be allowed to run on ADG. Whether or not a report uses DML may depend on a number of factors,
such as the particular report parameters used, for example.

2.2 Redirect Reports to Active Data Guard

As mentioned in 1.3 Parallel Concurrent Processing, a concurrent processing node needs to be set up for ADG reporting. There is
nothing special about the node other than its location. In other words, if network latency is not an issue, the report could be
assigned to any node.

Note: If latency or the volume of traffic is of concern, consider co­locating a concurrent manager tier near the ADG server.

Once a concurrent manager node has been configured, the reports need to be redirected to the standby. This can be done in one
of two ways:

1. Use a specific target instance
You can change the session properties within the Concurrent Program Definition form to specify a target ADG instance. If
you have more than one standby instance, then use this field to balance the load across all of the nodes.

2. No target instance
If you do not specify a target instance and use the automatic redirection  feature described in 8.1 Manual Redirection, the
request submission will automatically direct the request to the first available standby concurrent manager.

Section 3: Configuration
3.1 Configure an ADG Database
3.2 Configure Parallel Concurrent Processing and Set Up an ADG Manager
3.3 Apply Patches
3.4 Prepare the System for Reporting
3.5 Register ADG Connections
3.6 Configure Concurrent Managers

3.1 Configure an ADG Database

Set up a physical standby and open the database in READ­ONLY mode. Refer to My Oracle Support Knowledge Document
1491855.1,  Business Continuity for Oracle E­Business Release 12.2 Using Oracle 11g Physical Standby Database
, or for 12c
database refer to My Oracle Support Knowledge Document 1963472.1, Business Continuity for Oracle E­Business Suite Release
12.2 Using Oracle 12cR1 (12.1.0.2) Physical Standby Database and Appendix B: Opening a Physical Standby Read­Only for further
information.

3.2 Configure Parallel Concurrent Processing and Set Up an ADG Manager

Follow the steps in My Oracle Support Knowledge Document 1383621.1,  Cloning Oracle E­Business Suite Release 12.2 with Rapid
Clone , to clone an Oracle E­Business Suite applications tier and set up parallel concurrent processing. Register the node for batch
processing only. As mentioned earlier, it is recommended that this node, although part of the primary system, be co­located with
the ADG database in high­latency networks as the majority of network traffic will be between the concurrent manager and ADG
instance.

Once the concurrent processing node has been created, start the application and register a new concurrent manager. Use
exclude/include rules to ensure that this manager only handles reports destined for ADG (refer to Appendix C: Example ADG
Concurrent Manager Configuration) .
3.3 Apply Patches

Ensure that the patches listed in 1.2 Software Prerequisites have been applied. 

3.4 Prepare the System for Reporting

Perform the following steps as the APPS user:

1. This step prepares a system if you are cloning or repurposing an existing node. There is no need to run this step on a new
system, however, if you do, they will still run, but you will get no data type errors.

SQL>execute fnd_adg_utility.disable_adg_support;
 
SQL>execute fnd_adg_utility.disable_database_triggers;
SQL>execute fnd_adg_utility.switch_rpc_system_off;  

https://support.oracle.com/epmos/faces/DocumentDisplay?_afrLoop=244415059001474&id=1944539.1&_afrWindowMode=0&_adf.ctrl­state=hdwi74grb_4#1.3… 3/16
1/10/2017 Document 1944539.1
2. Clean the configuration using the following command:

SQL>execute fnd_adg_utility.clone_clean;

3. Run the following command to initialize the ADG reporting environment:

SQL>execute fnd_adg_utility.prepare_for_rpc_system;

4. Create a database link that, will be used to connect to the primary, using a privileged user (as the standard APPS account
does not have the CREATE PUBLIC DATABASE LINK privilege):

SQL>create public database link <db_link> using <connect_str> ;

Note that the link must be public and the connect string must be a TNS alias; this will be validated before it is used. The
<connect_str> can be the standard AutoConfig generated TNS alias. 
 
5. Register a database link that will be used to connect to the primary using the following command:

SQL>execute fnd_adg_utility.register_connection(p_type =>
fnd_adg_utility.C_CONNECT_STANDBY_TO_PRIMARY, p_link_name => <db link name>, p_link_connstr =>
<connect_string> );

6. Enable the RPC system. As supplied, ADG support is disabled. Enable it by using compile time directives to ensure that no
database link dependencies are activated until you choose to enable ADG support. Switching the RPC system on creates
synonyms that enable REMOTE DML through database links and enables the compile time directive so that the REMOTE
code path is now available. Note that enabling the compile time directive doesn't mean that the code path will be
executed. It just brings in the REMOTE code path for compilation.

SQL>execute fnd_adg_utility.switch_rpc_system_on;

Note: This will fail unless the database link registered in step 4 above is valid. In other words, the link must resolve
to a READ­WRITE database with the same DBID.

7. Ensure that all objects are valid by recompiling using the standard RDBMS scripts or the following code:

SQL>execute fnd_adg_utility.compile_rpc_dependents;

8. Optionally, enable database triggers ­ see Section 7: Database Triggers .
SQL>execute fnd_adg_utility.enable_database_triggers;

3.5 Register ADG connections

Connections are registered using fnd_adg_utility.register_connection. There are three types of connections:

Connection from Standby to Primary
This is used for DML operations from the standby.
 
Connections from Primary to Standby
These are the connections used for running the reports. Up to five connections (ADG databases) can be specified. 
 
Connection to Simulated Standby
This is a connection to the primary that allows a report to run on primary but simulates conditions as if it were running on
standby (the report is not terminated with error, but failures (writes) are logged against the report).

The following table provides the parameters for the fnd_adg_utility.register_connection procedure.

Option Type Description

Use one of the following constants depending on the type of connection:
 C_CONNECT_STANDBY_TO_PRIMARY  
type Boolean
 C_CONNECT_PRIMARY_TO_STANDBY    
 C_CONNECT_TO_SIMULATED_STANDBY

link_name varchar2 Database link name.


link_owner varchar2 Defaults to PUBLIC which is the only allowable value.
link_connstr varchar2 Database link connect string. Resolves to a TNS alias.

Default is FALSE. Cannot be set to TRUE unless the APPS account has CREATE
PUBLIC DATABASE LINK privilege. It is not recommended to add this privilege to
create_db_link_if_undefined Boolean
the APPS account. Therefore, connect as a privileged user and create the
required database links using the aliases in the table below.

Allowable values are from 1 to 5.  This is only valid when type is
standby_number number
C_CONNECT_PRIMARY_TO_STANDBY.

https://support.oracle.com/epmos/faces/DocumentDisplay?_afrLoop=244415059001474&id=1944539.1&_afrWindowMode=0&_adf.ctrl­state=hdwi74grb_4#1.3… 4/16
1/10/2017 Document 1944539.1
The RPC system cannot be enabled until the C_CONNECT_STANDBY_TO_PRIMARY connection (as discussed in 3.4 Prepare the
System for Reporting) has been registered. Before a connection can be used it must be validated using the following code. (Note
that C_CONNECT_STANDBY_TO_PRIMARY is automatically validated during the RPC system switch).

SQL>fnd_adg_utility.validate_connection(<type>,<standby_number>);

Note: There must be at least one C_CONNECT_PRIMARY_TO_STANDBY connection in order for reports to use ADG.

The C_CONNECT_TO_SIMULATED_STANDBY procedure is required for using the simulated standby feature; refer to Section 5:
Managing Simulation Standby Mode for further information.

TNS Aliases

There is currently no AutoConfig support for ADG aliases so they need to be set up manually both on the database and middle
tier. The TNS alias requirements are specified in the following table.

Required
on
Required on
Database
Connection Type TNS Alias Description Applications
Tiers?
Tier?
(Primary &
ADG)
C_CONNECT_STANDBY_TO_PRIMARY An alias that connects to the primary database. Yes No
C_CONNECT_PRIMARY_TO_STANDBY An alias that connects to an ADG instance. Yes Yes

An alias that connects to the primary database through a
dedicated service. It cannot be the same alias as
C_CONNECT_TO_SIMULATED_STANDBY <STANDBY_TO_PRIMARY>. See Section 5: Managing Yes Yes
Simulation Standby Mode for further details on simulated
standby.

Note: It is recommended that you create a database ifile and copy the contents to the <TNS_ADMIN> directory on each of
the respective tiers.

3.6 Configure Concurrent Managers

Once you have set up a dedicated concurrent processing node for the ADG concurrent manager(s), the managers need to be
registered and configured.

To ensure that only ADG managers handle standby requests, you need to configure include/exclude rules, such that ADG
managers are included, all others are excluded. Refer to Appendix C: Example ADG Concurrent Manager Configuration for an
example of setting up an ADG manager. Once configured, this rule needs to be registered using
fnd_adg_utility.register_standby_cm_class.

fnd_adg_utility.register_standby_cm_class

Option Type Description


standby_number number Allowable values 1 to 5. 
rule_class_app_id number The Concurrent Manager Class Application Id for the rule.

rule_class_id number The Concurrent Manager Class Id for the rule.

Use the following SQL to determine the class ID for a given request type:

SQL>select APPLICATION_ID,REQUEST_CLASS_ID 
    from FND_CONCURRENT_REQUEST_CLASS  
 
    where REQUEST_CLASS_NAME='<REQUEST_TYPE>';

All valid requests will now be routed to the designated manager. Conversely, if the ADG manager/database is unavailable, the
request will be routed based on existing rules/shifts defined for the program.

Section 4: Managing ADG Support
This section describes the control process, which is a precursor to discussing how concurrent programs are managed.

4.1 Enabling/Disabling ADG Support
4.2 General Options

4.1 Enabling/Disabling ADG Support

https://support.oracle.com/epmos/faces/DocumentDisplay?_afrLoop=244415059001474&id=1944539.1&_afrWindowMode=0&_adf.ctrl­state=hdwi74grb_4#1.3… 5/16
1/10/2017 Document 1944539.1
ADG support must be enabled before it can be used, using the following command:

SQL>execute fnd_adg_utility.enable_adg_support;

Conversely it can be disabled at any time, with all other settings left unchanged, using the following command:

SQL>execute fnd_adg_utility.disable_adg_support;

You may want to disable ADG support for one of a number of reasons, including the following:

1. To disable all standby/simulation actions.
2. To allow the control APIs to be called (as in the example in 4.2 General Options, below)

4.2 General Options

The options in the following table are set by calling fnd_adg_utility.set_control_options. In most cases, the defaults do
not need to be changed.

Initial
Option Type Description
Value

When a request completes successfully on primary, mark report as
always_collect_primary_data Boolean having run at least once on primary. This is the only option that is TRUE
honored even if ADG support has been disabled.

Redirect valid reports to the ADG standby regardless of the state of the
enable_redirect_if_valid Boolean concurrent managers. The initial value is FALSE, i.e. the ADG manager FALSE
must be running for the report to be redirected.
enable_standby_error_checks Boolean Check for ADG instance read only errors. TRUE
enable_automatic_redirection Boolean Automatically redirect if the report can be run on ADG. FALSE

0 ­ No debug
debug_rpc Number 0
1 ­ Enable SQL TRACE.
enable_commit_wait Boolean Currently unused
max_commit_wait_time Number Currently unused
runtime_validate_timestamp Boolean Currently unused
standby_error_threshold Number Currently unused
debug_slave_rpc Number Currently unused

This API can only be called when ADG support has been disabled as described in the 4.1 Enabling/Disabling ADG Support.

Section 5: Managing Simulated Standby Mode
One of the problems with redirecting reports to an ADG database, is determining whether a report will run on a read­only
database. To help answer this question, it is possible to run a simulation where a report runs on primary but is executed as if it
were running on standby. In this simulation mode, SQL that would fail on the standby is logged to both database trace files and
V$ views. Once a program has completed, the trace file/V$ views are scanned and the number of violations recorded in
FND_ADG_CONCURRENT_PROGRAM. Note that trace files can be written to USER_DUMP_DEST or a separate directory as shown in
Appendix A

The process of using a simulated standby is as follows:

1. Register a simulated standby connection.
2. Create a database service to identify a simulated connection.
3. Set the simulation options.
4. Enable database logon/off triggers as described in Section 7: Database Triggers.
5. Use the simulated standby connect string for the concurrent program or use redirection.
6. Run the concurrent program.

5.1 Simulation Options
5.2 Read­Only Violation Processing

5.1 Simulation Options

fnd_adg_utility.set_simulated_standby_options

Initial
Option Type Description
Value

Enables/disables simulation mode. To capture read­only violations,
enable_simulated_standby Boolean database triggers must also be enabled as specified in Section 7: TRUE
Database Triggers.

https://support.oracle.com/epmos/faces/DocumentDisplay?_afrLoop=244415059001474&id=1944539.1&_afrWindowMode=0&_adf.ctrl­state=hdwi74grb_4#1.3… 6/16
1/10/2017 Document 1944539.1
enable_auto_simulation Boolean If a report can be run in simulation mode, this option automatically directs FALSE
the request to the simulation connection.

To identify that a connection is to be used for simulation, a dedicated
database service needs to be created and then registered. 
A database service can be set at the database init.ora level, by using
simulated_standby_service varchar2 NULL
Grid Infrastructure or the DBMS_SERVICE package. See Appendix D:
Creating and Using Database Services for an example.

simulation_error_threshold Number During logoff processing, do not report violations unless above threshold. 5

A directory object for the standard RDBMS trace directory. This directory
trace_directory_obj varchar2 object must provide READ access to the diagnostic trace directory ­ that NULL
is, the directory where SQL trace files are created.

This API can only be called when ADG support has been disabled ­ see 4.1 Enabling/Disabling ADG Support.

5.2. Read­Only Violation Processing

During logoff processing, the following data is recorded:

Session level violations in fnd_adg_simulated_stndby_trc.
Program level violations in fnd_adg_concurrent_program.

If the simulation was successful and no violations were recorded, the program is marked as runnable on standby.

Note: The violation count in fnd_adg_simulated_stndby_trc is the total count; in fnd_adg_concurrent_program, it is the
count minus the threshold.

Section 6: Managing Concurrent Programs
The previous sections covered enabling and configuring Active Data Guard support. The next step is to manage the programs
that can run on an ADG database.

Due to various limitations with ADG, the following conditions have to be true before a report can be run on standby:

The report must be the correct type. Currently only Oracle Report programs are supported.
The report must have been previously been run on primary and must have been run in simulation mode.
The report must be marked as runnable on standby; importantly it can have no read­only violations.

With these conditions met, and with ADG support enabled, a concurrent request can be redirected to the ADG concurrent
managers.

The state changes above are handled automatically, but you may wish to override/pre­populate the program rules based on
specific requirements. This is managed through the manage_concurrent_program API.

fnd_adg_utility.manage_concurrent_program

Default
Option Type Description
Value
application_id Number

Application_id and Concurrent_Program_Id from
concurrent_program_id Number
FND_CONCURRENT_PROGRAM.

has_run_on_primary Boolean Set to TRUE once run on the primary. FALSE

has_run_on_simulated_standby Boolean Set to TRUE once run on the simulated standby. FALSE

run_on_standby Boolean Set to TRUE to mark as runnable on standby. FALSE

Set the number of standby failures. This is set automatically so the
no_standby_failures Number main use is to reset the value. It is automatically set (or increased) if 0
job runs and fails on the standby.

Set the maximum of standby failures: run_on_standby is disabled
max_standby_failures Number 0
when no_standby_failures > max_standby_failures.

Set the number of simulated standby failures. This is set automatically
no_simulated_stdby_failures Number so the main use is to reset the value. This is how many violations the 0
job encountered in simulation mode.

Set the maximum number of simulated standby failures:
max_simulated_stdby_failures Number run_on_standby is disabled when no_standby_failures > 0
max_standby_failures.

The program level option to always redirect valid reports to standby

https://support.oracle.com/epmos/faces/DocumentDisplay?_afrLoop=244415059001474&id=1944539.1&_afrWindowMode=0&_adf.ctrl­state=hdwi74grb_4#1.3… 7/16
1/10/2017 Document 1944539.1

always_redirect_if_valid Boolean regardless of the state of the concurrent managers. This setting has TRUE


no effect unless the control option enable_redirect_if_valid is
TRUE.

If the report can be run on standby, this setting automatically redirects
to the first available ADG database, ignoring any primary
use_automatic_redirection Boolean instance/node affinity. FALSE
This has no effect unless the control option
enable_automatic_redirection is TRUE.

This data is stored in FND_ADG_CONCURRENT_PROGRAM. 

When a report is run for the first time, by default a record is entered into fnd_adg_concurrent_program using the default
values. In an existing environment, it may be more convenient to run the following PL/SQL, which will populate
fnd_adg_concurrent_program for all of the concurrent jobs.

declare
 
cursor c1 is select a.APPLICATION_ID,a.CONCURRENT_PROGRAM_ID
               from fnd_concurrent_programs a;  
begin  
 
  for f_rec in c1 loop
 
    fnd_adg_utility.manage_concurrent_program
 
                     (p_application_id => f_rec.APPLICATION_ID,
 
                      p_concurrent_program_id => f_rec.CONCURRENT_PROGRAM_ID,
                      p_max_standby_failures => 1,  
 
                      p_max_simulated_stdby_failures => 5,
                      p_has_run_on_primary => true  
                     );  
  end loop;  
end;  
/  

Section 7: Database Triggers
ADG support delivers three schema level database triggers as follows:

Logon/Logoff: These triggers are a key component of the simulation testing. The logon trigger enables the read­only
violation trace, whereas the logoff trigger records the actual number of violations. If these triggers are not enabled, the
trace errors and V$ data are not recorded, in other words, the simulations are treated as having no errors.
servererror: The error trigger is only executed if an ORA­16000 is raised, which is read only violation (the trigger does
nothing on the primary). The error count for the concurrent program is incremented only if standby_error_checking has
been enabled as described in 4.2 General Options. If the error trigger is not enabled, report failures will not be recorded
and failures will not lead to run_on_standby being disabled. 

The triggers are disabled by default and need to be enabled. To enable/disable these triggers use the following command:

SQL> fnd_adg_utility.enable|disable_database_triggers ;

Note: Running without having these triggers enabled is not supported.

Section 8: Understanding the ADG Process Flow
The process flow depends on whether automatic or manual redirection is being used. However, the prerequisites for both
process flows are the same:

System prepared ­ 3.4 Prepare the System for Reporting
Validated connections ­ 3.5 Register ADG Connections
ADG support enabled ­ 4.1 Enabling/Disabling ADG Support
For standby simulation:
 Database logon/off triggers enabled ­ Section 7: Database Triggers
 Simulation options ­ 5.1 Simulation Options
Simulation enabled
Simulation service registered
For trace file access [optional] trace directory object registered
For ADG standby:
Registered CM class for standby ­ 3.6 Configure Concurrent Managers
Standby error checks enabled ­ 4.2 General Options
Database error trigger enabled ­ Section 7: Database Triggers
TNS aliases configured on all nodes ­ 3.5 Register ADG Connections
Concurrent program
Must have been previously run on the primary database. It is possible to set this state from the API ­ see Section 6:
Managing Concurrent Programs.

8.1 Manual Redirection
8.2 Automatic Redirection

8.1 Manual Redirection
https://support.oracle.com/epmos/faces/DocumentDisplay?_afrLoop=244415059001474&id=1944539.1&_afrWindowMode=0&_adf.ctrl­state=hdwi74grb_4#1.3… 8/16
1/10/2017 Document 1944539.1
In this mode of operation, the connection string is set as part of the Session Properties within the Concurrent Program Definition
form.

Simulation

Set the connection string to the simulation alias and submit a request. If the request is successful, the program is marked as
having been run in simulation mode. It is also marked as runnable on standby if the number of violations (minus the threshold) is
less than the program maximum.

Standby

Additional prerequisites are as follows:

Concurrent program:
Must have been successfully run in simulation mode. It is possible to set this state from the API ­ see Section 6:
Managing Concurrent Programs.
Must have been marked as runnable on standby. It is possible to set this state from the API ­ see Section 6:
Managing Concurrent Programs.
The ADG Concurrent Manager must be running.
The ADG database must be open in read­only mode.

Set the connection string to the standby alias and submit the request. The request will be redirected to the standby. If any read­
only errors occur on the standby, the ERROR trigger will update the number of concurrent program standby errors. If the number
of standby errors exceeds the program level maximum, the program will be marked as no longer runnable on standby.

8.2 Automatic Redirection

In this mode of operation, programs that are marked as runnable on standby and are enabled for automatic redirection will be
automatically redirected to the first available ADG instance.

Additional prerequisites:

System wide automatic redirection enabled ­ 4.2 General Options
Program level automatic redirection enabled ­ Section 6: Managing Concurrent Programs
For simulation:
Enable automatic simulation ­ 5.1 Managing Simulated Standby Mode

Simulation

Requests will automatically run in simulation mode.  If the requests are successful, the programs are marked as having been run
in simulation mode. They are also marked as runnable on standby if the number of violations (minus the threshold) is less than
the program maximum.

Standby

Additional prerequisites:

Concurrent program
Must have been successfully run in simulation mode. It is possible to set this state from the API ­ see Section 6:
Managing Concurrent Programs.
Must have been marked as runnable on standby. It is possible to set this state from the API ­ see Section 6:
Managing Concurrent Programs.
ADG Concurrent Manager must be running.
ADG database must be open read­only.

Requests will be redirected to the first available standby. If any read­only errors occur on the standby, the ERROR trigger will
update the number of concurrent program standby errors. If the number of standby errors exceed the program level maximum,
programs will be marked as no longer runnable on standby.

Note: The redirection of reports to run on the Standby database can be verified by reviewing the listener log file on the
standby host.

Section 9: Maintenance and Housekeeping
9.1 Removing ADG and RPC Support
9.2 Patch Application 

9.1 Removing ADG and RPC Support

ADG reporting functionality can be disabled at any time as per 4.1 Enabling/Disabling ADG Support. However, this does not
remove database link dependencies within the Oracle E­Business Suite code. If for any reason you wish to remove these
dependencies, you need to perform the following steps:

1. Connect to SQL as the APPS user.
2. Execute fnd_adg_utility.disable_adg_support;
3. Execute fnd_adg_utility.disable_database_triggers;
4. Execute fnd_adg_utility.switch_rpc_system_off;

https://support.oracle.com/epmos/faces/DocumentDisplay?_afrLoop=244415059001474&id=1944539.1&_afrWindowMode=0&_adf.ctrl­state=hdwi74grb_4#1.3… 9/16
1/10/2017 Document 1944539.1
5. Execute fnd_adg_utility.compile_rpc_dependents;

To reinstate ADG support after it has been removed:

1. Connect to SQL as the APPS user.
2. Execute fnd_adg_utility.switch_rpc_system_on;
3. Execute fnd_adg_utility.compile_rpc_dependents;
4. Execute fnd_adg_utility.enable_database_triggers;
5. Execute fnd_adg_utility.enable_adg_support;

9.2 Patch Application

Applying patches to the primary database is unaffected by ADG reporting functionality.

Section 10: Understanding Read­Only Violations
The simulation feature discussed in previous sections is underpinned by a new kernel feature to allow read­only violations to be
tracked and recorded.

This section provides some background on this new kernel feature. It is for information only as the simulation option
automatically handles the session events and statistics.

Enabling/Disabling Read­Only Violations

Version Enabling Read­Only Violations Disabling Read­Only Violations


alter session set log_read_only_violations = alter session set log_read_only_violations =
12.1.0.2.0
true false

Recording Read­Only violations

Version Session Level Trace file

The violations count is recorded in the session
level statistic, Each entry is tagged with
'spare statistic 1'.  "*** READ­ONLY VIOLATION BY MODULE..."
11.1.0.7 + 
patch
10070167  e.g. to query the current sessions violations
patch
select a.value
10134846
  from v$mystat a, v$statname b
where a.statistic# = b.statistic#
   and b.name = 'spare statistic 1';

The violation count is recorded in the session Each entry is tagged with
level statistic,  "*** READ­ONLY VIOLATION BY MODULE..."
'read­only violation count'.
Note that trace is only generated when the following
e.g. to query the current sessions violations underscore parameter is set:
12.1.0.2.0+
select a.value
_read_only_violation_dump_to_trace=true
  from v$mystat a, v$statname b
where a.statistic# = b.statistic#
    and b.name = 'read­only violation
count';

In 12.1.0.2.0+ there are additional reporting and control features.

x$krdrsbrov. A circular buffer to keep track of violations by module. The circular buffer is controlled by the following
initialization parameters.
_read_only_violation_max_count. Total size of the circular buffer. Default is 500.
_read_only_violation_max_count_per_module. Maximum number of violations per module kept in the buffer. 
Default is 100.

Note that these additional reporting features are not currently used by the simulation implementation.

If both simulation and database triggers have been enabled, then it is simply a matter of connecting through the simulation
service to enable read­only violation reporting.

Section 11: Validated Reports

Concurrent Program Name Concurrent Prog Short Name Application

Eligibility and Enrollment List BENELGEN Advanced Benefits

Extract Error Report BENXERRO Advanced Benefits

Extract Layout Report BENXLAYT Advanced Benefits

https://support.oracle.com/epmos/faces/DocumentDisplay?_afrLoop=244415059001474&id=1944539.1&_afrWindowMode=0&_adf.ctrl­state=hdwi74grb_4#1.… 10/16
1/10/2017 Document 1944539.1

Extract Summary Report BENXSMRY Advanced Benefits

Life Events Summary Report BENLESUM Advanced Benefits

Participation Error Detail Report by Person BENERRPE Advanced Benefits

OTLR Missing Timecard Report HXT964A Time and Labor

Project Accounting Table List HXT957E Time and Labor

Total Hours To BEE HXT007A Time and Labor

Total Table Entries HXT957H Time and Labor

Assignments Unavailable for Processing PAYRPBLK Payroll

Deductions Report PAYUSDED Payroll

Employee Payroll Movements Report PAYRPEMV(PAY) Payroll

Employee Run Results Report PAYUSRRS Payroll

GRE Totals Report PAYUSTOT Payroll

NACHA Report PAYRPNAC Payroll

Payment Register Report PAYACPRE Payroll

Third Party Payment Register Report PAYRPTPP Payroll

Void Payments Report (US) PAYRPVPRUS Payroll

Absences Report PERRPRAA Human Resources

Assignment Status Report PERRPRAS Human Resources

Duplicate Person Report PERWSDUP Human Resources

Full Person Details Report PERRPFP1 Human Resources

Organization Hierarchy Report PERRPROH Human Resources

Terminations Report PERRPRTM Human Resources

Incomplete invoices Report RAXIIR Receivables

Disputed invoice report ARXDIR Receivables

Journal Entries Report GLYRLGLG General Ledger

Unposted items report ARXGER Receivables

Tax Exempt Customer Report ZXXSTTEC E­Business Tax

US Sales Tax Report ZXXSTR E­Business Tax

Commitment Balance Report RAXCBR Receivables

Cash Requirement Report APXCRRCR Payables

Sales Journal by GL Account Report RAXGLR Receivables

AR Reconciliation Report ARXRECON Receivables

Account Analysis ­ (180 Char) GLACTANL2 General Ledger

Agreement Activity Report OEXOEASR Order Management

Audit History Report OEXAUDHR Order Management

Cancelled Orders Reason Detail Report OEXOEOCR Order Management

Cancelled Orders Report OEXOEOCS Order Management

Comprehensive Order Detail Report OEXOECOD Order Management

Credit Check Processor OEXAUCRC Order Management

Credit Order Detail Report OEXOEORD Order Management

Credit Order Discrepancy Report OEXCRDIS Order Management

Credit Order Summary Report OEXOEORS Order Management

Defaulting Rules Listing Report OEXDERUL Order Management

Export Compliance Report to Government OEXITMGV Order Management

Export Compliance Screening Failure Report OEXITMSF Order Management

Internal Order and Purchasing Requisition Discrepancy Report OEXIODIS Order Management

Lines on Credit Check Hold Report OEXOECCL Order Management

https://support.oracle.com/epmos/faces/DocumentDisplay?_afrLoop=244415059001474&id=1944539.1&_afrWindowMode=0&_adf.ctrl­state=hdwi74grb_4#1.… 11/16
1/10/2017 Document 1944539.1

Order Discount Detail Report OEXPRPRD Order Management

Order Discount Summary Report OEXPRPRS Order Management

Order/Invoice Detail Report OEXOEIOD Order Management

Order/Invoice Summary Report OEXOEIOS Order Management

Orders Summary Report OEXOEOSR Order Management

Orders by Item Report OEXOEITR Order Management

Orders on Credit Check Hold Report OEXOECCH Order Management

Outstanding Holds Report OEXOHOHS Order Management

Payment Receipt OEXPMTRC Order Management

Processing Constraints Listing Report OEXOEPCL Order Management

Returns by Reason Report OEXOEORR Order Management

Sales Order Acknowledgement OEXOEACK Order Management

Sales Order Workflow Status Report OEXOEWFR Order Management

Sales Order and Purchase Order Discrepancy Report OEXPODIS Order Management

Salesperson Order Summary Report OEXOESOS Order Management

Transaction Types Listing Report OEXORDTP Order Management

Unbooked Orders Detail Report OEXOEUBD Order Management

Unbooked Orders Report OEXOEUBK Order Management

Workflow Assignments Report OEXWFASG Order Management

Discrete Job Pick List Report WIPDJPCK Work In Progress

WIP Account Distribution Report WIPUTACD Work In Progress

Cycle count listing INVARCLI Inventory

Discrete Job Shortage Report WIPDJORQ Work In Progress

Discrete Job Value Report ­ Standard Costing WIPRDJVR Work In Progress

Shipping Transaction Summary Report CSTRSTSR Bills of Material

Subinventory quantities report INVIRSIQ Inventory

Prepayments Status Report APXINPSR Payables

Overtaken Vacation and Holiday HXT015A Time and Labor

Appendix A: Example Configuration

rem Public database links
   
rem These links assume that ADG,ADG_TO_STANDBY and ADG_SIMULATED TNS aliases have been created.
   
rem standby_to_primary
   
create public database link adg_to_primary.example.com using 'ADG';
   
rem primary_to_standby
   
create public database link ADG_TO_STANDBY.EXAMPLE.COM using 'ADG_STANDBY';
   
rem simulated standby
   
create public database link ADG_TO_SIMULATED_STANDBY.UK.ORACLE.COM using 'ADG_SIMULATED';
   
rem Optionally create database directory object for trace directory.
   
create or replace directory ADG_PRIMARY_TRACE_DIR as 
 
       '/d1/ADGSUP/ADG­11.1/db/tech_st/12.1.0/admin/ADG_db_nodename/diag/rdbms/adg/ADG/trace';
 

rem ignore errors if adg support/rpc system not enabled
   
execute fnd_adg_utility.disable_adg_support;    
execute fnd_adg_utility.switch_rpc_system_off;   
   
rem clean up
   
execute fnd_adg_utility.clone_clean; 
   

https://support.oracle.com/epmos/faces/DocumentDisplay?_afrLoop=244415059001474&id=1944539.1&_afrWindowMode=0&_adf.ctrl­state=hdwi74grb_4#1.… 12/16
1/10/2017 Document 1944539.1
rem execute fnd_adg_utility.clean_all;  
   
rem Clean_all is an alternative to clone_clean. Not normally used. It will remove everything, 
rem including RPC packages and ADG concurrent program data.  
   
rem execute fnd_adg_utility.resync_compile_directive; ­­ Only required if clean_all is used.
   
execute fnd_adg_utility.prepare_for_rpc_system;
   
begin
   
  fnd_adg_utility.register_connection
                 (  
 
                  fnd_adg_utility.C_CONNECT_STANDBY_TO_PRIMARY,
                  'ADG_TO_PRIMARY.EXAMPLE.COM',  
                  'PUBLIC',  
                  'ADG'  
                 );  
   
end;
/  
  
execute fnd_adg_utility.switch_rpc_system_on;
   
execute fnd_adg_utility.compile_rpc_dependents;
   
begin
   
  fnd_adg_utility.register_connection
                 (  
 
                  fnd_adg_utility.C_CONNECT_PRIMARY_TO_STANDBY,
                  'ADG_TO_STANDBY.EXAMPLE.COM',  
                  'PUBLIC',  
 
                  'ADG_TO_STANDBY',
                  false,  
                  1  
                 );  
   
  fnd_adg_utility.register_connection
                 (  
 
                  fnd_adg_utility.C_CONNECT_TO_SIMULATED_STANDBY,
                  'ADG_TO_SIMULATED_STANDBY.EXAMPLE.COM',  
                  'PUBLIC',  
 
                  'ADG_SIMULATED'
                 );  
   
end;
/  
  
rem Example use of options
   
begin
   
  fnd_adg_utility.set_simulated_standby_options
                   (  
 
                     p_enable_simulated_standby => true,
                     p_enable_auto_simulation => false,  
 
                     p_simulated_standby_service => 'ADG_SIMULATED',
 
                     p_trace_directory_obj => 'ADG_PRIMARY_TRACE_DIR',
                     p_simulation_error_threshold => 4  
                   );  
   
 
  fnd_adg_utility.set_control_options
                 (  
 
                   p_standby_error_threshold => 6,
                   p_debug_rpc => 1  
                 );  
   
end;
/  
  
rem register standby CM class
   
begin
   
  fnd_adg_utility.register_standby_cm_class
                 ( 1,  
 
                   0,  ­­ specify required app id
 
                   44598 ­­ specify required class id
                 );  
   
end;
/  
 

Appendix B: Opening a Physical Standby Read Only
Active Data Guard is a separately licensed database option that you need before performing the following steps.

https://support.oracle.com/epmos/faces/DocumentDisplay?_afrLoop=244415059001474&id=1944539.1&_afrWindowMode=0&_adf.ctrl­state=hdwi74grb_4#1.… 13/16
1/10/2017 Document 1944539.1
1. Cancel the recovery.
alter database recover managed standby database cancel;
2. Open the standby database in read only mode.
alter database open read only;
3. Start managed recovery.
alter database recover managed standby database using current logfile disconnect FROM SESSION
4. Make sure the standby is in read only mode.
select open_mode from v$database;

Appendix C: Example ADG Concurrent Manager Configuration
The following is an example configuration for an ADG Concurrent Manager.

Log in as System Administrator

Concurrent ­> Program ­> Types

Create

Name: ADG
Application: Application Object Library
Description: ADG Type for CM

Save to commit.

Concurrent ­> Manager ­> Define

Create

Manager: ADG Manager
Short Name: ADGMGR
Application: Application Object Library
Description: ADG Manager
Type: Concurrent Manager
Program Library: FNDLIBR
Primary Node: ADG reporting node
Save to commit.
Specialization Rules
Include/Exclude: Include
Type: Request Type
Application: Application Object Library
Name: ADG [ find for type defined above ]
Work Shifts
Standard/24 hours
Processes: 2
Sleep seconds: 20
Save to commit.

Update Specialization Rules for STANDARD MANAGER

Include/Exclude: Exclude
Type: Request Type
Application: Application Object Library
Name: ADG [ find for type defined above ]
Save to commit.

On the ADG node, the following services need to be started:

GSM
Listener
Concurrent Manager

Appendix D: Creating and Using Database Services
This example uses DBMS_SERVICE. Alternative approaches are to use the init.ora or Grid Infrastructure.

Use the following commands to create and start the service as the privileged user:

execute dbms_service.create_service('ADG_SIMULATED','ADG_SIMULATED');
execute dbms_service.start_service('ADG_SIMULATED');  

Appendix E: ADG Reporting Tables

Table Name Type Description

Contains one row that stores all the control information, including connections,

https://support.oracle.com/epmos/faces/DocumentDisplay?_afrLoop=244415059001474&id=1944539.1&_afrWindowMode=0&_adf.ctrl­state=hdwi74grb_4#1.… 14/16
1/10/2017 Document 1944539.1
FND_ADG_CONTROL Number state, control options and simulation options. The mapping is one to one with
corresponding procedure arguments except for RPC state.

The rows map one to one with FND_CONCURRENT_PROGRAM and contains all
FND_ADG_CONCURRENT_PROGRAM Number program control information. The column mapping is one to one with
fnd_adg_utility.manage_concurrent_program.

Records read­only violations from simulation sessions and contains one row for
each simulation session. The table is populated using the logoff trigger. If the
logoff trigger is disabled, no information will be recorded.

Column Description
LOG_SEQ Internal sequence.
ORACLE_PROCESS_ID As per FND_CONCURRENT_REQUESTS.
OS_PROCESS_ID As per FND_CONCURRENT_REQUESTS.
ORACLE_SESSION_ID As per FND_CONCURRENT_REQUESTS.

As per FND_CONCURRENT_REQUESTS.
REQUEST_ID Set to ­1 if trigger (simulation) has been run outside
of a concurrent job.

Should always be Y. A value of N would imply that
MAGIC_SWITCH_ENABLED the logoff trigger has been fired but the logon
trigger has been disabled.

The total number of read only violations. It is
calculated from both the V$ view and the trace file
FND_ADG_SIMULATED_STNDBY_TRC Boolean READ_ONLY_VIOLATIONS itself. If there is a discrepancy between the two
counts, the higher one is chosen. See also
TRACE_ACCESS_ERROR.

TRACE_FILE_NAME Name of the database trace file.

Indicates possible errors during logoff trigger
processing. The base point for the error depends on
whether there is a discrepancy between read only
violations.

0 ­ no discrepancy
100 ­ Trace file count > V$ count
200 ­ V$ count > Trace file count
TRACE_ACCESS_ERROR

After subtracting the base point, a non­zero value
indicates an error accessing the trace file.

1 ­ Invalid path
2 ­ Invalid file name and/or permissions
3 ­ Unknown open error.
4 ­ Read error.

FND_ADG_PACKAGE Boolean Internal support table.


FND_ADG_COMMIT_WAIT Number Internal support table. Currently unused.

Change Log

Date Description

Updated for EBS versions 12.2.4, 12.2.5 and database versions 12.1.0.2
06­Jan­2016
Added Patch Patch 20893664 20893664:R12.TXK.C in Section 1.2

19­Feb­2015 Updated versions

05­Jan­2014 Initial publication.

My Oracle Support Knowledge Document 1944539.1 by Oracle E­Business Suite Development

Copyright © 2015, Oracle and/or its affiliates. All rights reserved.

Didn't find what you are looking for? Ask in Community...

Related
Products

https://support.oracle.com/epmos/faces/DocumentDisplay?_afrLoop=244415059001474&id=1944539.1&_afrWindowMode=0&_adf.ctrl­state=hdwi74grb_4#1.… 15/16
1/10/2017 Document 1944539.1

Oracle E­Business Suite > Applications Technology > Technology Components > Oracle Applications Technology Stack > Database for Application Technology > Database for
Application Technology

Errors
ORA­16000

Back to Top
 
Copyright (c) 2017, Oracle. All rights reserved. Legal Notices and Terms of Use Privacy Statement
   

https://support.oracle.com/epmos/faces/DocumentDisplay?_afrLoop=244415059001474&id=1944539.1&_afrWindowMode=0&_adf.ctrl­state=hdwi74grb_4#1.… 16/16

You might also like