Saviynt unveils its cutting-edge Intelligence Suite products to revolutionize Identity Security!
Click HERE to see how Saviynt Intelligence is transforming the industry.
Saviynt Copilot Icon

How to clean emailhistory table

Riku
Regular Contributor
Regular Contributor

Hi

I noticed that we have thousands of lines in emailhistory table where to, cc and bcc columns are empty or contain text null.

How can i clean those away from that table so that email history job will not try to send those over and over again?

 

Regards

Riku

11 REPLIES 11

naveenss
All-Star
All-Star

Hi @Riku ,

I would suggest you to open a FD ticket with Saviynt to get this cleared.

Regards,
Naveen Sakleshpur
If this reply answered your question, please click the Accept As Solution button to help future users who may have a similar problem.

yogesh
Regular Contributor III
Regular Contributor III

Hi @Riku 

Did you get a solution for this?
We are facing same issue, where same records are tried every day and job shows same errors again and again.

Thanks
Yogesh

RikuN
Regular Contributor
Regular Contributor

Hi

I created freshdesk ticket, and they asked me what lines from table i want to clear. And it looks they deleted lines what i asked to clean.

Regards

Riku

rushikeshvartak
All-Star
All-Star

Run below query.

update emailhistory set status=2 where status=404 limit 5;

1 - SENDNOW

2- SENT

15 - INPROCESS

404 - ERROR WHILE SEND

Usually 5,15,404 are considered as bad statuses as they would result in filling up emailhistory_archive table with duplicate values. Hence clean up can be done to remove them.

 


Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.

What does status 5 actually mean?

Usually 5,15,404 are considered as bad statuses as they would result in filling up emailhistory_archive table with duplicate values. Hence clean up can be done to remove them.


Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.

mickeymouse
New Contributor III
New Contributor III

Hi

You have a job for this called DefaultArchivalJobTrigger which normally purges emails older than 90 days.

mickeymouse_0-1695339179148.png

 


This job had an issue for purging the email table, but it has been fixed in version 23.6.
https://docs.saviyntcloud.com/bundle/Release-Notes/page/Content/v23/Release-Notes-23-6.htm

Have a nice evening,

I have an email in my emailhistory table that was created 4/28/2023 and the Archival Job is not purging it. This is our Dev environment so the email history job does not run on a schedule, but when I run it on demand, this email generates over and over again and actually does get sent.

This environment is 23.9.

RikuN
Regular Contributor
Regular Contributor

Hi

 

Thanks for tips.

When i posted this question we were in sp3.12 which didn't had "Cleanup email history data". And then we updated to sp3.18 which brought that but it is not working in that version.

 

Regards

Riku

mickeymouse
New Contributor III
New Contributor III

Thanks for the delay! I was using the data analyzer to identify which fields contain the value Home, but none of the three found (above) seem to work.

BrandonLucas_BF
Regular Contributor III
Regular Contributor III

You can run the following enhanced execution query to set any 'stuck' emails to no longer send. I have no idea how to purge them from the table. It doesn't appear to be an issue to leave them there.

 

select
2 as emailhistory__status,
emailhistorykey as emailhistory__primaryKey
from
emailhistory
where
status != 2;