Tag Archives: alert.log

How to clear alerts in enterprise manager (database control)

When alert appear in enterprise manager and with some action solve, it may stay in enterprise manager as shown picture:
1
Here i’ll show you how to clear this unnecessary information.
login into database with sysman user and execute this script:

SELECT t.target_name,
       t.target_type,
       collection_timestamp,
       MESSAGE,
          'exec em_severity.delete_current_severity('''
       || t.target_guid
       || ''','''
       || metric_guid
       || ''','''
       || key_value
       || ''')'
          em_severity
  FROM    sysman.mgmt_targets t
       INNER JOIN
          sysman.mgmt_current_severity s
       ON t.target_guid = s.target_guid;

result:
2

after that run this scripts

SQL> exec em_severity.delete_current_severity('C894D538793FFA3B4727BCBCD84D4925','3F2BBE6BF105C0D16A3710F2868B8399','RECOVERY AREA');

PL/SQL procedure successfully completed.

SQL> commit;

Commit complete.

same way you can clear entire alerts.

Where is the location of alert log file in oracle 11g ?

We got questions about this, this is very easy to see location of this file.
Here is video of these procedures

SQL> select value from v$parameter where name='background_dump_dest';

VALUE
--------------------------------------------------------------------------------
/u0/app/oracle/diag/rdbms/orcl/orcl/trace

-bash-3.2$ cd /u0/app/oracle/diag/rdbms/orcl/orcl/trace
-bash-3.2$ ls
alert_orcl.log       orcl_j001_25686.trm  orcl_ora_20641.trc

or in SQL *PLUS

SQL> show parameter background_dump_dest

To find the location of the diagnostic_dest, can use the following select

SQL> select value from v$parameter where name='diagnostic_dest';

VALUE
--------------------------------------------------------------------------------
/u0/app/oracle

To know the current ORACLE_SID, you can use following select:

SQL> select instance_name from v$instance;

INSTANCE_NAME
----------------
ORCL

Alert log file consist alert_.log

Therefore my alert log file is : /u0/app/oracle/diag/rdbms/orcl/orcl/trace/alert_orcl.log

good luck.