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 ...
    • 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 ...
    • Database Warning : Your database transaction log file size has crossed the threshold

      You are getting this email as a result of an enhancement that was made in the 11 version to notify administrators if the SQL Log File Size crossed the threshold. In Service Desk Plus, under Performance Settings in Admin/ESM Directory you have the ...
    • List of Services Template Report

      Tthe below Query to list all service catalog in the system Database : PostgreSQL Server - Version: 10.5 SELECT serd.Name "Service Category",        reqtl.templatename "Service catalog",        sla.slaname "SLA" ,        sdo.name "Site",        ...
    • Remove email from Scheduled Reports

      select * from reportscheduletask; delete from reportscheduletask where mailid ='email@company.com';