How do I clean out duplicate events and alarms?

Document ID : KB000028087
Last Modified Date : 14/02/2018
Show Technical Document Details

Issue:

I am receiving duplicate event errors and alarms, what should I do?

  • Some of the possible causes of duplicate events are listed below:
    1. Deleting or saving the job while it is running.
    2. When running Autosys under high availability (two event processors) if both event processors process events simultaneously.
    3. When running Autosys under dual sever mode (two event servers) if the databases are out of synch.
    4. Time difference in the Autosys primary and shadow event servers and/or the machine(s) where the job is run.

NOTE: When running Autosys under dual server mode (two event servers), the steps should be performed on both event servers individually or performed on one event server then this server synchronized with the second.  

 

Environment:

Autosys 3.x, 4.x

Platforms: Unix (any supported), Windows (any supported)

 

Databases: Oracle, Sybase, MS SQL

 

Resolution:

  1. Stop the event processor(s)
    • While logged in as the Autosys EXEC superuser issue the following command:

      sendevent - E STOP_DEMON


  2. Verify that the event processor(s) has / have been stopped.
    • Issue the following command:

      chk_auto_up

    • The results should indicate a successful connection to the event server(s) and that no event processor(s) are running.


  3. Using either sqlplus or zql, log into the Autosys event server as the autosys user.
    • Syntax
        sqlplus userid/password@connect string
        • Example:
            sqlplus autosys/autosys@autosysdb.ca.com
      • Syntax
          zql userid/password@connect string
          • Example:
              zql autosys/autosys@autosysdb.ca.com


          • Determine the current value in the last_Eoid_counter table
            • The last_Eoid_counter table stores the number of the last event, the last eoid, used by the event processor.
            • Syntax

              select * from last_Eoid_counter;
            • The value returned will be formatted as follows:

              counter
              -------
              zz0010a


          • Increase the value of the last_Eoid_counter table.
            • The value of the counter should be increased by a round number (like 1000) or if the value if alphanumeric it should be increased to the next letter.

            • Syntax

              update last_Eoid_counter set counter = '<counter value>';

              NOTE: The last_Eoid_counter is not stored in hex or in decimal. The numbering system uses both letters and numbers in the following order:

              0-9, and then the digit will roll over to 'a' and continue through 'z' before rolling back over to 0 and increment the next digit.


          • Check for the presence of duplicate events (eoid's that are in both event and event2 tables).
            • Syntax

              select count (*) from event where eoid in (select eoid from event2);


          • Delete any existing duplicate events.
            • Syntax

              delete from event2 where eoid in (select eoid from event);


          • Verify that the duplicate events have been removed.
            • Syntax

              select count (*) from event where eoid in (select eoid from event2);


          • Check for the presence of any remaining rows in the event2 table.
            • Syntax

              select count (*) from event2;


          • If present, remove any existing rows from the event2 table.
            • Syntax

              delete from event2;


          • Verify that there are no rows left in the event2 table.
            • Syntax

              select count (*) from event2;


          • Restart the event processor(s).
          • NOTE: You may see the duplicate event error at the restart of the event processor. If so, it is only temporary and normal processing will continue.