This topic describes how you delete orphaned data in the database.
To do this, you use the SLCheckerTool.
When portal resources are deleted, dependent resources that are
stored in a different database domain are not deleted at the same time. These
remaining resources are still available for backup scenarios or other production
lines that might share the database domain. For example, when an administrator
deletes pages, the user customization to the deleted pages are not deleted.
The SLCheckerTool allows you to detect orphaned data that is not needed any
more by any of the production lines that share the domain. You can use the
SLCheckerTool to prepare an XML script for later deletion of the orphaned
data by the XML configuration interface.
The SLCheckerTool is included
in the file wp.db.slchecker.jar in the following directory:
To prepare and complete deleting orphaned data you also perform
some steps by using the XML configuration interface. For details about the
XML configuration interface refer to The XML configuration interface. For
details about how to use the XML configuration interface refer to Working with the XML configuration interface.
A sample XML script ExportIncludingOrphanedData.xml allows you to prepare
the orphaned data for work with the SLCheckerTool.
Notes:
- Before deleting the orphaned data by using the SLCheckerTool, secure your
databases by making a backup.
- To delete all orphaned data, you need to include every production line
that shares the database domain. Otherwise resources that are still valid
in a skipped production line might be unintentionally removed.
To delete the orphaned data, proceed by the following steps.
For each step, use the target file from the previous step as the source file.
- Create a full export including orphaned data
of each production line that shares the particular domain. To do this, use
the XML configuration interface and the XML sample file ExportIncludingOrphanedData.xml.
- Use the SLCheckerTool to create an XML script file to delete the
orphaned data. To do this, proceed by the steps given below. Observe
the following rules:
- For each step, start the SLCheckerTool with the appropriate parameters
as described under that step.
- Replace all file name variables (given in italics) by the complete directory
path location and file name.
- For each step, use the target file(s) from the previous step as the source
file(s).
- Find candidates for orphaned data in each production
line. Repeat this step for each production line, but specify a different output
file for each iteration, otherwise the results will be overwritten. Use the
following parameters:
- --find-candidates -s xml_source_file -d cand_target_file -domain domain_identifier
- Use these parameters to find the candidates for orphaned data within one
production line. Replace the variables as follows:
- xml_source_file
- Specify a full XML export file that you created in the step
for creating the XML export including orphaned data.
- cand_target_file
- Specify the target file. The orphaned data candidates will be saved to
that file.
- domain_identifier
- Specify the database domain in which you want candidates to be searched.
Valid values are comm for the community database domain, cust for
the customization database domain or all for both
database domains.
- Identify the orphaned data. Perform this step only
once, but with all the candidate files generated by previous step at
once, as this step determines the intersection of all result files, that
is, the data that are orphaned in all production lines. Use the following
parameters:
- --identify-orphans -s cand_source_files_and_directories -d orph_target_file
- Use these parameters to identify the orphaned data by matching the information
from all the candidate files. Replace the variables as follows:
- cand_source_files_and_directories
- Specify all files that were generated as cand_target_files by
the substep for finding the
candidates. If you specify one or more directories with the files,
make sure that these directories contain only candidate files and no other
files.
- orph_target_file
- Specify the target file. The identified orphaned data will be saved to
that file.
- Generate an XML script file. You can later use
that script for deleting the orphaned data. Use the following parameters:
- --delete-orphans -s orph_source_ file -d xml_target_file
- Use these parameters to generate an XML script file for deleting the orphaned
data. Replace the variables as follows:
- orph_source_ file
- Specify the file that was generated as the orph_target_file in
the step for identifying the orphaned
data.
- xml_target_file
- Specify the target file. This will be the XML script file that contains
the information about the orphaned data. You can later use this file to delete
the orphaned data.
- Optional: You can check whether all production lines
were considered during the creation of the XML script file. To do this, review
the comment in the file header. The header contains information about all
full exports that were used.
- Delete the orphaned data. To do this, invoke the XML configuration
interface with the XML script that you obtained as the xml_target_file with
the orphaned data in the step
for generating the XML script. You need to invoke the XML configuration
interface with the XML script only on one production line that shares
the database domain. This will delete the orphaned data for all production
lines that share that database domain.
You have removed all orphaned data from your portal database.
Parent topic: Configuring portal behavior
Related concepts
Delayed cleanup of deleted portal pages
The XML configuration interface
Related tasks
Preparing your previous environment for migration
Related reference
Reference: Sample XML configuration files
Related information
Working with the XML configuration interface
|
|
|