Seven DCTMJobs
Seven DCTMJobs
Seven DCTMJobs
Abstract
Development environments often become corrupted and unusable due to the abuse they endure
as temporary and experimental spaces. Documentum provides housekeeping jobs with the
Content Server1 that—if properly used—can prevent development environments from becoming
dysfunctional. There are seven jobs that every developer should know and run regularly in their
development environment. These jobs ensure your development Docbases stay clean, lean and
referentially intact. They can also provide invaluable insight to the content in the Docbase. This
paper discusses these seven jobs, makes recommendations regarding their schedule and use, and
discusses the value of their capabilities.
1
The information in this paper is based upon Documentum 5.3 SP3.
This paper introduces seven jobs that every developer should know about, and provides
recommendations on how often they should be run. The seven jobs are:
Job Description
1. DMClean The DMClean job removes deleted and orphaned objects from the
Docbase.
2. DMFilescan The DMFileScan job removes deleted and orphaned content files from
the file system.
3. LogPurge The Log Purge job removes server and session logs from the Docbase
and file system.
4. ConsistencyChecker The Consistency Checker job runs 77 referential integrity checks on
the Docbase.
5 UpdateStats The Update Stats job updates database table statistics and repairs
fragmented tables
6. QueueMgt The QueueMgt job deletes dequeued Inbox items from the Docbase.
7. StateOfDocbase The State of the Docbase job produces a report of the repository
environment and statistics about object types.
There are two reasons why you should not only know about these jobs, but also how to configure
and run them:
1. Some of these jobs are not configured to automatically run in the out-of-the-box
configuration. Out of the box, Documentum has not enabled any jobs that delete objects
or require user customized parameters.
2. The jobs that are configured to automatically run may execute at a time when your
development environment is not online (especially if you develop in a virtual
environment).
The remainder of this paper will discuss these seven important jobs, what they do, how to run
them, and why they are important to you.
Implementation
Jobs on the Content Server are implemented as two objects: the job (dm_job) and the job
method (dm_method). The job object holds the scheduling information and job method
arguments. The method object holds reference to the actual code that implements the
functionality of the job.
Arguments
When the agent_exec process launches a job, it passes four standard arguments to the job’s
method:
In addition, the method can access additional arguments defined in the job object’s
method_arguments attribute. When the method runs, it uses the job_id to retrieve these
arguments from the job object. Two common arguments passed using this technique are:
Execution
There are three easy ways to manually run jobs:
2. API Editor
• apply,c,NULL,DO_METHOD,METHOD,S,<job name>, ARGUMENTS,S,'<list of
arguments>'
3. DQL Editor
• EXECUTE do_method WITH method = '<method name>', arguments =
'<list of arguments>'
• If you find that the DMClean and DMFilescan jobs are running very slowly, one remedy
to try is deleting outdated registry keys (This can also speed up UCF downloads if you
are experiencing delays with data transfers). The keys to delete are:
o HKEY_CURRENT_USER\Software\Documentum\Common\LocalFiles
o HKEY_CURRENT_USER\Software\Documentum\Common\ViewFiles
o HKEY_CURRENT_USER\Software\Documentum\Common\WorkingFiles
1. DMClean
The first job, DMClean (dm_DMClean), is the workhorse of the housekeeping jobs. It looks for
and deletes orphaned content objects (dm_sysobject), ACLs (dm_acl), annotations
(dm_note) and SendToDistributionList workflow templates. Orphaned objects are objects not
referenced by or do not hold reference to any other objects in the Docbase and are just cluttering
things up.
2
I suppose you can use the same methodology with the ps and kill commands on a UNIX system, though I have
not tested it.
Method
DMClean’s method (dm_DMClean) code is located in %DM_HOME%/install/
admin/mthd1.ebs. Yes, this is a Docbasic file. This code will probably be ported to a Java
class in the near future, but until then, browse through it. You will discover that DMClean and
DMFilescan actually call the same method code. Upon further inspection, you will discover that
each of these methods call a built-in utility via the APPLY API command. The utility called by
DMClean is %DM_HOME%/bin/dmclean.exe.
Execution
You can manually execute the DMClean job using the API or DQL like this:
Note that jobs are still constrained by the window_interval argument set on the dm_job
object when run manually.
Outputs
In addition to the API script, the DMClean job generates a report of its activity and saves it to
/System/Sysadmin/Reports/DMClean in the Docbase. The report is not versioned.
2. DMFilescan
The DMFilescan job (dm_DMFilescan) scans the file stores looking for content files that have
no associated objects in the Docbase (i.e., the files have been orphaned). It sort of takes the
opposite approach from DMClean to achieve a similar result. Like DMClean, when the
DMFilescan job runs, it generates a script in %DOCUMENTUM%/dba/log/<docbase
ID>/sysadmin named <job object ID> and executes the script to delete the files. The
job can be configured to generate the script but not run it if you prefer.
By default, the DMFilescan job is Inactive and therefore never runs. In a development
environment that is subject to a high degree of volatility, it is important to run this job to keep the
file system clean and reclaim space. If the DMClean job runs regularly, this job does not need to
run very often, since DMClean should keep orphaned files under control. That being so, this is a
development environment subject to frequent abuse and uncertainty; I therefore recommend
enabling this job and running it once a month.
Method
DMFilescan’s method (dm_DMFilescan) code is located in %DM_HOME%/install/
admin/mthd1.ebs. This is the same file that contains the DMClean method code. In fact,
you will discover that DMClean and DMFilescan call the same method code. Upon further
inspection, you will discover that each of these methods call a built-in utility via the APPLY API
command. The utility called by DMFilescan is %DM_HOME%/ bin/dmfilescan.exe.
Execution
You can manually execute the DMFilescan job using the API or DQL like this:
apply,c,NULL,DO_METHOD,METHOD,S,dmfilescan, ARGUMENTS,S,
API '-scan_now -force_delete'
Note that jobs are still constrained by the window_interval argument set on the dm_job
object when run manually.
Outputs
In addition to the API script, the DMFilescan job generates a report of its activity and saves it to
/System/Sysadmin/Reports/DMFilescan in the Docbase. The report is versioned.
3. Log Purge
The Log Purge job (dm_LogPurge) deletes system generated log files on the file system and in
the Docbase that are older than a user specified age. Specifically, the following eight types of
log files are deleted:
By default, the Log Purge job is Inactive and therefore never runs. In a development
environment, log files can quickly chew up disk space, especially if you run heavily
instrumented code or traces for debugging. I recommend you run this job at least monthly to
recover disk space.
Method
Log Purge’s method (dm_LogPurge) code is located in %DM_HOME%/install/
admin/mthd2.ebs. This method is also written in Docbasic. Unlike the previous two
methods, this method does not create an API file to do its deleting; it does all the work itself in
real time. This method is largely undocumented and not terribly interesting, but it is worth
browsing to get a feel for how limiting Docbasic can be.
Execution
You can manually execute the Log Purge job using the API or DQL like this:
apply,c,NULL,DO_METHOD,METHOD,S,dm_LogPurge,ARGUMENTS,S,
API '-cutoff_days 30'
Outputs
The Log Purge job generates a report of its activity and saves it to /System/Sysadmin/
Reports/LogPurge in the Docbase. The report is versioned.
4. Consistency Checker
The Consistency Checker job (dm_ConsistencyChecker) runs a battery of 77 separate
checks on the repository looking for inconsistencies, corruptions and data integrity problems.
The job does not fix the problems it finds, but does report the problems using a unique number
for each type of error it discovers. The job’s report indicates the error number, provides a brief
description of each problem, and indicates its severity (Error or Warning).
The specific areas checked and the number of tests run are:
The Consistency Checker job is configured, out-of-the-box, to run automatically every night at
9:40pm. This is a good thing, provided your Content Server is up and running every night at
9:40pm. If your development environment is virtualized on your local workstation or laptop, and
your turn your computer off at night, the Consistency Checker may never get a chance to run.
Therefore, adjust the execution time accordingly.
Execution
You can manually execute the Consistency Checker job using the API or DQL like this:
API apply,c,NULL,DO_METHOD,METHOD,S,dm_ConsistencyChecker
Note that jobs are still constrained by the window_interval argument set on the dm_job
object when run manually.
The Consistency Checker method can also be run manually and independent of the job. The
syntax is:
The output is written to standard out (stdout) when the method is run from the command line.
Outputs
The Consistency Checker job outputs a report to /System/Sysadmin/Reports/
ConsistencyChecker in the Docbase. If the job runs successfully, meaning there are no
Errors (sever inconsistencies), the report is overwritten. If the job finds Errors (sever
inconsistencies) the report is versioned.
5. Update Statistics
The Update Statistics job (dm_UpdateStats) scans all the database tables used by the
repository and updates the statistics for each table. It will also reorganize tables to optimize
performance if it determines that they are fragmented. If you are running Documentum on
Oracle or Sybase, the Update Statistics job uses an external file to tweak the query optimizer.
The file is %DOCUMENTUM%/dba/config/<docbase name>/custom_<database
name>_stat.sql. You can add additional commands to this file if you know what you are
doing, if you don’t know what you are doing, you can negatively affect query performance.
Though the job is configured to run out-of-the-box, it is configured in READ mode, meaning the
job generates a report, but the statistics are not actually updated and the tables are not
reorganized. To take full benefit of this job, it should be run in FIX mode.
Method
The Update Statistics’ method (dm_UpdateStatistics) code is located in %DM_HOME%/
install/admin/mthd4.ebs. This method is a really interesting method that contains
some pretty cool SQL statements. It is sufficiently documented, so I encourage you to browse
through it to understand how the statistics are updated.
Execution
You can manually execute the Update Statistics job using the API or DQL like this:
apply,c,NULL,DO_METHOD,METHOD,S,dm_UpdateStats,ARGUMENTS,
API S, '-dbreindex FIX'
Outputs
The Update Statistics job generates a report of its activity and saves it to
/System/Sysadmin/Reports/UpdateStats in the Docbase. The report is versioned.
6. Queue Management
The Queue Management job (dm_QueueMgt) deletes dequeued Inbox items
(dmi_queue_item). Tasks in a user’s Inbox are marked for deletion and dequeued whenever
they are forwarded, completed or deleted from the Inbox. However, the underlying objects in the
Docbase are not really deleted. In a development environment--that may include the testing of
workflows and other activities that generate Inbox items--the build up of undeleted objects can
impact performance.
The Queue Management job deletes queue items based upon age of the objects and a custom
DQL predicate passed to it. The job automatically creates a base predicate of delete_flag
= TRUE AND dequeued_date = value(<cutoff_days>). Any custom predicate
provide is ANDed to the base predicate.
By default, the Queue Management job is Inactive and therefore never runs. I recommend
you run this job at least weekly (perhaps daily depending upon your application and use of queue
objects). Running this job will help keep your Inbox performing well.
Execution
You can manually execute the LogPurge job using the API or DQL like this:
apply,c,NULL,DO_METHOD,METHOD,S,dm_QueueMgt,ARGUMENTS,S,
API '-cutoff_days 30'
Note that jobs are still constrained by the window_interval argument set on the dm_job
object when run manually.
Outputs
The Queue Management job outputs a report to /System/Sysadmin/Reports/
QueueMgt in the Docbase. The report is versioned.
The State of the Docbase job is configured, out-of-the-box, to run automatically every night at
8:45pm. This is a good thing, provided your Documentum Content Server is up and running
every night at 8:45pm. If your development environment is virtualized on your local workstation
or laptop, and your turn your computer off at night, the State of the Docbase may never get a
chance to run. Adjust the execution time accordingly.
Method
The State of the Docbase’s method (dm_StateOfDocbase) code is located in
%DM_HOME%\install\admin\mthd4.ebs. This is a Docbasic file that contains a
collection of methods used by the Content Server. Though most of this code is undocumented,
browsing through it can be enlightening.
Execution
You can manually execute the LogPurge job using the API or DQL like this:
API apply,c,NULL,DO_METHOD,METHOD,S,dm_StateOfDocbase
Note that jobs are still constrained by the window_interval argument set on the dm_job
object when run manually.
Outputs
The State of the Docbase job outputs a report to /System/Sysadmin/Reports/
StateOfDocbase in the Docbase. The report is always versioned.
Conclusion
To recap, there are seven important jobs that you, as a developer, should have configured and
running in your development environment. These jobs work to keep your Docbase lean and
clean, and can alert you to any developing problems before they get out of control.
Four of these jobs (DMClean, DMFilescan, LogPurge and QueueMgt) delete obsolete objects
from the Docbase and clean up. The Consistency Checker runs a battery of integrity checks to
ensure your Docbase is referentially healthy. The last job, State of the Docbase, produces a
snapshot report that highlights the configuration and content of the Docbase.
For more information about these and other jobs, I encourage you to read the Content Server
Administrator’s Guide and visit the Documentum Developer Forums on the EMC Developer
Network (EDN).
Thanks to all the FSC engineers who knowingly and unknowingly have contributed to this
article!
<SDG><