Solved

Clean "automation schedule history" ,SM205035

  • 7 December 2020
  • 6 replies
  • 320 views

Userlevel 6
Badge +5

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.

icon

Best answer by ray20 10 December 2020, 01:24

View original

6 replies

Userlevel 2

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.  

Userlevel 7
Badge +17

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'

Userlevel 6
Badge +5

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.

Userlevel 6
Badge +5

@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.

Userlevel 1

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 

Userlevel 6
Badge +5

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


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2024  Acumatica, Inc. All rights reserved