Translating Applications Troubleshooting Globalization Issues

Implementing Globalization and Bidirectional Support 23-17 Convert the Tk2Motif.rgb file to Shift-JIS encoding, or remove the last seven entries from this file. Otherwise, Oracle Reports may fail. Note: The Tk2Motif.rgb file for the Japanese environment is: ORACLE_ INSTANCEconfigFRComponentfrcommonguicommontkad minJA. 23-18 Publishing Reports to the Web with Oracle Reports Services Part VI Part VI Performance Part VI provides information on diagnosing issues and tuning your Oracle Reports Services environment: ■ Chapter 24, Diagnosing and Tuning Oracle Reports 24 Diagnosing and Tuning Oracle Reports 24-1 24 Diagnosing and Tuning Oracle Reports As your reporting requests grow in size and complexity and your user base increases, you must consider streamlining your reports performance or your reports execution time as much as possible. This maximizes its reach and minimizes its delivery time. Consider the following essentials before you tune the performance of your reports: ■ Performance and the trade-offs that occur when improving both perceived and measurable performance. ■ Costs involved. ■ Computing environments complexity. Investigating some of these areas can result in significant performance improvements. Some may result in minor performance improvements and others may have no affect on the actual report performance but can improve the perceived performance. Perceived performance refers to events that contribute to the end result measured in terms of the final output. See Section 24.7.1, Fetching Ahead for an example of perceived performance. This chapter provides a number of guidelines and suggestions for good performance practices in building, implementing, and tuning individual reports. The suggestions given are general in nature and not all suggestions might apply to all cases. However, implementing some or all of the points in a given application environment should improve the performance of report execution real and perceived. This chapter will help you look at your report in the broader context of: ■ The application requirements ■ The correctness of the underlying data model ■ The environment where this report will run for example, clientserver, the Web, or inside firewalls ■ The degree of user interaction required After identifying the context of your report, you can gear the tuning process towards optimizing and minimizing: ■ The calls to the data source Note: This chapter does not address Oracle Reports deployment or scalability issues. Refer to the Oracle Reports Services Scalability white paper on OTN http:www.oracle.comtechnologyproductsreports index.html for more information. 24-2 Publishing Reports to the Web with Oracle Reports Services ■ The amount of unnecessary formatting required for the layout To achieve these objectives, you should focus your tuning on the following distinct aspects of your report: ■ Execution time . Determine where your report is spending a majority of its execution time. Once you have accomplished this, use one of several performance tools available: to evaluate the query, review database optimization, and examine for efficiency specific pieces of code used by the report. ■ Formatting and layout . Examine the formatting and layout of the report information. ■ Runtime parameters . Set runtime parameters to maximize performance and distribution of reports. See Section 24.7.2, Bursting and Distribution for information on how distribution maximizes your reports performance. This chapter addresses these aspects in the following sections: ■ What’s New In This Release? ■ Logging Enhancements ■ Performance Analysis Tools ■ Tuning Reports Server Configuration ■ Accessing the Data ■ Formatting the Data ■ General Layout Guidelines ■ Running the Report 24.1 What’s New In This Release? Oracle Reports 11g Release 1 11.1.1 provides improved diagnosability through proactive alerts and notifications, and logging and tracing enhancements, as outlined in Table 24–1 a subset of Table 1–1, 11g Functionality vs. 10g Functionality : Table 24–1 11g Diagnosability Features vs. 10g Functionality 11g New Features Equivalent 10g Functionality Log files in ODL format. All Oracle Reports log files follow Oracle Diagnostic Logging ODL format, the standard across Oracle Fusion Middleware, for log format, message types, and log management directives. The log file entries are in Text format default or XML format. Searching of log files from Oracle Enterprise Manager is easy and effective. Not Applicable NA More comprehensive choices for tracing: ■ Multiple tracing levels for fine-grained control. ■ New tracing options: NOTIFICATION, WARNING, ERROR standardized across Oracle Fusion Middleware components. ■ Better naming convention, mechanism to control file size. NA Enhanced trace viewer and search. New tracing options, levels, log file sizes, and so on can all be specified, viewed, and searched using Oracle Enterprise Manager. Tracing options specified in configuration files or on command line. Diagnosing and Tuning Oracle Reports 24-3

24.2 Logging Enhancements

Oracle Reports 11g Release 1 11.1.1 provides Logging enhancements in the following areas: ■ Security ■ Job Administration ■ Upgrade ■ High Availability ■ Fonts Table 24–2 provides a list of enhanced log messages: Extensive diagnostic enhancements. Improved actionable errors with cause and action, job search using ECID, critical errors logged even when tracing is off, better health check mechanisms, and hyperlinks to contextual help and error message registry. NA Table 24–2 Example enhanced logging messages. Enhancement Sample Output Security Start SecurityHelper:start JAZNSecurity RWJAZNSecurity:jobCommandCheck Authorization check started ReportsActionHandle r ReportsActionHandler:run Checking job command permission JAZNSecurity JAZNSecurity:jobCommandCheck Authorization check passed for job 1 JAZNSecurity RWJAZNSecurity:authenticate Authenticated User weblogic successfully Job Administration ConnectionImpl ConnectionImpl:runJob Calling findDuplicatedJob for jobid = 1 JobManager JobManager:findDuplicatedJob Found no duplicated job for job 1 ConnectionImpl ConnectionImpl:runJob No Duplicate jobs for jobid=1 Upgrade Upgrade Framework reports app is deployed to managed server WLS_ REPORTS Upgrade Framework ReportsServerComponent component is configured in destination instance Upgrade.Reports Creating reports specific upgrade items Upgrade.Reports Creating reports specific upgrade items complete. High Availability Table 24–1 Cont. 11g Diagnosability Features vs. 10g Functionality 11g New Features Equivalent 10g Functionality 24-4 Publishing Reports to the Web with Oracle Reports Services

24.2.1 Diagnosing Engine Crashes

This section discusses recommended settings in logging configuration to diagnose engine crashes. Sometimes it is difficult to diagnose an engine crash as you do not find all log messages in the log file, especially when the log messages are generated just prior to an engine crash. Due to performance reasons, the logging framework buffers the logs in memory and then flushes the logs periodically to log files. If an engine crashes suddenly, the logging framework may not get a chance to flush the logs from buffer to the file before the engine process exits. As a result, the logging information which had to be logged before an engine crash may not be available in the log file. To diagnose an engine crash and to see all the log entries, perform the following steps: For rwserver ■ Navigate to the Reports Server logging.xml file located at: ORACLE_INSTANCEconfigReportsServerComponentserver namelogging.xml For Standalone Servers DOMAIN_HOMEconfigfmwconfigserversWLS_REPORTSlogging.xml For In-process Servers ■ Set the value of autoFlushLevel for engine log handler to TRACE:32. For example, log_handler name=rwengine_trace_handler .... property name=autoFlushLevel value=TRACE:32 ... For rwrun ■ Navigate to the logging.xml file located at ORACLE_ INSTANCEconfigReportsToolsComponentReportsToolslogging.xm l ■ Set the value of autoFlushLevel for engine log handler to TRACE : 32. For example, log_handler name=runtime_trace_handler ... property name=autoFlushLevel value=TRACE:32 ... By default, NOTIFICATION :1 messages are flushed immediately. If you set the value of the autoFlushLevel parameter to TRACE : 32 for any message, the log messages are flushed to the file immediately. As continuous flushing affects performance, it is recommended that you set the autoFlushLevel for diagnostic purposes only. JOC Caching ReportsCacheHandler: putFile File fileName pushed to JOC Font For more information on font related log enhancements, see Section 12.2.3, Font Diagnosis and Tracing Table 24–2 Cont. Example enhanced logging messages. Enhancement Sample Output Diagnosing and Tuning Oracle Reports 24-5

24.3 Performance Analysis Tools

The first step towards tuning your report is determining where your report spends most of its execution time. Does it spend a large portion of the time retrieving the data, formatting the retrieved data, or waiting for runtime resourcesdistribution? Even if your report has the most streamlined and tuned layout possible, it may be of little consequence if most of the time is spent in retrieving data, due to inefficient SQL. This section discusses the tools you can use to monitor the performance of your report: ■ Oracle Enterprise Manager ■ Log Files ■ About WLST ■ Logging-Related WLST Commands ■ Metrics Related WLST Commands ■ Audit Configuration WLST Commands ■ Tracing Report Execution ■ RW_SERVER_JOB_QUEUE Table ■ SHOWJOBS Command Line Keyword ■ Efficient SQL ■ PLSQL ■ Java Stored Procedures ■ The Java Importer

24.3.1 Oracle Enterprise Manager

Using Oracle Enterprise Manager to manage and monitor your Reports Server is discussed in Chapter 7, Administering Oracle Reports Services Using Oracle Enterprise Manager .

24.3.2 Log Files

All Oracle Reports log files follow Oracle Diagnostic Logging ODL format, the standard across Oracle Fusion Middleware, for log format, message types, and log management directives. The log file entries are in Text format default or XML format. For detailed information, refer to Oracle Fusion Middleware Administrators Guide Default Location of Log Files See Table 24–3 for default location of log files. 24-6 Publishing Reports to the Web with Oracle Reports Services Table 24–3 Default Location of Log Files Component Location, file Name Reports standalone server Server log file : ORACLE_ INSTANCEdiagnosticslogsReportsServerComponent server namerwserver_diagnostic.log Engine log files : ORACLE_ INSTANCEdiagnosticslogsReportsServerComponent server namerwEng-num_diagnostic.log Communication log files : ORACLE_ INSTANCEdiagnosticslogsReportsServerComponent server namezrclient_diagnostic.log Reports In-process server and Servlet log files In-process server : DOMAIN_HOMEserversWLS_ REPORTSlogsreportsrwserver_diagnostic.log In-process server engines: DOMAIN_HOMEserversWLS_ REPORTSlogsreportsrwEng-num_diagnostic.log Servlet: DOMAIN_HOMEserversWLS_ REPORTSlogsreportsrwservlet_diagnostic.log Reports Tools log files Reports Builder, Reports Runtime, Reports Client Runtime : ORACLE_ INSTANCEdiagnosticslogsReportsToolsComponentR eportsToolsruntime_diagnostic.log Communication log files : ORACLE_ INSTANCEdiagnosticslogsReportsToolsComponentR eportsToolszrclient_diagnostic.log Reports Bridge log files ORACLE_ INSTANCEdiagnosticslogsReportsBridgeComponent bridge namediagnostic.log Tip: If you are running multiple instances of Reports Tools Components like rwrun, rwbuilder, rwclient, you must add the property name keepOpen with the value false to the log handler element in the logging.xml file which is present at the following location: ORACLE_ INSTANCEconfigReportsToolsComponentReportsToolsl ogging.xml This enables the opening and closing of the log files every time a log entry is written. Diagnosing and Tuning Oracle Reports 24-7 The Oracle Reports log files contain the attributes listed in Table 24–5 : Table 24–4 11g ODL Message Types vs 10.1.2 Trace Options ODL Message Types: Levels 11g Equivalent Trace Options 10g Release 2 10.1.2 Notes INCIDENT_ERROR: 1 TRACE_EXC Exceptions unexpected internal errors ERROR: 1 TRACE_ERR lower trace levels Errors WARNING: 1 TRACE_WRN lower trace levels Warnings NOTIFICATION: 1 TRACE_LOG lower trace levels Default level Important events for server engine NOTIFICATION: 16 TRACE_STA TRACE_INFO lower trace levels Server engine state info Configuration change notifications Successful failed jobs TRACE: 1 TRACE_PRF lower trace levels Profiling information TRACE: 8 TRACE_DST lower trace levels Functional areas tracing distribution font handling printing etc TRACE: 16 TRACE_DBG lower trace levels Server - debug traces Engine - engine diagnostics TRACE: 32 TRACE_ALL equivalent to { TRACE_APP + TRACE_BRK+ TRACE_PLS + TRACE_SQL + TRACE_TMS + lower trace levels } All trace messages Table 24–5 Log File Attributes Attribute Description Time stamp Date and time when the message was generated. Component ID Reports messages have component ID of REP. Message Type The messages are categorized into the following 5 types: Error, Incident Error, Warning, Notification, Trace. see below for more details. Message Level Each message is qualified by an integer value from 1 to 32 indicating the level. Message Text The message body. Message ID A unique numeric ID used in conjunction with the component ID e.g., REP 50127. These IDs will be well documented and have proper Cause and Action associated with them. Execution Context ID A globally unique sequence number of the thread of execution in which the originating component participates. This is used to correlate messages from several components involved in the same thread of execution. This ID is included with all messages sent to other components. Oracle Reports generates this in case it is not passed from the originating component. Module ID The particular module that originated the messages. This can be any functional module in Oracle Reports e.g., server, engine, builder. Process ID The operating system PID that is provided to identify the process that generated the message. Thread ID Identifier of the thread of execution that generated the message. 24-8 Publishing Reports to the Web with Oracle Reports Services The Oracle Reports logging mechanism supports the 5 pre-defined ODL message types described in Table 24–6 :

24.3.2.1 Viewing Log Files

You can view log files in any of the following ways: ■ Using Oracle Enterprise Manager recommended ■ Using WLST Commands ■ Using the Command Line Using Oracle Enterprise Manager See Section 7.11.1, Viewing and Searching Log Files in Chapter 7, Administering Oracle Reports Services Using Oracle Enterprise Manager . Using WLST Commands See Section 24.3.4, Logging-Related WLST Commands . Using the Command Line From the command line, navigate to the following directories to open and view the log files: ■ For Reports Server: ORACLE_INSTANCEdiagnosticslogsReportsServerComponentservername ■ For Oracle Reports Bridge: ORACLE_INSTANCEdiagnosticslogsReportsBridgeComponentbridgename Table 24–6 ODL Message Types Message Type Description Incident Error Occurs when the program experiences an error for some internal or unexpected reason and the issue must be reported to Oracle Support. Error Occurs when there is any known problem that requires attention from System Administrator. Warning Occurs if an action occurs or a condition is discovered that should be reviewed and may require some action else may lead to an error. Notification Occurs when reporting a normal action or event, such as successful login. Trace Refers to all the debug statements. Note: By default, you cannot open the log file in Microsoft Internet Explorer if the log file is in XML format. To open an XML file in Microsoft Internet Explorer, you must create a wrapper file with the top level element and include the log files in it as follows: . ?xml version=1.0? DOCTYPE LOG [ ENTITY log0 SYSTEM log.xml ] LOG log0; LOG .