Skip to main content

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.

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.  


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'


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.


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


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 


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