Вы находитесь на странице: 1из 21

9/24/12

Document

Using Active Data Guard Reporting with Oracle E-Business Suite Release 12.1 and Oracle Database 11g [ID 1070491.1]

Modified: Jun 25, 2012 Type: WHITE PAPER Status: PUBLISHED Priority: 3

Oracle E-Business Suite Release 12 has numerous configuration options that can be chosen to suit particular business scenarios, uptime requirements, hardware capability, and availability requirements. This document describes how to configure Oracle E-Business Suite Release 12 for Active Data Guard Reporting.

Note: At present, this document applies to UNIX and Linux platforms only.

The most current version of this document can be obtained in My Oracle Support Knowledge Document 1070491.1.

There is a change log at the end of this document.

A number of conventions are used in describing the Oracle E-Business Suite architecture:

Convention

Meaning

Application tier

Machines (nodes) running Forms, Web, and other services (servers). Sometimes called middle tier.

Database tier

Machines (nodes) running the Oracle E-Business Suite database.

Primary System

Primary Oracle E-Business Suite system

Standby System

Oracle E-Business Suite system running as a data guard standby to the primary system, open for read only access.

oracle

User account that owns the database file system (database ORACLE_HOME and files).

CONTEXT_NAME

The CONTEXT_NAME variable specifies the name of the Applications context that is used by AutoConfig. The default is <SID >_ <hostname >.

 

Full path to the Applications context file on the application tier or database tier. The default locations are as follows. Application tier context file:

CONTEXT_FILE

<APPL_TOP >/admin/ <CONTEXT_NAME >.xml Database tier context file:

<RDBMS ORACLE_HOME >/appsutil/ <CONTEXT_NAME >.xml

APPSpwd

Oracle E-Business Suite database user password.

Monospace Text

Represents command line text. Type such a command exactly as shown.

< >

Text enclosed in angle brackets represents a variable. Substitute a value for the variable text. Do not type the angle brackets.

\

On UNIX or Linux, the backslash character can be entered to indicate continuation of the command line on the next screen line.

This document is divided into the following sections:

Section 1: Overviewline. This document is divided into the following sections: Section 2: Concurrent Manager Reporting Section 3:

Section 2: Concurrent Manager Reportingis divided into the following sections: Section 1: Overview Section 3: Configuration Section 4: Managing ADG

Section 3: ConfigurationSection 1: Overview Section 2: Concurrent Manager Reporting Section 4: Managing ADG Support

Section 4: Managing ADG Support2: Concurrent Manager Reporting Section 3: Configuration

9/24/12

Document

Section 5: Managing Simulated Standby9/24/12 Document Section 6: Managing Concurrent Programs Section 7: Database Triggers Section 8: Understanding ADG

Section 6: Managing Concurrent Programs9/24/12 Document Section 5: Managing Simulated Standby Section 7: Database Triggers Section 8: Understanding ADG Process

Section 7: Database TriggersSimulated Standby Section 6: Managing Concurrent Programs Section 8: Understanding ADG Process Flow Section 9:

Section 8: Understanding ADG Process Flow6: Managing Concurrent Programs Section 7: Database Triggers Section 9: Maintenance and Housekeeping Section 10:

Section 9: Maintenance and HousekeepingDatabase Triggers Section 8: Understanding ADG Process Flow Section 10: Understanding READ ONLY Violations Section 11:

Section 10: Understanding READ ONLY ViolationsADG Process Flow Section 9: Maintenance and Housekeeping Section 11: Approved Reports Appendix A: Example

Section 11: Approved ReportsHousekeeping Section 10: Understanding READ ONLY Violations Appendix A: Example Configuration Appendix B: Opening a

Appendix A: Example ConfigurationREAD ONLY Violations Section 11: Approved Reports Appendix B: Opening a Physical Standby Read Only Appendix

Appendix B: Opening a Physical Standby Read Only11: Approved Reports Appendix A: Example Configuration Appendix C: Example ADG Concurrent Manager Appendix D:

Appendix C: Example ADG Concurrent ManagerAppendix B: Opening a Physical Standby Read Only Appendix D: Creating and Using Database Services Appendix

Appendix D: Creating and Using Database ServicesStandby Read Only Appendix C: Example ADG Concurrent Manager Appendix E: ADG Reporting Tables Section 1:

Appendix E: ADG Reporting TablesManager Appendix D: Creating and Using Database Services Section 1: Overview An Active Data Guard [ADG]

Section 1: Overview

An Active Data Guard [ADG] database is a data guard physical standby database opened for read access. This document assumes that you have a data guard physical standby database configured for read access. To set up physical standby for Oracle E-Business Suite Release 12, see My Oracle Support Knowledge Document 1070033.1.

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

1.1 Active Data Guard

An Active Data Guard database applies redo from the primary. Although ADG guarantees query consistency [ by a standby query SCN ] the redo should be applied as soon as possible to the standby to ensure reports are using up to date data. A delay of 30 seconds is no different to a job being held on a primary manager queue for an extra 30 seconds.

1.2 Software Prerequisites

This document assumes the following minimum software versions:

Software Component

Minimum Version

Additional Patches

Oracle E-Business Suite

12.1.3 or higher

Infrastructure patch 9434627 9434627:R12.FND.B Enabling patch 9505793 9505793:R12.FND.B patch 9526837 9526837:R12.FND.B .

Oracle Database 11gR1

11.1.0.7

or higher

Recording ADG violations: <patch 10070167> patch 10134846

Oracle Database 11gR2

11.2.0.2

or higher

None - included in patchset.

1.3 Parallel Concurrent Processing

In order to use Concurrent Manager Reporting you must be using Parallel Concurrent Processing 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 of course depend on the network latency between the primary and the ADG [ standby ] servers.

In this ADG manager configuration, the concurrent manager connects to the primary database; only the reports connect to the ADG database.

9/24/12

Document

1.4 Read-Only Limitations

ADG is a READ ONLY database. No DML of any sort is permitted other than DML executed via database links. This limitation applies to both user and dictionary DML. So for example <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 up Row Level Security via the multi-org temporary table. Temporary tables provide the greatest challenge for Concurrent Reporting, as all access must be via a database link. In the current implememtation, temporary tables are resolved to the primary. It is of course technically possible to change the database link for temporary tables to a local, read-write scratch database. However, this is currently not the delivered solution, as for security reasons all db links are checked to ensure that they resolve to primary.

1.5 Security

The only new security issue is the requirement to secure the SQL net traffic between the standby and the primary. As per usual database security practice the traffic between the two servers should be encrypted using standard SSL - see <Document 376700.1>.

Section 2: Concurrent Manager Reporting

Concurrent Manager support for ADG reporting is currently restricted as follows:

Only Oracle Reports programs are supported.for ADG reporting is currently restricted as follows: For a report to be run on ADG

For a report to be run on ADG it must have been previously run on the primary.as follows: Only Oracle Reports programs are supported. Only Oracle Reports programs that have no direct

Only Oracle Reports programs that have no direct or indirect DML are supported. [ This excludes FND level DML discussed in 1.4 ]run on ADG it must have been previously run on the primary. FND Debug is not

FND Debug is not supported.supported. [ This excludes FND level DML discussed in 1.4 ] The process for running ADG

The process for running ADG reporting is :

Identify reports that can be run on ADG.is not supported. The process for running ADG reporting is : Redirect reports to ADG. 2.1

Redirect reports to ADG.ADG reporting is : Identify reports that can be run on ADG. 2.1 Identifying Reports that

2.1 Identifying Reports that can be run on Active Data Guard

Section 11 contains a list of reports that have been validated against Active Data Guard. However, there are many thousands of Oracle Reports programs, not to mention custom reports. Therefore, a process is required to allow customers to identify reports that can be run on ADG. This is done by providing a simulation mode, where reports run on primary but log READ ONLY violations. This information is logged to both V$ views and database trace files.

2.2 Redirecting Reports to Active Data Guard

As mentioned in 1.3, 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 was not an issue the report could be assigned to any node, using existing work shifts and rules.

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

1. By changing the Session Properties within the Concurrent Program Definition form and specifying an ADG instance.

2. By using automatic redirection. With this option, request submission will automatically push the request to the first available standby [concurrent manager].

The configuration steps required are covered in the following sections.

9/24/12

Document

Section 3: Configuration

3.1 Configure an ADG database

Set up a physical standby using My Oracle Support Knowledge Document 1070033.1 and open the database READ ONLY. See Appendix B for the steps to open a data guard database read only.

3.2 Configure Parallel Concurrent Processing and set up an ADG Manager

Follow the steps in Document 406982.1 for cloning an applications tier to set up Parallel Concurrent Processing, registering the node for batch processing only. As discussed earlier, it is recommended that this node, 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

Start up the application and register a new concurrent manager, assigning it the node co-located with ADG. To ensure that this manager only handles reports destined for ADG, use exclude/include rules. It is beyond the scope of this document to discuss the concurrent manager architecture but an example configuration is supplied in Appendix C.

3.3 Apply Patches

Apply patches as per Software Prerequisites .

3.4 Prepare System for reporting

As the APPS user carry out the following steps.

1. Disable system - if this is the first time, skip this step.

1. execute fnd_adg_utility.disable_adg_support;

2. execute fnd_adg_utility.disable_database_triggers; -- If enabled.

3. execute fnd_adg_utility.switch_rpc_system_off;

2. execute fnd_adg_utility.clone_clean;

3. execute fnd_adg_utility.prepare_for_rpc_system;

4. Create a database link that will be used to connect to the primary. [ Although it is possible to create the database link dynamically, the standard APPS account does not have the "CREATE PUBLIC DATABASE LINK" privilege ]

1. create public database link <db_link> using <connect_str> [ The link must be public and the connect

string a TNS alias. It will be validated before it can be 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.

1. 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. execute fnd_adg_utility.switch_rpc_system_on;

1. This will fail unless the database link registered in step 4 is valid - i.e. the link must resolve to a READ- WRITE database with the same DBID.

7. Recompile invalid objects

1. execute fnd_adg_utility.compile_rpc_dependents; or use standard RDBMS scripts.

8. Optionally enable database triggers - see Section 7

1. execute fnd_adg_utility.enable_database_triggers;

Switching RPC System On

Out of the box, ADG support is disabled. This is achieved by using compile time directives to ensure that no database link dependencies are brought in until customers choose to enable ADG support.

Switching the RPC system on does two things:

9/24/12

Document

1. Creates synonyms to allow REMOTE DML via database links.

2. 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.

3.5 Register ADG connections

Connections are registered via 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.There are three types of connections: Connections from Primary to Standby. These are the

Connections from Primary to Standby. These are the connections used for running the reports. Up to five connections [ ADG databases ] can be specified.Primary. This is used for DML operations from the standby. Connection to Simulated Standby. This is

Connection to Simulated Standby. This is a connection to primary that allows a report to run on primary as if it were running on standby.Up to five connections [ ADG databases ] can be specified. fnd_adg_utility.register_connection Option Type

fnd_adg_utility.register_connection

Option

Type

Description

   

Use constant from fnd_adg_utility:

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.

create_db_link_if_undefined

Boolean

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

standby_number

number

Allowable values 1 to 5. Only valid when type is C_CONNECT_PRIMARY_TO_STANDBY.

C_CONNECT_STANDBY_TO_PRIMARY was discussed in 3.4.5 as the RPC system cannot be enabled until this connection has been registered. Before a connection can be used it must be validated. [ Not that C_CONNECT_STANDBY_TO_PRIMARY is automatically validated during the RPC system switch.]

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

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

C_CONNECT_TO_SIMULATED_STANDBY is required for using the simulated standby feature - see Section 5.

TNS Aliases

There is currently no autoconfig support for ADG aliases so theses aliases need to be set up manually both on the database and middle tier. The TNS alias requirements are discussed below. It is recommended to create an <IFILE>

9/24/12

Document

and copy the contents to the respective tiers <TNS_ADMIN> directory.

Required on

Database

Tier (Primary

& ADG)

Required on

Applications

Tier

Connection Type

TNS Alias Description

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

C_CONNECT_TO_SIMULATED_STANDBY

An alias that connects to the primary database via a dedicated service. It cannot be the same alias as <STANDBY_TO_PRIMARY>. See Section 5 for further details on Simulated Standby.

Yes

Yes

3.6 Configuring Concurrent Managers

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

To ensure that only ADG managers handle standby requests, you need to designate an include/exclude rule, such that ADG managers are included, all others are excluded. See Appendix C 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 Class Application Id for the rule.

rule_class_id

number

The Class Id for the rule.

For a given request type use the following SQL to determine the class ids:

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

Before discussing how concurrent programs are managed the control process is discussed.

4.1 Enabling/Disabling ADG support

9/24/12

Document

ADG support must be enabled before it can be used:

execute fnd_adg_utility.enable_adg_support;Document ADG support must be enabled before it can be used: Conversely it can be disabled

Conversely it can be disabled at any time. All other settings are left unchanged.

execute fnd_adg_utility.disable_adg_support;disabled at any time. All other settings are left unchanged. Disabling ADG support is done for

Disabling ADG support is done for two reasons:

1. To disable all standby/simulation actions.

2. To allow the control APIs to be called.

4.2 General Options

These options are set by calling fnd_adg_utility.set_control_options. In most cases, they do not need to be changed and the defaults are fine.

     

Initial

Option

Type

Description

Value

   

When a request completes successfully on primary, mark report as having run at least once on primary.

 

always_collect_primary_data

Boolean

This is the ONE option that is honoured even if ADG support has been disabled

TRUE

enable_redirect_if_valid

Boolean

Redirect valid reports to standby regardless of the state of the concurrent managers. The initial value is FALSE - i.e. the ADG manager must be running for the report to be redirected.

FALSE

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

debug_rpc

Number

0 - No debug

 

1 - Enable SQL TRACE.

0

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 - see Section 4.1

Section 5: Simulated Standby

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, 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. After a program has completed, the EBS infrastructure will scan the trace file/V$ views and record the number of violations. Note that trace file access requires a directory object that resolves to the instance trace directory.

9/24/12

Document

The process of using simulated standby is as follows:

Register a Simulated Standby ConnectionThe process of using simulated standby is as follows: Create a database service to identify a

Create a database service to identify a simulation connection.is as follows: Register a Simulated Standby Connection Set simulation options Enable database logon/off triggers -

Set simulation optionsa database service to identify a simulation connection. Enable database logon/off triggers - see Section 7

Enable database logon/off triggers - see Section 7 . Section 7.

Use the simulated standby connect string for the concurrent program or use redirection.Enable database logon/off triggers - see Section 7 . Run the concurrent program. 5.1 Simulation Options

Run the concurrent program.string for the concurrent program or use redirection. 5.1 Simulation Options

5.1 Simulation Options

fnd_adg_utility.set_simulated_standby_options

     

Initial

Option

Type

Description

Value

enable_simulated_standby

Boolean

Enables/disables simulation mode. To capture read-only violations, database triggers must also be enabled - see Section 7.

TRUE

   

If

a report can be run in simulation mode, then this

 

enable_auto_simulation

Boolean

option will automatically direct to the simulation

FALSE

connection.

   

To identify that a connection is for simulation, a dedicated database service needs to be created and then registered.

 

simulated_standby_service

varchar2

A

database service can be set at the init.ora level,

NULL

via Grid infrastructure or using the DBMS_SERVICE package. See Appendix D for an example of creating and using a database service.

simulation_error_threshold

Number

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

5

   

A

directory object for the standard RDBMS trace

 

trace_directory_obj

varchar2

directory. This directory object must provide READ access to the diagnostic trace directory - i.e. the directory where SQL trace files are created.

NULL

This API can only be called when ADG support has been disabled - see Section 4.1

5.2. Read Only Violation Processing

During logoff processing, the following data is recorded :

Session level violations in fnd_adg_simulated_stndby_trc fnd_adg_simulated_stndby_trc

Program level violations in fnd_adg_concurrent_program. 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 less the threshold. ]

9/24/12

Document

Section 6: Managing Concurrent Programs

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 has to be true before a report can be run on standby.

Report must be the correct type - currently only Oracle Reports programs are supported.has to be true before a report can be run on standby. Report must have been

Report must have been previously been run on primary.type - currently only Oracle Reports programs are supported. Report must have been run in simulation

Report must have been run in simulation mode.Report must have been previously been run on primary. Report must be marked as runnable on

Report must be marked as runnable on standby - i.e. has no READ ONLY violations.on primary. Report must have been run in simulation mode. With these conditions met, and with

With these conditions met, and with ADG support enabled - see 4.1 - a concurrent request will be redirected to the ADG concurrent managers.

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

fnd_adg_utility.manage_concurrent_program

     

Default

Option

Type

Description

Value

application_id

Number

   

concurrent_program_id

Number

Application_id,Concurrent_Program_Id - primary key from FND_CONCURRENT_PROGRAM.

 

has_run_on_primary

Boolean

Set to TRUE to mark as run on primary.

FALSE

has_run_on_simulated_standby

Boolean

Set to TRUE to mark as run as simulated standby.

FALSE

run_on_standby

Boolean

Set to TRUE to mark as runnable on standby.

FALSE

no_standby_failures

Number

Set the number of standby failures. This is set automatically so the main use is to reset the value.

0

max_standby_failures

Number

Set the maximum of standby failures. Run_On_Standby is disabled when no_standby_failures > max_standby_failures

0

no_simulated_stdby_failures

Number

Set the number of simulated standby failures. This is set automatically so the main use is to reset the value.

0

max_simulated_stdby_failures

Number

Set the maximum number of simulated standby failures. Run_On_Standby is disabled when no_simulated_stdby_failures > max_simulated_stdby_failures.

0

   

Program level option to always redirect valid reports to standby regardless of the state of the concurrent managers.

 

always_redirect_if_valid

Boolean

Has no effect unless the control option "enable_redirect_if_valid" is TRUE.

TRUE

   

If the report can be run on standby, then automatically redirect to the first available ADG database, ignoring any

 

9/24/12

Document

use_automatic_redirection

 

primary instance/node affinity.

 

Boolean

Has no effect unless the control option "enable_automatic_redirection" is TRUE.

FALSE

This data is stored in FND_ADG_CONCURRENT_PROGRAM. Use PL/SQL for bulk operations.

e.g.

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. They are disabled by default. To enable/disable these triggers use:

fnd_adg_utility.enable|disable_database_triggers.

The three triggers are for logon,logoff and servererror.

7.1 Logon/Logoff Triggers

These triggers are to support simulation testing. The logon trigger will enable READ ONLY violation trace; the logoff trigger will record the number of violations.

If these triggers are not enabled, the following limitations apply:

Trace errors and V$ data are not recorded and simulations will be treated as having no errors. Without these triggers, enabling the simulation option is of limited benefit.triggers are not enabled, the following limitations apply: 7.2 Error Trigger This trigger is only executed

7.2 Error Trigger

This trigger is only executed if ORA-16000 is raised - i.e. the trigger does nothing on the primary. If <standby_error_checking> has been enabled [ see 4.2 ] then the error count for the concurrent program is incremented.

If the error trigger is not enabled, the following limitations apply:

Report failures will not be recorded.trigger is not enabled, the following limitations apply: Failiures will not lead to "Run on Standby"

Failiures will not lead to "Run on Standby" being disabled.limitations apply: Report failures will not be recorded.

9/24/12

Document

Section 8: Understanding 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 following:

System prepared - Section 3.4 Section 3.4

Validated connections - Section 3.5 Section 3.5

ADG support enabled - Section 4.1 Section 4.1

For standby simulation Database logon/off triggers enabled - Section 7.1 Section 7.1

Database logon/off triggers enabled - Section 7.1 Simulation options - Section 5.1 Simulation enabled
Database logon/off triggers enabled - Section 7.1 Simulation options - Section 5.1 Simulation enabled

Simulation options - Section 5.1 Simulation enabled

7.1 Simulation options - Section 5.1 Simulation enabled Simulation service registered For trace file access

Simulation service registered For trace file access [optional] trace directory object registered7.1 Simulation options - Section 5.1 Simulation enabled For ADG standby Registered CM class for standby

file access [optional] trace directory object registered For ADG standby Registered CM class for standby -

For ADG standby Registered CM class for standby - Section 3.6 Standby error checks enabled - Section 4.2 Database error trigger enabled - Section Section 3.6 Standby error checks enabled - Section 4.2 Database error trigger enabled - Section 7.2

TNS aliases configured on all nodes - Section 3.5 Section 3.5

Concurrent program Must have been previously run on the primary database. It is possible to set this state from the API - see Section 6 . Section 6.

possible to set this state from the API - see Section 6 . 8.1 Manual Redirection
possible to set this state from the API - see Section 6 . 8.1 Manual Redirection
possible to set this state from the API - see Section 6 . 8.1 Manual Redirection
possible to set this state from the API - see Section 6 . 8.1 Manual Redirection

8.1 Manual Redirection

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 [ less 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 . Must have been marked as runnable on standby. It is possible to Section 6. Must have been marked as runnable on standby. It is possible to set this state from the API - see Section 6.

ADG Concurrent Manager must be running.possible to set this state from the API - see Section 6 . ADG database must

ADG database must be open READ ONLY.- see Section 6 . ADG Concurrent Manager must be running. Set the connection string to

must be running. ADG database must be open READ ONLY. Set the connection string to the
must be running. ADG database must be open READ ONLY. Set the connection string to the

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 exceed 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.

9/24/12

Document

Additional prerequisites:

System wide automatic redirection enabled - Section 4.2 Section 4.2

Program level automatic redirection enabled - Section 6 Section 6

For simulation4.2 Program level automatic redirection enabled - Section 6 Enable automatic simulation - Section 5.1 Simulation

Enable automatic simulation - Section 5.1 Section 5.1

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 [ less threshold ] is less than the program maximum.

Standby

Additional prerequisites

Concurrent programthan the program maximum. Standby Additional prerequisites Must have been successfully run in simulation mode. It

Must have been successfully run in simulation mode. It is possible to set this state from the API - see Section 6 . Section 6.

Must have been marked as runnable on standby. It is possible to set this state from the API - see Section Section

6.

ADG Concurrent Manager must be running.possible to set this state from the API - see Section 6 . ADG database must

ADG database must be open READ ONLY.- see Section 6 . ADG Concurrent Manager must be running. Requests will be redirected to

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.

Section 9: Maintenance and Housekeeping

9.1 Removing ADG and RPC Support

ADG reporting functionality can be disabled at any time as per Section 4.1 . However, this does not remove database link dependencies within the EBS code. If for any reason you wish to remove these dependencies, carry out the following steps.

1. Connect to SQLPLUS 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;

5. execute fnd_adg_utility.compile_rpc_dependents;

To reinstate ADG support after it has been removed:

1. Connect to SQLPLUS 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.

9/24/12

Document

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

11.1.0.7

+

 

alter session set events '3177 trace name context forever, level 0'

patch 10070167

alter session set events '3177 trace name context forever, level 1'

patch 10134846

 

11.2.0.2

alter session set log_read_only_violations = true

alter session set log_read_only_violations = false

Recording READ ONLY violations

Version

Session Level

Trace file

11.1.0.7

+

The violations count is recorded in the session level statistic, 'spare statistic 1'.

Each entry is tagged with "*** READ-ONLY VIOLATION BY MODULE

"

patch

e.g. to query the current sessions violations

 

10070167

patch

10134846

select a.value fromv$mystat a, v$statname b where a.statistic# = b.statistic# and b.name = 'spare statistic 1';

 

The violation count is recorded in the session level statistic, 'read-only violation count'.

Each entry is tagged with "*** READ-ONLY VIOLATION BY MODULE

"

11.2.0.2+

e.g. to query the current sessions violations

Note that trace is only generated when the following underscore parameter is set:

_read_only_violation_dump_to_trace=true

select a.value fromv$mystat a, v$statname b where a.statistic# = b.statistic# and b.name = 'read-only violation count';

In 11.2.0.2+ there are additional reporting and control features.

there are additional reporting and control features. x$krdrsbrov. A circular buffer to keep track of violations

x$krdrsbrov. A circular buffer to keep track of violations by module. The circular buffer is controlled by the following initialisation 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.

9/24/12

Document

If both simulation and database triggers have been enabled, then it is simply a matter of connecting via the simulation service to enable READ ONLY violation reporting.

Section 11 : Approved 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

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

9/24/12

Document

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

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

9/24/12

Document

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

remPublicdatabaselinks

remTheselinksassumethatADG,ADG_TO_STANDBYandADG_SIMULATEDTNSaliaseshavebeencreated.

remstandby_to_primary

createpublicdatabaselinkadg_to_primary.uk.oracle.comusing'ADG';

remprimary_to_standby

createpublicdatabaselinkADG_TO_STANDBY.UK.ORACLE.COMusing'ADG_STANDBY';

remsimulatedstandby

createpublicdatabaselinkADG_TO_SIMULATED_STANDBY.UK.ORACLE.COMusing'ADG_SIMULATED';

remOptionallycreatedatabasedirectoryobjectfortracedirectory.

createorreplacedirectoryADG_PRIMARY_TRACE_DIRas

'/d1/ADGSUP/ADG-11.1/db/tech_st/11.1.0/admin/ADG_rws60001atg/diag/rdbms/adg/ADG/trace';

9/24/12

Document

remcleanup

executefnd_adg_utility.clone_clean;

remexecutefnd_adg_utility.clean_all;

remClean_allisanalternativetoclone_clean.Notnormallyused.Itwillremoveeverything,

remincludingRPCpackagesandADGconcurrentprogramdata.

remexecutefnd_adg_utility.resync_compile_directive;--Onlyrequiredifclean_allisused.

executefnd_adg_utility.prepare_for_rpc_system;

begin

fnd_adg_utility.register_connection

(

fnd_adg_utility.C_CONNECT_STANDBY_TO_PRIMARY,

'ADG_TO_PRIMARY.UK.ORACLE.COM',

end;

/

'PUBLIC',

'ADG'

);

executefnd_adg_utility.switch_rpc_system_on;

executefnd_adg_utility.compile_rpc_dependents;

begin

fnd_adg_utility.register_connection

(

fnd_adg_utility.C_CONNECT_PRIMARY_TO_STANDBY,

'ADG_TO_STANDBY.UK.ORACLE.COM',

'PUBLIC',

'ADG_TO_STANDBY',

false,

1

);

fnd_adg_utility.register_connection

(

fnd_adg_utility.C_CONNECT_TO_SIMULATED_STANDBY,

'ADG_TO_SIMULATED_STANDBY.UK.ORACLE.COM',

'PUBLIC',

'ADG_SIMULATED'

end;

/

);

remExampleuseofoptions

begin

fnd_adg_utility.set_simulated_standby_options

(

p_enable_simulated_standby=>true,

p_enable_auto_simulation=>false,

9/24/12

Document

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;

/

);

remregisterstandbyCMclass

begin

fnd_adg_utility.register_standby_cm_class

(1,

0, --specifyrequiredappid

44598--specifyrequiredclassid

end;

/

);

Appendix B - Opening a Physical Standby Read Only

Active Data Guard is a separately licensed database option. You must have acquired the licensed before carrying out the following steps.

1. Cancel the recovery

alterdatabaserecovermanagedstandbydatabasecancel;

2. Open the standby database in read only mode

alterdatabaseopenreadonly;

3. Start managed recovery

alterdatabaserecovermanagedstandbydatabaseusingcurrentlogfiledisconnectFROM

SESSION;

4. Make sure the standby is in read only mode

selectopen_modefromv$database;

Appendix C - Example ADG Manager Configuration

The following is an example configuration for an ADG Concurrent Manager.

Log in as System Administrator

Concurrent -> Program -> Types

Create

Name : ADGAdministrator Concurrent -> Program -> Types Create Application: Application Object Library

Application: Application Object LibraryConcurrent -> Program -> Types Create Name : ADG

9/24/12

Document

Description : ADG Type for CM9/24/12 Document Save to commit. Concurrent -> Manager -> Define Create Manager: ADG Manager Short Name:

Save to commit.

Concurrent -> Manager -> Define

Create

Manager: ADG Managerto commit. Concurrent -> Manager -> Define Create Short Name: ADGMGR Application: Application Object Library

Short Name: ADGMGR-> Manager -> Define Create Manager: ADG Manager Application: Application Object Library Description: ADG

Application: Application Object Library-> Define Create Manager: ADG Manager Short Name: ADGMGR Description: ADG Manager Type: Concurrent Manager Program

Description: ADG ManagerShort Name: ADGMGR Application: Application Object Library Type: Concurrent Manager Program Library: FNDLIBR Primary

Type: Concurrent ManagerApplication Object Library Description: ADG Manager Program Library: FNDLIBR Primary Node: ADG reporting node

Program Library: FNDLIBRLibrary Description: ADG Manager Type: Concurrent Manager Primary Node: ADG reporting node Save to commit.

Primary Node: ADG reporting nodeManager Type: Concurrent Manager Program Library: FNDLIBR Save to commit. Specialization Rules Include/Exclude:

Save to commit.Program Library: FNDLIBR Primary Node: ADG reporting node Specialization Rules Include/Exclude: Include Type: Request

Specialization Rules Include/Exclude: IncludeFNDLIBR Primary Node: ADG reporting node Save to commit. Type: Request Type Application: Application Object

to commit. Specialization Rules Include/Exclude: Include Type: Request Type Application: Application Object
Type: Request Type

Type: Request Type

Application: Application Object Library

Application: Application Object Library

Name: ADG [ find for type defined above ]

Name: ADG [ find for type defined above ]

Work Shifts Standard/24 hours Processes: 2 Sleep seconds : 20 Save to commit.Object Library Name: ADG [ find for type defined above ] Update Specialization Rules for STANDARD

hours Processes: 2 Sleep seconds : 20 Save to commit. Update Specialization Rules for STANDARD Include/Exclude:
hours Processes: 2 Sleep seconds : 20 Save to commit. Update Specialization Rules for STANDARD Include/Exclude:
hours Processes: 2 Sleep seconds : 20 Save to commit. Update Specialization Rules for STANDARD Include/Exclude:
hours Processes: 2 Sleep seconds : 20 Save to commit. Update Specialization Rules for STANDARD Include/Exclude:

Update Specialization Rules for STANDARD

Include/Exclude: Exclude20 Save to commit. Update Specialization Rules for STANDARD Type: Request Type Application: Application Object Library

Type: Request TypeSpecialization Rules for STANDARD Include/Exclude: Exclude Application: Application Object Library Name: ADG [ find for

Application: Application Object Libraryfor STANDARD Include/Exclude: Exclude Type: Request Type Name: ADG [ find for type defined above ]

Name: ADG [ find for type defined above ]Type: Request Type Application: Application Object Library Save to commit. On the ADG node, the following

Save to commit.Object Library Name: ADG [ find for type defined above ] On the ADG node, the

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

GSMOn the ADG node, the following services need to be started: Listener Concurrent Manager Appendix D

Listenerthe ADG node, the following services need to be started: GSM Concurrent Manager Appendix D -

Concurrent Managerthe following services need to be started: GSM Listener Appendix D - Creating and Using Database

Appendix D - Creating and Using Database Services

The example below uses DBMS_SERVICE. Alternative approaches are to use the init.ora or Grid infrastructure.

rem Step 1 - Create Service as privileged user

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

rem Step 2 - Start the Service as privileged user

execute dbms_service.start_service('ADG_SIMULATED');

Appendix E: ADG Reporting Tables

9/24/12

Document

Table Name

FND_ADG_CONTROL

FND_ADG_CONCURRENT_PROGRAM

FND_ADG_SIMULATED_STNDBY_TRC

Type

Number

Number

Boolean

Description

Contains one row and stores all control information, including connections, 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 program control information . The column mapping is one to one with the corresponding arguments in 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 via 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

REQUEST_ID

As per FND_CONCURRENT_REQUESTS. Set to -1 if trigger [ simulation ]has been run outside of a concurrent job.

MAGIC_SWITCH_ENABLED

Should always be Y. A value of N would imply that the LOGOFF trigger has been fired but the LOGON trigger has been disabled.

READ_ONLY_VIOLATIONS

The total number of read only violations. It is calculated from both the V$ view and the trace file 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.

TRACE_ACCESS_ERROR

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

After subtracting the base point, a non-zero value indicates an error

9/24/12

Document

FND_ADG_PACKAGE FND_ADG_COMMIT_WAIT Boolean Number accessing the trace file. 1 - Invalid path - Invalid file

FND_ADG_PACKAGE

FND_ADG_COMMIT_WAIT

FND_ADG_PACKAGE FND_ADG_COMMIT_WAIT Boolean Number accessing the trace file. 1 - Invalid path - Invalid file

Boolean

Number

accessing the trace file.

1

- Invalid path

- Invalid file name and/or permissions

2

3

- Unknown open error.

4

- Read error.

Internal support table.

Internal support table.Currently unused.

Change Log

Date

Description

Jun, 2012

Removed controlled release restriction for 9526837.Jun, 2012

Apr, 2011

Changed ReportWriter to Oracle Reports.Apr, 2011

Jan, 2011

Added notebox for controlled release of 9526837.Jan, 2011

Nov, 2010

Doc updates from cert testing.Nov, 2010

Aug, 2010

Formatting updates + patches.Aug, 2010

Mar, 2010

Initial creation.Mar, 2010

My Oracle Support Knowledge Document 1070491.1 by Oracle E-Business Suite Development Copyright © 2010, Oracle