Académique Documents
Professionnel Documents
Culture Documents
https://support.oracle.com/CSP/main/article?cmd=show&type=NOT&doc...
Using Active Data Guard Reporting with Oracle E-Business Suite Release 12.1 and Oracle Database 11g [ID 1070491.1] Modified 11-APR-2011 Type WHITE PAPER Status PUBLISHED
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 Application tier Database tier Primary System Standby System oracle CONTEXT_NAME Meaning Machines (nodes) running Forms, Web, and other services (servers). Sometimes called middle tier. Machines (nodes) running the Oracle E-Business Suite database. Primary Oracle E-Business Suite system Oracle E-Business Suite system running as a data guard standby to the primary system, open for read only access. User account that owns the database file system (database ORACLE_HOME and files). 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: <APPL_TOP >/admin/ <CONTEXT_NAME >.xml Database tier context file: <RDBMS ORACLE_HOME >/appsutil/ <CONTEXT_NAME >.xml Oracle E-Business Suite database user password. 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.
CONTEXT_FILE
This document is divided into the following sections: Section 1: Overview Section 2: Concurrent Manager Reporting Section 3: Configuration Section 4: Managing ADG Support Section 5: Managing Simulated Standby Section 6: Managing Concurrent Programs Section 7: Database Triggers Section 8: Understanding ADG Process Flow Section 9: Maintenance and Housekeeping Section 10: Understanding READ ONLY Violations Section 11: Approved Reports Appendix A: Example Configuration Appendix B: Opening a Physical Standby Read Only Appendix C: Example ADG Concurrent Manager Appendix D: Creating and Using Database Services Appendix E: ADG Reporting Tables
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
1 of 17
6/23/2011 12:53 PM
Active Data Guard Reporting for Oracle E-Business Suite Release 12.1 U...
https://support.oracle.com/CSP/main/article?cmd=show&type=NOT&doc...
Oracle Support Knowledge Document 1070033.1. This document details the required steps to allow Concurrent Manager Reports to be run on ADG.
Software Component
Minimum Version
Additional Patches
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 .
11.1.0.7 or higher
11.2.0.2 or higher
Note: Note that 9526837 is currently on 'Controlled' release and customers must file a Service Request (SR) with Oracle Support to request an appropriate password to download this patch. While working with Oracle Support to obtain the password, you should also send an email to ebs_adgrel_us@oracle.com with the SR number as a notification so that Development can monitor the SR.
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.
2 of 17
6/23/2011 12:53 PM
Active Data Guard Reporting for Oracle E-Business Suite Release 12.1 U...
https://support.oracle.com/CSP/main/article?cmd=show&type=NOT&doc...
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 of 17
6/23/2011 12:53 PM
Active Data Guard Reporting for Oracle E-Business Suite Release 12.1 U...
https://support.oracle.com/CSP/main/article?cmd=show&type=NOT&doc...
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;
Use constant from fnd_adg_utility: type Boolean C_CONNECT_STANDBY_TO_PRIMARY C_CONNECT_PRIMARY_TO_STANDBY C_CONNECT_TO_SIMULATED_STANDBY Database link name. Defaults to PUBLIC which is the only allowable value. Database link connect string. Resolves to a TNS alias. 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. Allowable values 1 to 5. Only valid when type is C_CONNECT_PRIMARY_TO_STANDBY.
create_db_link_if_undefined
Boolean
standby_number
number
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.
4 of 17
6/23/2011 12:53 PM
Active Data Guard Reporting for Oracle E-Business Suite Release 12.1 U...
https://support.oracle.com/CSP/main/article?cmd=show&type=NOT&doc...
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> and copy the contents to the respective tiers <TNS_ADMIN> directory.
Connection Type
C_CONNECT_STANDBY_TO_PRIMARY
Yes
No
C_CONNECT_PRIMARY_TO_STANDBY
Yes
Yes
An alias that connects to the primary database via a dedicated service. It cannot be the same alias as C_CONNECT_TO_SIMULATED_STANDBY <STANDBY_TO_PRIMARY>. See Section 5 for further details on Simulated Standby.
Yes
Yes
Option
Description
standby_number
number
Allowable values 1 to 5.
rule_class_app_id
number
rule_class_id
number
5 of 17
6/23/2011 12:53 PM
Active Data Guard Reporting for Oracle E-Business Suite Release 12.1 U...
https://support.oracle.com/CSP/main/article?cmd=show&type=NOT&doc...
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.
Option
Type
Description
Initial Value
always_collect_primary_data
Boolean
When a request completes successfully on primary, mark report as having run at least once on primary. This is the ONE option that is honoured even if ADG support has been disabled
TRUE
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 FALSE be redirected. Check for ADG instance read only errors. Automatically redirect if the report can be run on ADG. 0 - No debug 1 - Enable SQL TRACE. Currently unused Currently unused Currently unused Currently unused Currently unused TRUE FALSE 0
This API can only be called when ADG support has been disabled - see Section 4.1
6 of 17
6/23/2011 12:53 PM
Active Data Guard Reporting for Oracle E-Business Suite Release 12.1 U...
https://support.oracle.com/CSP/main/article?cmd=show&type=NOT&doc...
The process of using simulated standby is as follows: Register a Simulated Standby Connection Create a database service to identify a simulation connection. Set simulation options Enable database logon/off triggers - see Section 7. Use the simulated standby connect string for the concurrent program or use redirection. Run the concurrent program.
Option
Type
Description
Initial Value
enable_simulated_standby enable_auto_simulation
Boolean Boolean
Enables/disables simulation mode. To capture read-only violations, database triggers must also be enabled - see Section 7. If a report can be run in simulation mode, then this option will automatically direct to the simulation connection. To identify that a connection is for simulation, a dedicated database service needs to be created and then registered.
TRUE FALSE
simulated_standby_service
varchar2
A database service can be set at the init.ora level, via Grid infrastructure or using the DBMS_SERVICE package. See Appendix D for an example of creating and using a database service. During logoff processing, do not report violations unless above threshold.
NULL
simulation_error_threshold
Number
trace_directory_obj
varchar2
A directory object for the standard RDBMS trace directory. This directory object must provide READ access to the diagnostic trace NULL directory - i.e. the directory where SQL trace files are created.
This API can only be called when ADG support has been disabled - see Section 4.1
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.
7 of 17
6/23/2011 12:53 PM
Active Data Guard Reporting for Oracle E-Business Suite Release 12.1 U...
https://support.oracle.com/CSP/main/article?cmd=show&type=NOT&doc...
fnd_adg_utility.manage_concurrent_program Option application_id concurrent_program_id has_run_on_primary has_run_on_simulated_standby run_on_standby no_standby_failures max_standby_failures no_simulated_stdby_failures Type Number Number Boolean Boolean Boolean Number Number Number Application_id,Concurrent_Program_Id - primary key from FND_CONCURRENT_PROGRAM. Set to TRUE to mark as run on primary. Set to TRUE to mark as run as simulated standby. Set to TRUE to mark as runnable on standby. FALSE FALSE FALSE Description Default Value
Set the number of standby failures. This is set automatically so the main 0 use is to reset the value. Set the maximum of standby failures. Run_On_Standby is disabled when no_standby_failures > max_standby_failures Set the number of simulated standby failures. This is set automatically so the main use is to reset the value. Set the maximum number of simulated standby failures. Run_On_Standby is disabled when no_simulated_stdby_failures > max_simulated_stdby_failures. Program level option to always redirect valid reports to standby regardless of the state of the concurrent managers. 0 0
max_simulated_stdby_failures
Number
always_redirect_if_valid
Boolean Has no effect unless the control option "enable_redirect_if_valid" is TRUE. If the report can be run on standby, then automatically redirect to the first available ADG database, ignoring any primary instance/node affinity. Has no effect unless the control option "enable_automatic_redirection" is TRUE.
TRUE
use_automatic_redirection
Boolean
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; /
8 of 17
6/23/2011 12:53 PM
Active Data Guard Reporting for Oracle E-Business Suite Release 12.1 U...
https://support.oracle.com/CSP/main/article?cmd=show&type=NOT&doc...
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.
9 of 17
6/23/2011 12:53 PM
Active Data Guard Reporting for Oracle E-Business Suite Release 12.1 U...
https://support.oracle.com/CSP/main/article?cmd=show&type=NOT&doc...
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 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 set this state from the API - see Section 6. 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.
To reinstate ADG support after it has been removed: 1. 2. 3. 4. 5. Connect to SQLPLUS as the <APPS> user. execute fnd_adg_utility.switch_rpc_system_on; execute fnd_adg_utility.compile_rpc_dependents; execute fnd_adg_utility.enable_database_triggers; execute fnd_adg_utility.enable_adg_support;
Version
10 of 17
6/23/2011 12:53 PM
Active Data Guard Reporting for Oracle E-Business Suite Release 12.1 U...
https://support.oracle.com/CSP/main/article?cmd=show&type=NOT&doc...
alter session set events '3177 trace name context forever, level 1'
alter session set events '3177 trace name context forever, level 0'
11.2.0.2
Version
Session Level
Trace file
The violations count is recorded in the session level statistic, 'spare statistic 1'. e.g. to query the current sessions violations
select a.value 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 level statistic, 'read-only violation count'. 11.2.0.2+ e.g. to query the current sessions violations
select a.value from v$mystat a, v$statname b where a.statistic# = b.statistic# and b.name = 'read-only violation count';
Each entry is tagged with "*** READ-ONLY VIOLATION BY MODULE ..." Note that trace is only generated when the following underscore parameter is set:
_read_only_violation_dump_to_trace=true
In 11.2.0.2+ 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 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. 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.
11 of 17
6/23/2011 12:53 PM
Active Data Guard Reporting for Oracle E-Business Suite Release 12.1 U...
https://support.oracle.com/CSP/main/article?cmd=show&type=NOT&doc...
Project Accounting Table List Total Hours To BEE Total Table Entries Assignments Unavailable for Processing Deductions Report Employee Payroll Movements Report Employee Run Results Report GRE Totals Report NACHA Report Payment Register Report Third Party Payment Register Report Void Payments Report (US) Absences Report Assignment Status Report Duplicate Person Report Full Person Details Report Organization Hierarchy Report Terminations Report Incomplete invoices Report Disputed invoice report Journal Entries Report Unposted items report Tax Exempt Customer Report US Sales Tax Report Commitment Balance Report Cash Requirement Report Sales Journal by GL Account Report AR Reconciliation Report Account Analysis - (180 Char) Agreement Activity Report Audit History Report Cancelled Orders Reason Detail Report Cancelled Orders Report Comprehensive Order Detail Report Credit Check Processor Credit Order Detail Report Credit Order Discrepancy Report Credit Order Summary Report Defaulting Rules Listing Report Export Compliance Report to Government Export Compliance Screening Failure Report Internal Order and Purchasing Requisition Discrepancy Report Lines on Credit Check Hold Report Order Discount Detail Report
HXT957E HXT007A HXT957H PAYRPBLK PAYUSDED PAYRPEMV(PAY) PAYUSRRS PAYUSTOT PAYRPNAC PAYACPRE PAYRPTPP PAYRPVPRUS PERRPRAA PERRPRAS PERWSDUP PERRPFP1 PERRPROH PERRPRTM RAXIIR ARXDIR GLYRLGLG ARXGER ZXXSTTEC ZXXSTR RAXCBR APXCRRCR RAXGLR ARXRECON GLACTANL2 OEXOEASR OEXAUDHR OEXOEOCR OEXOEOCS OEXOECOD OEXAUCRC OEXOEORD OEXCRDIS OEXOEORS OEXDERUL OEXITMGV OEXITMSF OEXIODIS OEXOECCL OEXPRPRD
Time and Labor Time and Labor Time and Labor Payroll Payroll Payroll Payroll Payroll Payroll Payroll Payroll Payroll Human Resources Human Resources Human Resources Human Resources Human Resources Human Resources Receivables Receivables General Ledger Receivables E-Business Tax E-Business Tax Receivables Payables Receivables Receivables General Ledger Order Management Order Management Order Management Order Management Order Management Order Management Order Management Order Management Order Management Order Management Order Management Order Management Order Management Order Management Order Management
12 of 17
6/23/2011 12:53 PM
Active Data Guard Reporting for Oracle E-Business Suite Release 12.1 U...
https://support.oracle.com/CSP/main/article?cmd=show&type=NOT&doc...
Order Discount Summary Report Order/Invoice Detail Report Order/Invoice Summary Report Orders Summary Report Orders by Item Report Orders on Credit Check Hold Report Outstanding Holds Report Payment Receipt Processing Constraints Listing Report Returns by Reason Report Sales Order Acknowledgement Sales Order Workflow Status Report Sales Order and Purchase Order Discrepancy Report Salesperson Order Summary Report Transaction Types Listing Report Unbooked Orders Detail Report Unbooked Orders Report Workflow Assignments Report Discrete Job Pick List Report WIP Account Distribution Report Cycle count listing Discrete Job Shortage Report Discrete Job Value Report - Standard Costing Shipping Transaction Summary Report Subinventory quantities report Prepayments Status Report Overtaken Vacation and Holiday
OEXPRPRS OEXOEIOD OEXOEIOS OEXOEOSR OEXOEITR OEXOECCH OEXOHOHS OEXPMTRC OEXOEPCL OEXOEORR OEXOEACK OEXOEWFR OEXPODIS OEXOESOS OEXORDTP OEXOEUBD OEXOEUBK OEXWFASG WIPDJPCK WIPUTACD INVARCLI WIPDJORQ WIPRDJVR CSTRSTSR INVIRSIQ APXINPSR HXT015A
Order Management Order Management Order Management Order Management Order Management Order Management Order Management Order Management Order Management Order Management Order Management Order Management Order Management Order Management Order Management Order Management Order Management Order Management Work In Progress Work In Progress Inventory Work In Progress Work In Progress Bills of Material Inventory Payables Time and Labor
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
13 of 17
6/23/2011 12:53 PM
Active Data Guard Reporting for Oracle E-Business Suite Release 12.1 U...
https://support.oracle.com/CSP/main/article?cmd=show&type=NOT&doc...
execute fnd_adg_utility.clone_clean; 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.UK.ORACLE.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.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; / 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; /
14 of 17
6/23/2011 12:53 PM
Active Data Guard Reporting for Oracle E-Business Suite Release 12.1 U...
https://support.oracle.com/CSP/main/article?cmd=show&type=NOT&doc...
15 of 17
6/23/2011 12:53 PM
Active Data Guard Reporting for Oracle E-Business Suite Release 12.1 U...
https://support.oracle.com/CSP/main/article?cmd=show&type=NOT&doc...
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');
FND_ADG_CONCURRENT_PROGRAM
Number
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 accessing the trace file. 1234FND_ADG_PACKAGE FND_ADG_COMMIT_WAIT Boolean Number Internal support table. Internal support table.Currently unused. Invalid path Invalid file name and/or permissions Unknown open error. Read error.
FND_ADG_SIMULATED_STNDBY_TRC
Boolean
Change Log
16 of 17
6/23/2011 12:53 PM
Active Data Guard Reporting for Oracle E-Business Suite Release 12.1 U...
https://support.oracle.com/CSP/main/article?cmd=show&type=NOT&doc...
Jan, 2011
Nov, 2010
Aug, 2010
Mar, 2010
Initial creation.
My Oracle Support Knowledge Document 1070491.1 by Oracle E-Business Suite Development Copyright 2010, Oracle
Related Products Oracle E-Business Suite > Applications Technology > Technology Components > Oracle Applications Technology Stack Errors ORA-16000
Back to top Copyright (c) 2007, 2010, Oracle. All rights reserved. Legal Notices and Terms of Use | Privacy Statement
17 of 17
6/23/2011 12:53 PM