Oracle(R) Enterprise Manager Oracle(R) Trace User's Guide Release 2.0 A67837-01 |
|
Oracle Trace is a general-purpose data collection system that collects data for any software product enabled with Oracle Trace API calls, such as Oracle Server. Use Oracle Trace to collect a wide variety of data, such as performance statistics, diagnostic data, system resource usage, and business transaction details.
The components of Oracle Trace are:
This manual describes Oracle Trace Manager and Oracle Trace Data Viewer.
Software developers can use the Oracle Trace API to preconfigure, or instrument, their own products for Oracle Trace data collection or they can collect data for pre-instrumented products, such as Oracle Server. Users of a product containing the Oracle Trace API calls can then use the Oracle Trace Collection Services to collect data about specific events that occur in that product.
Refer to the Oracle Enterprise Manager Oracle Trace Developer's Guide for information about the Oracle Trace Collection Services and how to customize applications using the Oracle Trace API.
Oracle Trace provides a graphical Oracle Trace Manager application to create, schedule, and administer Oracle Trace collections for products containing Oracle Trace API calls.
The Oracle Trace Manager is a client-based Windows application that runs on the Oracle Enterprise Manager console. Oracle Trace Manager automatically discovers Oracle Trace instrumented products that are installed on all nodes that are known to the Oracle Management Server. By default Oracle Trace discovers any Oracle Server release 7.3.3 and higher.
Note: Oracle Corporation is currently using the Oracle Trace data collection API in Oracle Server release 7.3 or higher (for performance data collection). The Oracle Server performance data collected by Oracle Trace includes SQL statements, detailed statistics on SQL events, transaction events, and other useful information. Oracle Server events and data are described in Appendix B. |
The use and control of Oracle Trace revolves around the concept of a collection. A collection is how you gather data for events that occurred while a product containing Oracle Trace API calls was running.
With Oracle Trace Manager, you can schedule and manage collections. When creating a collection, you define the attributes of the collection, such as the collection name, the products and event sets to be included in the collection, and the start and end time. Oracle Trace Manager includes a Collection Wizard that facilitates the creation and execution of collections.
Once you schedule a collection, it can be executed immediately, scheduled to execute at a specific time, or executed at specified intervals. When a collection executes, it produces a file containing the event data for the products that participated in the collection. You can also use a collection as a template for creating other similar collections.
Note: Some instrumented applications also provide their own mechanism for starting and stopping Oracle Trace collections. For example, Oracle Server release 7.3 provides a set of database initialization parameters, described in Appendix A, that you can use to start and stop an Oracle Trace collection. In some situations, using an instrumented product's own controls may be useful. However, you should control most Oracle Trace collections using the Oracle Trace Manager application. |
An event is the occurrence of some activity within a product. Part of instrumenting a product with Oracle Trace API calls is deciding which activities to record as events. Oracle Trace only collects data for these predefined events.
There are two types of events:
Point events represent an instantaneous occurrence of something in the instrumented product. An example of a point event is an error occurrence.
Duration events have a beginning and ending. An example of a duration event is a transaction. Duration events can have other events occur within them; for example, the occurrence of an error within a transaction.
Items are specific pieces of information about an event. If your product has been modified to contain Oracle Trace API calls, the developer has identified specific events and data items. These items, such as a transaction type or dollar amount, are specific to the instrumented product. Data items can also include statistics on the resources used by that event, such as the CPU time and number of input/output operations (I/Os) performed by the event. For example, the Oracle Server release 7.3 and higher has defined 13 events to be collected by Oracle Trace. Three of these events are:
A complete list of the server events and data items is contained in Appendix B.
Oracle Trace events can be organized into event sets that restrict the data collection to specific events. You can establish event sets for performance monitoring, auditing, diagnostics, or any logical event grouping.
Each event set is described by its own product definition file (.fdf). The product definition file is a set of events and their associated data items. The complete set of events defined for an instrumented product is referred to as the ALL event set. Other event sets are then derived from the ALL set. For example, the Oracle Server includes an event set known as the EXPERT set. This set includes SQL event data used by the Oracle Expert tuning application, but excludes other events, such as wait events.
During a collection, Oracle Trace buffers event data in memory and periodically writes it to a collection binary file. This method ensures low overhead associated with the collection process. You can access the event data collected in the binary file by formatting the data to an Oracle Server database. This makes the data available for fast, flexible access.
Oracle Trace Manager provides a mechanism for formatting collection data immediately after a collection is run or at a later time.
Once the data is formatted, you can access the data using Oracle Trace Data Viewer or by using SQL reporting tools and scripts. Oracle Trace ships with a set of predefined SQL scripts for accessing the formatter tables created for the Oracle Server events. In addition, Oracle Trace data can be preconfigured for use in other applications, for example, for use by Oracle Expert. The Oracle Expert database tuning application can access and analyze the Oracle Server SQL event data from the Oracle Trace formatter tables.
Also, you can access event data by specifying a Detail report from the Oracle Trace reporting utility. This report provides a basic mechanism for viewing a collection's results. You have limited control over what data is reported and how it is presented.
Oracle Trace and its associated components run in a client/server environment. Figure 1-1 shows these components.
To collect data, the following components must be running on the client:
The Oracle Enterprise Manager repository can reside on the client, on the server, or on an entirely separate machine. Oracle Trace Manager tables reside within the Oracle Enterprise Manager repository. Also, Oracle Trace uses the Oracle Enterprise Manager Job system for scheduling and executing collections.
The Oracle Trace Manager gets information about managed nodes from the Oracle Management Server. Oracle Trace Manager then communicates information with the Oracle Intelligent Agent running on the managed node to start, stop, format, and delete Oracle Trace collections.
On the server, the following components are required:
Oracle Intelligent Agent is an Oracle Enterprise Manager component that ships with the Oracle Server. It contains scripts that control operations submitted by Oracle Trace Manager.
Oracle Trace Collection Services component collects the data and creates the collection definition (.cdf) files and the data collection (.dat) files.
You can store data collected by Oracle Trace Collection Services in Oracle database tables, referred to as Oracle Trace formatter tables, for access by SQL reporting tools and other products.
Note: Prior to Oracle Server release 8.0.3, Oracle Trace required that stored procedures be installed on the database. See "Stored Procedures" for additional information. |
This chapter has referred to several Oracle Trace components and other programs that must be configured or running in order for you to use Oracle Trace. This section provides a checklist of these required Oracle Enterprise Manager and Oracle Trace components.
Before you run Oracle Trace, check the following:
These tables are required by the Oracle Trace formatter mechanism, which converts and loads an Oracle Trace collection binary file (collection_name.dat) into Oracle tables for access.
Create these tables in the schema that you want to use for Oracle Trace formatting by using the vobsh command. For additional information about formatter tables, see "Format of Collection Failed".
The otrcsvr.sql script is run automatically during database installation on most platforms. However, if your server platform is NT, you must run this script manually. The Oracle Trace Collection Services control files exist in the $ORACLE_HOME directory on the target nodes.
These control files include: regid.dat, process.dat (process.dat has been renamed to facility.dat in Oracle8), and collect.dat. The files are located in $ORACLE_HOME/otrace/admin on UNIX systems and in $ORACLE_HOME\otracexx\admin on Windows NT systems.
If the control files are missing, run the otrccref.exe executable file, located in the $ORACLE_HOME/bin subdirectory.
On all other platforms, Oracle Trace Collection Services are linked into the application image when the image is built.