[DBCleaner] Last version DBCleaner didn't work in Oracle
Forge component by Ricardo Silva
Application Type
Traditional Web
Service Studio Version
11.8.13 (Build 32892)
Platform Version
11.9.1 (Build 20359)

In the last version of DBCleaner is functionality added for LogCleaning. This options has specific SQL for MS-SQL which didn't work in Oracle. The component is still marked as DBMS All.

GetLogTableRowCount contains several sys. tables that not exists in Oracle. This is a part of this SQL:
SELECT
   t.NAME AS TableName,
   p.rows AS RowCounts
FROM
   sys.tables t
INNER JOIN     
   sys.indexes i ON t.OBJECT_ID = i.object_id
INNER JOIN
   sys.partitions p ON i.object_id = p.OBJECT_ID AND i.index_id = p.index_id
INNER JOIN
   sys.allocation_units a ON p.partition_id = a.container_id
LEFT JOIN
   {Entity} en on en.physical_table_name = t.name
LEFT JOIN
   {Espace} e ON e.id = en.espace_id
WHERE
   t.NAME NOT LIKE 'dt%'
   AND t.is_ms_shipped = 0
   AND i.OBJECT_ID > 255
   AND t.name like 'oslog%'
GROUP BY
    e.name, en.name, t.Name, p.Rows
At the start of DBCleaner is the application runs the preparation that uses this code in for instance LogCleanupFeatureAvailable.

Is there already somebody who is fix this for Oracle?

Regards,

Kees Kleybeuker

Is this query used for the cleanup process or only to show data on a screen?


If it is not used in the cleanup process I would recommend for you just edit out the query in order to use the component

Hi João,

It is not used for cleanup but only for prepare the start window. I have fix this by build in an extra IF statement with a check on which type of database the environment is running. If it is not SQL then then this aggregate is skipped.

Now is is working fine.

 

Hi Kees,


Great that my suggestion at least helped you to make it work, still I do believe this issue should be addressed by the component developers

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.