Event and EventArchive table

Ronnie Abrahiem shared this question 7 years ago
Answered

Replies (4)

photo
1

Hello Ronnie,


It would appear your description got lost upon posting. I'd be happy to address any questions you have about Events and the EventArchive table, however. Simply add them to your reply and I'll do my best to provide meaningful insights.


Thanks,

Ryan

photo
1

Event and EventArchive table

1. In Configuration table I insert the following job:

insert into Configuration VALUES (1, ‘SYSTEM’, ‘EVENTMAXDAYS’, 30)

insert into Configuration VALUES (1, ‘SYSTEM’, ‘EVENTARCHIVEMAXDAYS’, 60)

2. In Taskschedule table has one record for ‘EventArchiveTask’  setup as ‘DAILY’ 1, SYSTEMTASK,EventArchiveTask,0,1,AMERICA/NEW_YORK,DAILY,0,20170420040030,20-APR-17,14430,SUCCESS,0

My question; why in Event table I have records for April 2017 and I don’t have any April’s records in EVENTARCHIVE table.

The Event table currently has records only between 20 APR, 2017 and 20 MAR, 2017. This table looks okay because set up for > 30 day.

The Eventarchive table currently has records only between 01 Jan, 2017 and 20 MAR, 2017.  This table it seems missing records and not archived.

What I understand that “There are 2 jobs that are important to this upkeep and maintenance of the Event and EventArchive tables, one of them moves records from the Event table to the EventArchive table when they become older than a certain number of days, and the other one deletes records from the EventArchive table when they become older than a certain number of days. The way to create these 2 jobs and configure the number of days is by running the following 2 queries, keeping in mind that the last value of each INSERT query represents the number of days.”

Best Regards,

Ronnie Abrahiem

Sr. Programmer Analyst - Yellowfin Administrator

North American Information Technology Services

DENSO International America, Inc.

ronnie_abrahiem@DENSO-diam.com

Tie: 5000-3460

Office: 248.750.3460

Fax: 248.213.2469

/icons/expand.gif

photo
1

Hi Ronnie,


Thanks for reaching out with your question. Your Event table contains records for April 2017, as none of these tasks have surpassed the 30 day time frame to be moved into your EventArchive table. These will remain in the Event table until after 30 days has passed since the job has completed. You shouldn't see any records newer than 20 MAR, 2017 in the EventArchive table until they are moved from your Event table. Can you verify that you have no records from 21 MAR, 2017 - 22 MAR, 2017?


Please provide the results of the following queries:


  1. SELECT EventDate FROM Event;

  1. SELECT EventDate FROM EventArchive;

Please include the results in a file of your preference, i.e. txt, csv, etc.


Thanks,

Ryan

photo
1

Hello Ryan,

Thank you for your support.

1. SELECT EventDate FROM Event; The table start with 26-MAR-17

2. SELECT EventDate FROM EventArchive; The table start with 20-MAR-17 but when I ran

Select * from EVENTARCHIVE where EVENTDATE between '21-MAR-17' and '21-MAR-17'; the table start with

21-MAR-17.

Is that means the "EventArchiveTask" in Taskschedule table run every day and remove the records from Event table to Eventarchive table then delete the records from Event table.

Thanks

Ronnie A.

photo
1

Hi Ronnie,


You are correct, the "EventArchiveTask" should run daily to add the records to EventArchive and then delete the original entries in the Event table. If the table included 21-MAR-17, I'd venture to say that the task is properly moving the records over. You can verify that 25-MAR-17 exists in your EventArchive table to be sure. The date your Event table starts with is exactly 30 days ago, so that part seems to be working great!


Double-check your EventArchive table for anything dated 25-MAR-17 and you'll know that the records are being moved properly.


Thanks,

Ryan

photo
1

Hello Ryan,


Yes, there are no records for 25-MAR-17.

Thank you again for your help and please you can close the ticket.

photo
1

Ryan,

Sorry one more question,

The "EventArchiveTask" in Taskschedule table also will delete the records from Eventarchive table after 60 days has passed.

Thanks

photo
1

Hi Ronnie,


You are correct. With the settings you've provided, the records will be deleted after their date reaches 60 days. I'm happy I was able to offer some insight here. If you have any further questions or issues, don't hesitate to let us know!


Thanks,

Ryan

photo
1

Thank you.

Have a nice day.

photo
1

Thanks Ronnie,


Don't hesitate to let us know if you have further questions or issues.


- Ryan

photo
photo
1

Event and EventArchive table

1. In Configuration table I insert the following job:

insert into Configuration VALUES (1, ‘SYSTEM’, ‘EVENTMAXDAYS’, 30)

insert into Configuration VALUES (1, ‘SYSTEM’, ‘EVENTARCHIVEMAXDAYS’, 60)

2. In Taskschedule table has one record for ‘EventArchiveTask’  setup as ‘DAILY’ 1, SYSTEMTASK,EventArchiveTask,0,1,AMERICA/NEW_YORK,DAILY,0,20170420040030,20-APR-17,14430,SUCCESS,0

My question; why in Event table I have records for April 2017 and I don’t have any April’s records in EVENTARCHIVE table.

The Event table currently has records only between 20 APR, 2017 and 20 MAR, 2017. This table looks okay because set up for > 30 day.

The Eventarchive table currently has records only between 01 Jan, 2017 and 20 MAR, 2017.  This table it seems missing records and not archived.

What I understand that “There are 2 jobs that are important to this upkeep and maintenance of the Event and EventArchive tables, one of them moves records from the Event table to the EventArchive table when they become older than a certain number of days, and the other one deletes records from the EventArchive table when they become older than a certain number of days. The way to create these 2 jobs and configure the number of days is by running the following 2 queries, keeping in mind that the last value of each INSERT query represents the number of days.”

Best Regards,

Ronnie Abrahiem

Sr. Programmer Analyst - Yellowfin Administrator

North American Information Technology Services

DENSO International America, Inc.

ronnie_abrahiem@DENSO-diam.com

Tie: 5000-3460

Office: 248.750.3460

Fax: 248.213.2469

/icons/expand.gif

Leave a Comment
 
Attach a file