Skip to main content
Solved

Clean "automation schedule history" ,SM205035

  • 7 December 2020
  • 6 replies
  • 421 views

Forum|alt.badge.img+5
  • Captain II
  • 398 replies

Hello,

     Our company has run Acumatica for nearly 3 years. We installed Acumatica on our own server and database. As an IT stuff, I checked there are large amount of history records when opening screen SM205035.
    These records are not quiet necessary, so I want to clean them.

     However, if I click “Delete ALL” button, I would get request timeout. Maybe these records are too much(we set some scheduler run in minutes interval).

       I can select 1 page and delete 1 page’s record at once by clicking “delete”. but that is so time consuming.

      Is there a better way to clean them?
      To delete them directly from DB is probably a way to go, but I am afraid to broke the table constraints and reference of each other.

       Can anyone give me some directions.

Best answer by ray20

@naveenb74 @KishoK 
Hello, buddies. I got confirmation from Acumatica support team, we can just 

delete from  AUScheduleHistory where ExecutionDate <= getdate()-180 where CompanyId=YourcompanyID

something like this.

View original
Did this topic help you find an answer to your question?

6 replies

KishoK
Jr Varsity I
  • Jr Varsity I
  • 15 replies
  • December 7, 2020

Hi @ray20 
How about do a small customization in this screen (Increase the page size of the grid)
I increased up to 3000 lines and tried,Depend on your license you can increase or decrease the page size. For me  Acumatica took 20-30 Secs to clear each page , but much more better than timeout, once you cleared all those entries you can unpublish this customization, so create a project with only this screen is recommended.  


Naveen Boga
Captain II
Forum|alt.badge.img+19
  • Captain II
  • 3381 replies
  • December 7, 2020

hi @ray20,

I’m assuming that Acumatica is dumping all the history records in a specific table i.e. AUScheduleExecution

I have deleted one of the scheduler history records from this table using the below query in my local DEV environment but I didn’t see constraint and references issues.


delete from AUScheduleExecution where ScreenID='SchdulerScreenID'


Forum|alt.badge.img+5
  • Author
  • Captain II
  • 398 replies
  • December 7, 2020
naveenb74 wrote:

hi @ray20,

I’m assuming that Acumatica is dumping all the history records in a specific table i.e. AUScheduleExecution

I have deleted one of the scheduler history records from this table using the below query in my local DEV environment but I didn’t see constraint and references issues.


delete from AUScheduleExecution where ScreenID='SchdulerScreenID'

Thank you Naveen, this is a quite quick way. But before I did anything, I’d appreciate some official feedback from Acumatica support team.


Forum|alt.badge.img+5
  • Author
  • Captain II
  • 398 replies
  • Answer
  • December 10, 2020

@naveenb74 @KishoK 
Hello, buddies. I got confirmation from Acumatica support team, we can just 

delete from  AUScheduleHistory where ExecutionDate <= getdate()-180 where CompanyId=YourcompanyID

something like this.


  • Freshman I
  • 7 replies
  • February 9, 2023

Hello, I wanted to ask where you input the statement:

“delete from  AUScheduleHistory where ExecutionDate <= getdate()-180 where CompanyId=YourcompanyID”

To be able to resolve this issue?
thank you 


Forum|alt.badge.img+5
  • Author
  • Captain II
  • 398 replies
  • May 18, 2023
rpearson69 wrote:

Hello, I wanted to ask where you input the statement:

“delete from  AUScheduleHistory where ExecutionDate <= getdate()-180 where CompanyId=YourcompanyID”

To be able to resolve this issue?
thank you 

@rpearson69  Sorry for the late reply. I just saw your question.
Per my knowledge, You have to be the Database admin to run this script. And you should be extremely careful when you run this script. If it is possible, you can rely on your support team.


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings