Oracle
Enterprise Manager Oracle Trace User's Guide Release 1.4.0 A53696_01 |
|
This chapter describes how to work with Oracle Trace collections. In particular, the following topics are covered:
You create Oracle Trace collections using the Oracle Trace Collection Wizard. The Collection Wizard helps you define and schedule an Oracle Trace collection. To access the wizard, do one of the following:
The Collection Wizard prompts you only for the information it needs. This means that creating a collection is context-sensitive. If the node has already been established, you will skip to step 3.
If you are at the top of the tree list (the word Collection is highlighted) and you click the Create Collection toolbar button, the Introduction page of the Oracle Trace Collection Wizard displays, as shown in Figure 3-1.
The information you enter in the Collection Wizard pages defines the collection parameters. Each step in the wizard gathers information based on the input from the previous step. The Collection Wizard prompts you for information in the following order:
Click the Next button to start the definition of the collection.
In step 1, you select the server node (see Figure 3-2). If the server node can be determined by the context in which the Create Collection was activated, the Collection Wizard skips this page.
These are the server nodes that contain valid Oracle installations for running Oracle Trace collections. Select from this list to identify the node where the collection is to be run.
In step 2, you choose which Oracle installation you would like the collection to use (see Figure 3-3).
You see this page only if you have more than one $ORACLE_HOME installation that has Oracle Trace installed. Otherwise, you will not be prompted with this page. The discovery mechanism locates all $ORACLE_HOME installations on a node. Each $ORACLE_HOME installation represents a different version of the Oracle products.
Also, an Oracle installation contains a compatible set of instrumented products. Oracle Trace collections can run on multiple products; however, the products must all belong to one Oracle installation.
This list shows all available Oracle installations for the selected node.
This is a read-only list showing the products available for the currently selected installation. Only instrumented installed products are listed.
In step 3, you select the event sets you want to use (see Figure 3-4). An event set is a grouping of events.
This is a list of available products and databases that are instrumented for the selected node and Oracle installation. Event sets can be chosen from one or more products and databases to define the collection. Only one event set can be chosen per product or database.
This is a list of event sets for the particular product or database. You may select one event set per product or database, or no event sets if the product or database is not to be part of the collection. Select the event set value you want to use.
The Event Set Description describes the event set selected. [Old format] means no description is supplied in the product definition file (.fdf).
In step 4, Oracle Trace provides a default name of the collection definition file in which to store the results of the collection (see Figure 3-5). You can either accept the default or change the name.
If you do not accept the default name, specify a name of up to 16 characters for the collection. Special symbols are not allowed. Both the collection name and the collection definition file name must be unique on the node where you are collecting the data.
By default, the collection file has the same name as the collection with .cdf (collection definition file) appended. The complete file specification is $ORACLE_HOME/otrace/admin/cdf/name.cdf where name is what was in the Collection Name field; however, this name may be different on systems other than UNIX. The name can be up to 8 characters in length.
You also have the option of providing a description of this new collection.
At this point, you can click the Finish button. If you do, Oracle Trace accepts all the defaults for scheduling and formatting information. These will be displayed on the Summary page (see Figure 3-10).
In step 5, you have the opportunity both to define the maximum length (in megabytes) of the collection definition file (.cdf) and to provide scheduling information (see Figure 3-6).
If you specify a maximum file size, the collection will terminate once the file size is reached, even if other scheduling criteria have not been met. Oracle Corporation recommends that you set this parameter if you have a disk space limitation. The default is not to set the maximum file size.
Checking this box signifies you want the collection to run immediately. This is the default.
Use a whole number to define this parameter.
Use a whole number to define this parameter. The default is 30 minutes.
Click the Advanced... button to display the advanced scheduling options, as described in the next section. If you do not choose to run the collection immediately, you need supply the advanced scheduling options.
The Advanced Scheduling Options page allows you to schedule the execution of the collection (see Figure 3-7).
Select the frequency with which you want the collection executed. The choices are:
Schedules the collection as soon as you click the Submit button on the Summary page. The collection executes only one time.
Schedules the collection only one time at the date and time you choose.
Allows you to schedule a specific time interval between collection executions. The interval can be a combination of hours and minutes, or number of days. Select the value you want to change in the Time field and click on the scroll buttons. You can also type in a new value.
Allows you to schedule the collection on one or multiple days (Sunday, Monday, etc.) of the week. Click on the days of the week in the Date field to select the days on which you want the collection to occur.
Allows you to schedule the collection on one or multiple days (1-31) of the month. Click on the dates of the month in the Date field to select the dates on which you want the collection to occur.
Choose the first date and time that you want the collection executed. This is the starting time for any collection scheduled on an interval.
Select the month, day, or year in the Date field and click on the scroll buttons to change the value. You can also type in new values.
Select the hour, minute, or AM/PM in the Time field and click on the scroll buttons to change the value. You can also type in new values.
Choose the last date and time that you want the collection executed. This option does not apply if you chose the Immediately or Once execution options.
Select the month, day, or year in the Date field and click on the scroll buttons to change the value. You can also type in new values.
Select the hour, minute, or AM/PM in the Time field and click on the scroll buttons to change the value. You can also type in new values.
Select the time zone from the pull-down list. The choices are:
The agent schedules the collection execution based on the system time of the destination node. Collections are not necessarily run simultaneously.
The agent schedules the collection execution simultaneously on all destinations based on the system time of the console.
The agent schedules the collection execution simultaneously on all destinations based on Greenwich mean time (GMT).
In step 6, you have the option of automatically formatting your collection data to an Oracle database when the collection ends (see Figure 3-8).
Oracle Trace tables must be created before formatting; for details, see "Preparing Oracle Trace Formatted Data".
Choose Yes if you want to format your collection to a database when the collection is completed. This is the default.
Choose No if you do not want to format your collection to a database when the collection is completed.
If you chose Yes, provide the name of the database where you want your formatted data to reside.
You can also override preferred credentials. These credentials identify the username and password used to connect to the database and load the data into the tables. You can define your preferred credentials using Edit=>Preferences.
Oracle Trace determines the preferred credentials in the following order. The search continues until one of the criteria is met.
Click the Advanced button to display the advanced formatting options, as described in the next section.
In the Advanced Formatting Options dialog box, you have the opportunity to have Oracle Trace either format the entire collection results file or format only unformatted data. See Figure 3-9.
Choose this option if you want to format the entire collection results file.
If you have already formatted part of the data and then you format the entire results, you get duplicate records with a new collection ID value. If you do not ask for the entire file, you get only the records that were not already formatted.
Choose this option if you want to format only unformatted data. This is the default. By specifying this option, you can examine data as it is collected. You do not have to wait for the entire collection results to be formatted before you can look at the data.
You can define the commit interval into the database. The shorter the interval, the longer it takes the collection to format. Also, the larger the commit interval, the larger the rollback segment needs to be for the commit operation to succeed. The default is 2500 inserts before a commit is made.
The Oracle Trace Collection Wizard Summary page summarizes all the information you entered while using the Oracle Trace Collection Wizard (see Figure 3-10).
The summarized properties are:
If, while reviewing the Summary page, you find options you want to change, click the Back button to make the necessary changes.
Once you are satisfied with the information, click the Submit button to start the collection process.
Once you have created a collection, you can view the collection properties, but you cannot edit the collection. However, if you need to alter a collection, use the Collection=>Create Like... option by clicking the Create Like... button. Change the collection options needing to be updated, and start the new collection.
To view the collection properties, double-click the name of the collection in the tree. Oracle Trace displays the property pages of the collection: General, Output, Schedule, and Progress (see Figure 3-11).
The General page provides a minimal amount of information about collections. The information includes the location of the collection file, the duration of the collection, a description of the collection file, and the product and event set pairs that make up the collection. The fields on the General page are:
Length of time the collection will run
Collection description you provided
These fields describe data that was collected.
Click this button to go to the Collection=>Create Like... option.
The Output page displays the name of the data file and the format history. The fields on the Output page are:
Note:
If no maximum size is present, the size is unbounded. |
A record is created every time data is formatted. Displays the database destination of the formatted data.
The Schedule page shows the type of execution for the collection, the start date/time of the collection, the end date/time of the collection, the time zone used for the collection, and the duration of the collection. These were defined if you chose the advanced scheduling options when you created the collection. Refer to "Advanced Scheduling Options" for a detailed explanation of all these options.
The Progress page displays the status of the collection as it was running, including the notification time. The fields on the Progress Collection Status page are:
This option allows you to use existing collections as templates for new collections. This makes it easier for you to schedule collections by using a previous collection and changing only a few items, rather than specifying everything, every time.
In the collection tree list of the Oracle Trace main window, click the collection on which you want to base your new collection. Choose the Collection=>Create Like... option. This starts the Collection Wizard. Make the changes you need, following the steps previously outlined in this chapter.
Stopping a collection terminates the data collection. To stop a collection:
Stopped collections have a status of "Stopped" in the Oracle Trace main window.
Before you format data to an Oracle database, formatter tables must be created. Preferably, this is done just after installation by the person who installed Oracle Trace. If it was not done after installation, it can be done any time before formatting data for the first time. Create formatter tables using the vobsh command, as described in the Oracle Enterprise Manager Configuration Guide.
It is possible to maintain multiple sets of formatted data by creating formatter tables under more than one existing Oracle user account.
You can also format multiple collections into the same set of tables. You can format Oracle Trace data using either the Oracle Trace Manager or the command-line interface.
Oracle Trace collects the event data in a binary file for efficiency. This binary file can be automatically formatted to an Oracle database for SQL access and reporting. You can format that data one of two ways:
By formatting the collected data, you can perform queries against your Oracle Trace data, or use it with a reporting tool such as Oracle Reports. You can also import Orace Trace formatted data into Oracle Expert to be used as SQL workload.
The Oracle Enterprise Manager Oracle Trace Developer's Guide gives a complete description of the formatting steps using the command-line interface.
To format a collection using the Oracle Trace Manager, choose Collection=>Format from the Oracle Trace main window and provide the following information:
Provide the name of the database where you want your formatted data to reside.
You can also override preferred credentials. These credentials identify the default format option to be used.
Oracle Trace determines the preferred credentials in the following order. The search continues until one of the criteria is met.
Decide the commit interval you want and whether you want a partial format of the data; that is, to process data that has not previously been formatted.
To format data using the Oracle Trace Manager, do the following:
Database
Enter a connect string or service name for the database. If you enter nothing, Oracle Trace will use the default database.
Username
Enter the Oracle username under which the Oracle Trace formatter tables were created.
Password
Enter the password for the Username.
Commit Interval
Enter a number. The Commit Interval is the number of inserts made into the database before a commit is performed. A value is required in this field. The default is 2500.
Partial Format
Choose this option only if you want to process data that has not previously been formatted. This is useful when you want to format data for a collection while that collection is still in progress.
Click OK. When the collection is formatted, the status is listed in the Format column in the Collection Summary window.
Enter the following command at the system prompt to format your data file. Replace collection.cdf with the name of your collection definition file.
otrcfmt [-f] [-c#] collection.cdf [user/password@database]
The optional formatting parameters are defined as follows:
Formats the entire data file, regardless of whether or not portions of the file have been formatted at a previous time. This is useful if you have data that was previously formatted to another database and you want to format it to a new database.
If you omit the -f parameter from the command line, only data that has not previously been formatted is processed. This is useful when you want to format data for a collection while that collection is still in progress. You can later format only new data for the collection by omitting the -f parameter from the command line.
Specifies the commit interval (the number of inserts into the database performed before a commit is made). If you omit the -c parameter, a system default is used.
Specifies the username, password, and database. If you do not enter this information on the command line, you are prompted for it. Descriptions of these items are in the following list.
Username
Enter the Oracle username under which the Oracle Trace formatter tables were created, or enter the owner of a schema containing formatter tables.
Password
Enter the password for the username.
Database
Enter a service name for the database. Do not enter a system identifier (SID). If you enter nothing, Oracle Trace will use the default database.
Another way to examine the collection data, rather than formatting it, is to use the Oracle Trace report utility. The report utility reads the event data directly from the data collection (.dat) file and creates a text listing of the events. This approach is not recommended, however, for large collections. In that case, you should format the data.
Refer to the Oracle Enterprise Manager Oracle Trace Developer's Guide for detailed information about using the report utility.
To delete a collection entry from the Oracle Trace main window, select the entry and choose Collection=>Delete. When you take this action, the Delete Collection dialog box displays.
The default is to delete everything, all collection files and all formatted data. However, by clicking the Advanced button, you can choose which formatted data you want to delete.
If you do not delete the collection files and the formatted data, Oracle Trace Manager deletes only its record of the collection. You will not see the General, Output, Schedule, and Progress pages for this collection. This also leaves the collection files and formatted data for you to delete manually at a later time.
For information about deleting formatted data for a collection, see the Oracle Enterprise Manager Oracle Trace Developer's Guide.
Because formatted data takes up a lot of space in the database, you may want to regularly delete formatted data. Deletion of formatted data is performed using the Oracle Trace Manager as follows:
Note:
If data has been formatted a number of times to the same database, selecting one location will delete all formatted data relating to that collection in that selected database. |
The Delete Formatted Data function deletes rows of data for a specific collection from the formatted database tables. Although it deletes the contents of event tables, it leaves the event tables themselves intact. This is because re-creating them would be time-consuming for the formatter.
To delete the files associated with a collection, first select a collection name in the Oracle Trace main window. Then choose Collection=>Delete Collection Files.
This deletes the collection definition file (.cdf) and the data (.dat) file. It does not delete the collection entry from the Oracle Trace main window; Deleted Files displays in the Status column. You cannot delete format data once the collection files have been deleted.
|
Copyright © 1997 Oracle Corporation. All Rights Reserved. |
|