This command can be used for cleaning the corrupted datasets or other objects from Database and volumes. Whenever we feel there is waste or unreferenced data, it can be cleaned with collect_garbage utility. This utility Collects unreferenced workspace objects and places them in a WASTE BASKET folder of infodba’s Home folder.
This command is used only for Workspace objects like Datasets, envelopes, folders, items and forms.
collect_garbage [-u=userID -p=password -g=group] -rf=<report file name> -if=<input-file>
Below arguments can be used with above syntax for different purposes. we will cover some of them.
-dataset, -item, -occurrence, -absoccdataqualifier, -form, -folder, -envelope,-all, -orphan,
-delete, -report, -query, -dataset, -child_references, -ignore_relation, -gsidentity,
-plmappuid=ReportOnly | ReportAndDelete, -start=number, -end=number
-delete: Deletes all objects of a specified type. -dataset, -item, -form,-folder, or -envelope arguments or the -all or –orphan or gsidentity arguments can be supplied.
-query: It works with one of the below object type (-item, -dataset, -form, -envelope, -folder, -all) and –rf argument.
-report: This argument creates a report which includes data moved to WASTE BASKET.
-gsidentity: It identifies and removes all invalid GSIdentity records that do not exist.
-orphan: It collects all those item revisions that do not have a valid parent item and delete. These item Revisions may be referenced to other data.
Use -orphan argument alone to collect orphan item revisions in the WASTE BASKET folder. Use -delete argument with -orphan argument to delete orphans from the WASTE BASKET folder.
Please look into the restrictions below before using –orphan argument.
The collect_garbage utility can be divided into two phases.
Dataset Cleanup: Repairs corrupted datasets and remove orphaned revision anchors.
A Corrupted Dataset will have the following identities.
A dataset object is reattached to revision anchor if it is an orphan but is referenced by some other objects, or deleted if it meets the following criteria:
The dataset_cleanup utility repairs dataset revision anchors in following way.
delete_item_data: Deletes those item revisions from the database which are not in use. The item revisions to be removed are collected in an input file created by user.
purge_datasets: Removes (purges) old versions of dataset from the database and provide an output list of each dataset purged along with the owning user and group.
purge_volumes: It Removes (purges) operating system files which have deleted Teamcenter objects.
During a Teamcenter session, users delete objects. if an object’s associated files remain in the Teamcenter volume, the purge_volumes utility unlocks these files so they can be deleted at the operating system level.
review_volumes: it allows you to view volume file attributes like file size, modification date etc. and remove unreferenced operating system files from these volumes.
This utility can also be used to generate the report which contains Volume usage by various groups and users, missing operating system files and unreferenced Teamcenter files.
Unreferenced OS files can be deleted at the time a report file is generated. It can also be deleted at a later time using a previously-generated report file as an input.
The report file format is in plain text (ASCII) and can be manually edited in order not to delete certain files. To prevent files from being deleted, remove any file name before using the report file as input file.
We will more post on PLM Tutorial–>Teamcenter in upcoming days.
Kindly provide your valuable comment on below Comment section and also have you any question kindly ask to a ASK QUESTION in FORUM . OurTeam will try to provide the best workaround.
Kindly subscribe your Email-Id at (https://globalplm.com/) and drop any suggestion/queries to (globalplm2@gmail.com).