Skip Headers

Oracle® Enterprise Manager Advanced Configuration
10g Release 1 (10.1)

Part Number B12013-01
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Feedback

Go to previous page
Previous
Go to next page
Next
View PDF

6 Maintaining and Troubleshooting the Repository

This chapter describes maintenance and troubleshooting techniques for maintaining a well-performing Management Repository.

Specifically, this chapter contains the following sections:

6.1 Management Repository Deployment Guidelines

To be sure that your management data is secure, reliable, and always available, consider the following settings and configuration guidelines when you are deploying the Management Repository:

6.2 Management Repository Data Retention Policies

When the various components of Enterprise Manager are configured and running efficiently, the Oracle Management Service gathers large amounts of raw data from the Agents running on your managed hosts and loads that data into the Management Repository. This data is the raw information that is later aggregated, organized, and presented to you in Enterprise Manager Console.

After the Oracle Management Service loads information into the Repository; Enterprise Manager aggregates and purges the data over time.

The following sections describe:

6.2.1 Management Repository Default Aggregation and Purging Policies

Enterprise Manager aggregates your management data by hour and by day to minimize the size of the Management Repository. Before the data is aggregated, each data point is stored in a raw data table. Raw data is rolled up, or aggregated, into a one-hour aggregated metric table. One-hour records are then rolled up into a one-day table.

After Enterprise Manager aggregates the data, the data is then considered eligible for purging. A certain period of time has to pass for data to actually be purged. This period of time is called the retention time.

The raw data, with the highest insert volume, has the shortest default retention time, which is set to 7 days. As a result, 7 days after it is aggregated into a one-hour record, a raw data point is eligible for purging.

One-hour aggregate data records are purged 31 days after they are rolled up to the one-day data table. The highest level of aggregation, one day, is kept for 365 days.

The default data retention policies are summarized in Table 6-1.

Table 6-1 Default Repository Purging Policies

Aggregate Level Retention Time
Raw metric data 7 days
One-hour aggregated metric data 31 days
One-day aggregated metric data 365 days


Note:

When you delete a target, Enterprise Manager automatically deletes all historical metric data in the next repository purge interval.

If you have configured and enabled Application Performance Management, Enterprise Manager also gathers, saves, aggregates, and purges response time data. The response time data is purged using policies similar to those used for metric data. The Application Performance Management purging policies are shown in Table 6-2.

Table 6-2 Default Repository Purging Policies for Application Performance Management Data

Aggregate Level Retention Time
Raw response time data 24 hours
One-hour aggregated response time data 7 days
One-hour distribution response time data 24 hours
One-day aggregated response time data 31 days
One-day distribution aggregated response time data 31 days

6.2.2 Management Repository Default Aggregation and Purging Policies for Other Management Data

Besides the metric data and Application Performance Monitoring data, other types of Enterprise Manager data accumulates over time in the Management Repository. These other types of data, such as severities, availability records, and string metric history are retained indefinitely.

For example, the last availability record for a target will also remain in the repository indefinitely, so the last known state of a target is preserved.

6.2.3 Modifying the Default Aggregation and Purging Policies

The Enterprise Manager default aggregation and purging policies were designed to provide the most available data for analysis while still providing the best performance and disk-space requirements for the repository. As a result, you should not modify these policies to improve performance or increase your available disk space. Modifying these default policies can affect the performance of the repository and have adverse reactions on the scalability of your Enterprise Manager installation.

However, if you plan to extract or review the raw or aggregated data using data analysis tools other than Enterprise Manager, you may want to increase the amount of raw or aggregated data available in the repository. You can accomplish this by increasing the retention times for the raw or aggregated data.

To modify the default retention time for each level of management data in the repository, you must insert additional rows into the MGMT_PARAMETERS table in the repository database. Table 6-3 shows the parameters you must insert into the MGMT_PARAMETERS table to modify the retention time for each of the raw data and aggregate data tables.

Table names that contain "_RT_" indicate tables used for Application Performance Monitoring response time data. In the Table Name column, replace datatype with one of the three response time data types: DOMAIN, IP, or URL.

Table 6-3 Parameters for Modifying Default Data Retention Times in the Management Repository

Table Name Parameter in MGMT_PARAMETERS Table Default Retention Value
MGMT_METRICS_RAW mgmt_raw_keep_window 7 days
MGMT_METRICS_1HOUR mgmt_hour_keep_window 31 days
MGMT_METRICS_1DAY mgmt_day_keep_window 365 days
MGMT_RT_METRICS_RAW mgmt_rt_keep_window 24 hours
MGMT_RT_datatype_1HOUR mgmt_rt_hour_keep_window 7 days
MGMT_RT_datatype_1DAY mgmt_rt_day_keep_window 31 days
MGMT_RT_datatype_DIST_1HOUR mgmt_rt_dist_hour_keep_window 24 hours
MGMT_RT_datatype_DIST_1DAY mgmt_rt_dist_day_keep_window 31 days

For example, to change the default retention time for the table MGMT_METRICS_RAW from seven days to 14 days:

  1. Use SQL*Plus to connect to the repository database as the Management Repository user.

    The default Management Repository user is sysman.

  2. Enter the following SQL to insert the parameter and change the default value:

    INSERT INTO MGMT_PARAMETERS (PARAMETER_NAME, PARAMETER_VALUE)  VALUES ('mgmt_raw_keep_window','14');
    
    

Similarly, to change from the default retention time for all of the MGMT_RT_datatype_1DAY tables from 31 days to 100 days:

  1. Use SQL*Plus to connect to the repository database as the Management Repository user.

    The default Management Repository user is sysman.

  2. Enter the following SQL to insert the parameter and change the default value:

    INSERT INTO MGMT_PARAMETERS (PARAMETER_NAME, PARAMETER_VALUE)  VALUES ('mgmt_rt_day_keep_window', '100');
    

6.2.4 Modifying Data Retention Policies When Targets Are Deleted

By default, when you delete a target from the Grid Control, Enterprise Manager automatically deletes all target data, including raw metric data and aggregated data, from the Management Repository.

However, deleting raw and aggregated metric data for database and other data-rich targets is a resource consuming operation. Targets can have hundreds of thousands of rows of data and the act of deleting this data can degrade performance of Enterprise Manager for the duration of the deletion, especially when several targets are deleted at once.To avoid this resource-consuming operation, you can prevent Enterprise Manager from performing this task each time you delete a target. When you prevent Enterprise Manager from performing this task, the metric data for deleted targets is not purged as part of target deletion task; instead, it is purged as part of the regular purge mechanism, which is more efficient.

In addition, Oracle strongly recommends that you do not add new targets with the same name and type as the deleted targets within 24 hours of target deletion. Adding a new target with the same name and type will result in the Grid Control showing data belonging to the deleted target for the first 24 hours.

To disable raw metric data deletion:

  1. Use SQL*Plus to connect to the repository as the Management Repository user.

    The default repository user is SYSMAN. For example:

    SQL> connect sysman/oldpassword;
    
    
  2. To disable metric deletion, run the following SQL.

    SQL> EXEC MGMT_ADMIN.DISABLE_METRIC_DELETION();
    SQL> COMMIT;
    
    

To enable metric deletion at a later point, run the following SQL:

  1. Use SQL*Plus to connect to the repository as the Management Repository user.

    The default repository user is SYSMAN. For example:

    SQL> connect sysman/oldpassword;
    
    
  2. To disable metric deletion, run the following SQL.

    SQL> EXEC MGMT_ADMIN.ENABLE_METRIC_DELETION();
    SQL> COMMIT;
    

6.3 Requirement to Manually Analyze Specific Management Repository Tables

If the Management Repository is stored in an Oracle9i database and the Partitioning option is enabled, Oracle strongly recommends that you manually analyze three specific tables in the database on a regular basis:

This requirement does not apply to Oracle Database 10g. To determine if Partitioning is available in your Oracle9i database, connect to the database using SQL*Plus and enter the following query:

SQL> SELECT VALUE FROM V$OPTION WHERE PARAMETER='Partitioning';

If the query returns "TRUE," then partitioning is enabled in the database and you should use the following guidelines when deciding when to analyze these tables:

Before analyzing the tables, you must stop the Enterprise Manager rollup DBMS job. You can restart the rollup job after the table analysis has completed. If the rollup job is allowed to run during the analysis, the rollup job will cause the analysis to fail by invalidating all the SQL cursors used in the analysis.

Example 6-1 shows a SQL*Plus session that demonstrates how to stop and restart the rollup job and perform the analysis on the tables.

Example 6-1 Stopping the rollup DBMS Job and Manually Analyzing Selected Management Repository Tables with SQL-Plus

Connected to:
Oracle9i Enterprise Edition Release 9.2.0.4.0 - Production
With the Partitioning, Real Application Clusters, Oracle Label Security, OLAP
and Oracle Data Mining options
JServer Release 9.2.0.4.0 - Production

SQL> exec emd_maintenance.remove_em_dbms_jobs;

PL/SQL procedure successfully completed.

SQL> exec dbms_stats.gather_table_stats('SYSMAN','MGMT_METRICS_1DAY',NULL, 
DBMS_STATS.AUTO_SAMPLE_SIZE, FALSE,'FOR ALL 
COLUMNS',NULL,'GLOBAL',FALSE,NULL,NULL,NULL);

PL/SQL procedure successfully completed.

SQL> exec dbms_stats.gather_table_stats('SYSMAN','MGMT_METRICS_1HOUR',NULL, 
DBMS_STATS.AUTO_SAMPLE_SIZE, FALSE,'FOR ALL 
COLUMNS',NULL,'GLOBAL',FALSE,NULL,NULL,NULL);

PL/SQL procedure successfully completed.

SQL> exec dbms_stats.gather_table_stats('SYSMAN','MGMT_METRICS_RAW',NULL,
DBMS_STATS.AUTO_SAMPLE_SIZE, FALSE,'FOR ALL 
COLUMNS',NULL,'GLOBAL',FALSE,NULL,NULL,NULL);

PL/SQL procedure successfully completed.

SQL> exec emd_maintenance.submit_em_dbms_jobs

PL/SQL procedure successfully completed.

6.4 Changing the SYSMAN Password

The SYSMAN account is the default super user account used to set up and administer Enterprise Manager. It is also the database account that owns the objects stored in the Oracle Management Repository. From this account, you can set up additional administrator accounts and set up Enterprise Manager for use in your organization.

The SYSMAN account is created automatically in the Management Repository database during the Enterprise Manager installation. You also provide a password for the SYSMAN account during the installation.


See Also:

Oracle Enterprise Manager Basic Installation and Configuration for information about installing Enterprise Manager

If you later need to change the SYSMAN database account password, you can do so by using the following procedure:

  1. Shut down all the Oracle Management Service instances that are associated with the Management Repository.

  2. Change directory to the AGENT_HOME/bin directory for the Management Agent that monitors the Management Repository.

    To locate the Management Agent that monitors the Management Service, click the Management Systems tab in the Grid Control. and note the value of the Monitoring Agent field in the General section of the page.

    You can also determine the list of targets that are monitored by a particular Oracle Management Agent by navigating to the Oracle Management Agent home page in the Grid Control, or by using the emctl config agent listtargets command.

  3. Use the emctl config agent credentials command to specify the new password for the OMS and Repository target so the Oracle Management Agent can connect to the Repository.

  4. Change the password of the SYSMAN database account using the following SQL*Plus commands:

    SQL>connect sysman/oldpassword;
    SQL>alter user sysman identified by newpassword;
    
    
  5. For each Management Service associated with the Management Repository, locate the emoms.properties configuration file.

    The emoms.properties file can be found in the following directory of the Oracle Application Server Home where the Oracle Management Service is installed and deployed:

    IAS_HOME/sysman/config/
    
    
  6. Locate the following entries in the emoms.properties file:

    oracle.sysman.eml.mntr.emdRepPwd=ece067ffc15edc4f
    oracle.sysman.eml.mntr.emdRepPwdEncrypted=TRUE
    
    
  7. Enter your new password in the first entry and enter FALSE in the second entry.

    For example:

    oracle.sysman.eml.mntr.emdRepPwd=new_password
    oracle.sysman.eml.mntr.emdRepPwdEncrypted=FALSE
    
    
  8. Save and exit the emoms.properties file and restart each Management Service associated with the Management Repository.

  9. After the Oracle Management Service has started, check the contents of the emoms.properties file to be sure the password you entered has been encrypted.

    For example, the entries should appear as follows:

    oracle.sysman.eml.mntr.emdRepPwd=ece067ffc15edc4f
    oracle.sysman.eml.mntr.emdRepPwdEncrypted=TRUE
    

6.5 Dropping and Recreating the Management Repository

This section provides information about dropping the repository from your existing database and recreating the management repository after you install Enterprise Manager.

6.5.1 Dropping the Management Repository

To recreate the Management Repository, you first remove the Enterprise Manager schema from your repository database. You accomplish this task using the -action drop argument to the RepManager script, which is described in the following procedure.

To remove the Management Repository from your database:

  1. Locate the RepManager script in the following directory of the Oracle Application Server Home where you have installed and deployed the Oracle Management Service:

    IAS_HOME/sysman/admin/emdrep/bin
    
    
  2. At the command prompt, enter the following command:

    $PROMPT> RepManager repository_host repository_port repository_SID 
    -sys_password password_for_sys_account -action drop
    
    

    In this syntax example:

    • repository_host is the machine name where the repository database is located

    • repository_port is the repository database listener port address, usually 1521 or 1526

    • repository_SID is the repository database system identifier

    • password_for_sys_account is the password of the SYS user for the database. For example, change_on_install.

    • -action drop indicates that you want to drop the repository.

Alternatively, you can use a connect descriptor to identify the database on the RepManager command line. The connect descriptor identifies the host, port, and name of the database using a standard Oracle database syntax.

For example, you can use the connect descriptor as follows to create the Management Repository:

$PROMPT> ./RepManager -connect (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)
(HOST=host1)(PORT=1521)) (CONNECT_DATE=(SERVICE_NAME=servicename)))
-sys_password efkl34lmn -action drop

See Also:

"Establishing a Connection and Testing the Network" in the Oracle Net Services Administrator's Guide for more information about connecting to a database using connect descriptors

6.5.2 Recreating the Management Repository

The preferred method for creating the Management Repository is to create the repository during the Enterprise Manager installation procedure, which is performed using Oracle Universal Installer.


See Also:

Oracle Enterprise Manager Basic Installation and Configuration for information about installing Enterprise Manager

However, if you need to recreate the repository in an existing database, you can use the RepManager script, which is installed when you install the Oracle Management Service. Refer to the following sections for more information:

6.5.2.1 Using the RepManager Script to Create the Management Repository

To create a repository in an existing database:

  1. Review the hardware and software requirements for the Management Repository as described in Oracle Enterprise Manager Basic Installation and Configuration. and review the section "Management Repository Deployment Guidelines".

  2. Locate the RepManager script in the following directory of the Oracle Management Service home directory:

    ORACLE_HOME/sysman/admin/emdrep/bin
    
    
  3. At the command prompt, enter the following command:

    $PROMPT> ./RepManager repository_host repository_port repository_SID  -sys_password password_for_sys_account -action create
    
    

In this syntax example:

  • repository_host is the machine name where the repository database is located

  • repository_port is the repository database listener port address, usually 1521 or 1526

  • repository_SID is the repository database system identifier

  • password_for_sys_account is the password of the SYS user for the database. For example, change_on_install.

Enterprise Manager creates the repository in the database you specified in the command line.

6.5.2.2 Using a Connect Descriptor to Identify the Management Repository Database

Alternatively, you can use a connect descriptor to identify the database on the RepManager command line. The connect descriptor identifies the host, port, and name of the database using a standard Oracle database syntax.

For example, you can use the connect descriptor as follows to create the Management Repository:

$PROMPT> ./RepManager -connect (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP) (HOST=host1)(PORT=1521)) (CONNECT_DATA=(SERVICE_NAME=servicename))) -sys_password efkl34lmn -action create

See Also:

"Establishing a Connection and Testing the Network" in the Oracle Net Services Administrator's Guide for more information about connecting to a database using a connect descriptor

The ability to use a connect string allows you to provide an address list as part of the connection string. The following example shows how you can provide an address list consisting of two listeners as part of the RepManager command line. If a listener on one host becomes unavailable, the second listener can still accept incoming requests:

$PROMPT> ./RepManager -connect (DESCRIPTION=
(ADDRESS_LIST=
(ADDRESS=(PROTOCOL=TCP)(HOST=host1)(PORT=1521)
(ADDRESS=(PROTOCOL=TCP)(HOST=host2)(PORT=1521)
(CONNECT_DATE=(SERVICE_NAME=servicename)))
-sys_password efkl34lmn -action create

6.6 Troubleshooting Management Repository Creation Errors

Oracle Universal Installer creates the Management Repository using a configuration step at the end of the installation process. If the repository configuration tool fails, note the exact error messages displayed in the configuration tools window, wait until the other configuration tools have finished, exit from Universal Installer, and then use the following sections to troubleshoot the problem.

6.6.1 "Package Body Does Not Exist" Error While Creating the Repository

If the creation of your Management Repository is interrupted, you may receive the following when you attempt to create or drop the Management Repository at a later time:

SQL> ERROR:
ORA-00604: error occurred at recursive SQL level 1
ORA-04068: existing state of packages has been discarded
ORA-04067: not executed, package body "SYSMAN.MGMT_USER" does not exist
ORA-06508: PL/SQL: could not find program unit being called
ORA-06512: at "SYSMAN.SETEMUSERCONTEXT", line 5
ORA-06512: at "SYSMAN.CLEAR_EMCONTEXT_ON_LOGOFF", line 4
ORA-06512: at line 4

To fix this problem, see "General Troubleshooting Techniques for Creating the Repository".

6.6.2 "Server Connection Hung" Error While Creating the Repository

If you receive an error such as the following when you try to connect to the repository database, you are likely using an unsupported version of the Oracle Database:

Server Connection Hung

To remedy the problem, upgrade your database to the supported version as described in Oracle Enterprise Manager Basic Installation and Configuration.

6.6.3 General Troubleshooting Techniques for Creating the Repository

If you encounter an error while creating the Management Repository, drop the repository by running the -drop argument to the RepManager script.

If the RepManager script drops the repository successfully, try creating the repository again.

If you encounter errors while dropping the repository, do the following:

  1. Connect to the database as SYSDBA using SQL*Plus.

  2. Check to see if the SYSMAN database user exists in the repository database.

    For example, use the following command to see if the SYSMAN user exists:

    prompt> SELECT username FROM DBA_USERS WHERE username='SYSMAN';
    
    
  3. If the SYSMAN user exists, drop the user by entering the following SQL*Plus command:

    prompt> DROP USER SYSMAN CASCADE;
    
    
  4. Check to see if the following triggers exist:

    SYSMAN.EMD_USER_LOGOFF
    SYSMAN.EMD_USER_LOGON
    
    

    For example, use the following command to see if the EMD_USER_LOGOFF trigger exists in the database:

    prompt> SELECT trigger_name FROM ALL_TRIGGERS 
            WHERE trigger_name='EMD_USER_LOGOFF';
    
    
  5. If the triggers exist, drop them from the database using the following commands:

    prompt> DROP TRIGGER SYSMAN.EMD_USER_LOGOFF;
    prompt> DROP TRIGGER SYSMAN.EMD_USER_LOGON;