Hi,
I recently installed DBCleaner to remove unnecessary logs. I have added Log Cleanup record and run the timer but it didn't work. I had to review the code to see what is causing this issue. It turned out that action GetTableNumberList returns list containing only integers equal to 0. You need to correct ListAppend step manually because for some reason it does not work.
I am writing this here as a new post of Question type, I don't know why but I can't add Discussion type post.
Cheers,
Michal
Hi Michal,
Nowadays we moved away for our customers from DBCleaner to DBCleaner On Steriods.
DBCleaner on Steriods is more actively maintained, and contains more features to do automated cleanup of log data.
You could try if with DBCleaner on Steriods you are not having issues cleaning up your logs.
Regards,
Daniel
Thanks Daniel, I followed your suggestion but actually seeing DBCleaner with a more recent version (July 2023) and still higher #downloads than DB Cleaner on Steroids (DBCoS). I'm honestly ignorant to the full scope of features that DBCoS brings, but I checked the same logs cleanup code and still finding the same physical table name construction that I pointed out in my earlier post. Guess I'll have to keep debugging this. Cheers!
Hi Daniel,
Thanks for your suggestion. I will try it out at the nearest opportunity.
Regards.
I'm having the same problem. Digging deeper into this I found out that the problem is the time zone setting. Log cleanup builds a datetime in string format. But does that in the server time zone settings. Which for us it is DD/MM/YYYY. SQL cannot convert a datetime string in the format DD/MM/YYYY to an actual date and that causes the problem.
Error solution reference
I'm having the same issue but on my case the error stack is showing
OutSystems.HubEdition.RuntimePlatform.DataBaseException: Error executing query. ---> OutSystems.HubEdition.RuntimePlatform.DataBaseException: Error in advanced query DeleteLogDetailTable in CycleDeleteLogTable in DBCleaner (EXEC sp_executesql @SQL;): Invalid object name 'dbo.oslog_RequestEvent_Detail_0'. --- End of inner exception stack trace ---at ssDBCleaner.Actions.FuncActionCycleDeleteLogTable.QueryDeleteLogDetailTable(HeContext heContext, Int32 maxRecords, IterationMultiplicity multiplicity, Int64& outParamCount, String qpstSQL)at ssDBCleaner.Actions.ActionCycleDeleteLogTable(HeContext heContext, Int32 inParamLogTableTypeId, DateTime inParamMaxDateToKeep, DateTime inParamControlledTimeout)at ssDBCleaner.Actions.ActionCleanOldLogs(HeContext heContext)at ssDBCleaner.TimerCleanOldLogs.Execute(HeContext heContext, Int32 timeout)
I suspect that the error is due to a wrong system entity name, as per Request Event logs documentation. Was just hoping that this had been spotted earlier than having to debug the dynamically generated SQL statement... did anyone find and fixed this already?