SELECT DISTINCT l.sourceDocument, l.targetDocument
FROM Resources r, LinkLists l WHERE l.targetDocument in (SELECT id_ FROM Resources where folderid_ = 0)
Housekeeping with cleaners
Get some tips and tricks for the usage of the cleaners in CoreMedia.
What you'll learn
- Know when to use cleansers
Prerequisites
- Having a CoreMedia system
Time matters
Should I read this?
The CoreMedia Cleaners, cleanversions and cleanrecyclebin, are tools for freeing up memory on the server and the underlying database. They are command line tools with no graphical user interface and are intended for use by system administrators only. Administrators are advised to run these collectors regularly (i.e. by cronjobs) in order to maximize efficiency and speed of the repository. In order to run an installation of one of CoreMedia’s products, you need to have valid licenses.
Some Tips
-
Run cleanversions and cleanrecyclebin regularly.
-
Run cleanversions prior to cleanrecyclebin.
-
Both cleaners are very resource consuming hence they should run when you expect the system load to be low. The repository size, the network connectivity (latency), database performance should be considered as well.
-
You can also perform the job in several calls for disjunctive sets of documents (by --after and --before parameters).
-
Test the job with --simulate for different parameters in advance.
Trouble with the Trash?
Actually the tools above keep the system consistent. But sometimes you might be facing problems with documents (NO_SUCH_RESOURCE for example) that have been deleted forcibly from the repository or as a result of aborting the tool.
Here are some SQL commands to find documents and their linking:
Find all documents with references into the trash (also among themselves)
Find all documents with references into the trash
SELECT DISTINCT l.sourceDocument, l.targetDocument FROM LinkLists l WHERE l.targetDocument in (SELECT id_
FROM Resources where folderid_ = 0) AND l.sourcedocument in (SELECT id_ FROM Resources where folderid_ <> 0)
Find all documents inside the trash with references to documents outside
SELECT distinct l.sourcedocument as "Source document in trash", l.targetdocument as "Target document outside trash"
FROM Resources r, linklists l
where l.sourcedocument in (SELECT id_ FROM Resources where folderid_=0);