Quantcast
Channel: Support Portal
Viewing all articles
Browse latest Browse all 9807

Re : how to delete all log files

$
0
0
Sharon, 

Here are the queries to delete error logs 

For PGSQL:

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

For MSSQL:

delete from errorlog where WHERE DATEDIFF(d, DATEADD(s,DATEDIFF(s,GETUTCDATE() ,GETDATE()) + (OCCURREDTIME/1000),'1970-01-01 00:00:00'),GETDATE())>60;

For MYSQL:

delete from errorlog  WHERE DATEDIFF(NOW(),FROM_UNIXTIME(OCCURREDTIME/1000))  >60;

To Connect to DB:

For MSSQL database,connect to the query analyzer of the SQL server and execute the queries.

For MYSQL database,connect to the database following the below steps and then execute the queries.

Open command prompt on the application server,connect to the folder ManageEngine\ServiceDesk\mysql\bin> and use the command
mysql.exe -u root -P 33366 servicedesk

For PGSQL database,connect to the database following the below steps and then execute the queries.

Open command prompt on the application server,connect to the folder ManageEngine\ServiceDesk\pgsql\bin> and use the command
psql.exe -U postgres -p 65432 -d servicedesk

You can find what DB you are using by running the changedbserver.bat file that can be found in the SDP-HOME\bin folder on the server.

Jai Anand K
SDP Support - FAQ
ServiceDesk Plus - Help Desk Software of your Choice

Viewing all articles
Browse latest Browse all 9807

Trending Articles