Delete Large System error logs records

Delete Large System error logs records

Problem:

for large Log files (over 1 million records)  When we select the  "delete all" button in the system log viewer in the support tab the system Crashed ! 

So How can  we delete these large  log files? 

Solution:

we can delete them from database using a query. 

Steps 

1- check Database type and connect to it .

navigate to folder : manageengine\Servicedesk\bin > 

changeDBServer.bat 

if the database is postgres : 
connect to it 
psql.exe -U sdpadmin -p 65432 -d servicedesk -h 127.0.0.1
password : sdp@123

if the database is MSSQL: 
connect to it 
mysql.exe -u root -P 33366 servicedesk



2- execute the following Query.

  servicedesk=# delete from errorlog;

To delete the error log entries which are older than 60 days for example , please execute the following query.

delete from errorlog WHERE DATE_PART(('day',(NOW() - to_timestamp(OCCURREDTIME/1000))) >60;


    • Related Articles

    • Error while saving the email server details : Duplicate entry for key

      This Problem may happen when the application is holding to different mail server details. 1- So go to Reports > New query report and execute the following query : select * from IncomingMailServer 2- If you see multiple mail server configured in this, ...
    • Migration Important Notes

      When migrating from server to another , please make sure deploy these notes: 1-After migration successfully done , disable the service in the old server do not make it automatic to avoid running again the old server and conflicts can be occurred like ...
    • Instant Task Deployment Fails with “Invalid Authentication Passcode” - OS Deployment

      Problem Description: A client encountered a deployment failure when using an Instant Task to deploy an OS image over the network. The error displayed: Invalid authentication passcode. Observations: The authentication passcode has been verified as ...
    • Restricting Browser Screenshots: Edge Web Capture Configuration

      Purpose To disable the built-in Web Capture (Screenshot) feature in Microsoft Edge via Registry configuration, ensuring users cannot capture screen content through the browser UI. Prerequisites Administrative Privileges: Required to modify ...
    • Service Desk services stopped on its own.

      The reason for the crash is becauss the SQL database connectivity was lost. It's looks like this while checking the log file : [15:54:58:066]|[10-11-2018]|[SYSERR]|[INFO]|[72]: 101603933 [ServiceDeskCommon-2] WARN tm.TransactionImpl - XAException: ...