TeamcenterKnowledge

Data sharing utilities

ensure_site_consistency

Allows users to perform corrective actions if the site ownership transaction is interrupted due to a system or network crash or a user-initiated process termination (such as the Windows Task Manager). In cases where legitimate error conditions are encountered (such as lack of transfer privilege or duplicate item IDs), there is no requirement to perform any corrective action; Teamcenter restores the data to consistent states under most non-crash conditions. Note This utility should typically be run only at the exporting site; not at the importing site. The flag that marks an object as requiring this utility is always at the exporting site. When working with TC XML Multi-Site, use -f=offline_recovery in place of -f=recovery. When using -f=offline_recovery, the ensure_site_consistency can be used at both the export and the import site. Syntax ensure_site_consistency [-u=user-id {-p=password | -pf=password-file} -g=group] -f=clean_all_rec | list_all_rec | offline_recovery | recovery | report | set_owning_site { [-item_id=item-id ] | [-key= {keyAttr1=keyVal1 [,keyAttr2=keyVal2],…[,keyAttrN=keyValN] [-class=class-name] ] | [-folder=folder-name] | [-filename=file-name] | [-itemKeyFile=file-name] | [-search] | [-4gd_id=object-id -class=4gd-class-name] } [-report=file-name] [-mode={sst | gms | full | min | auto} ] [-remote_site=site-name] [-real_owning_site=site-name] [-optionset=option-set-name [-override_options={option1:value1 [,option2:value2],…[,optionN:valueN] [-session_options={option1:value1 [,option2:value2],…[,optionN:valueN]] [-h] Arguments -u Specifies the user ID. This is a user with Teamcenter administration privileges. If Security Services single sign-on (SSO) is enabled for your server, the -u and -p arguments are authenticated externally through SSO rather than being authenticated against the Teamcenter database. If you do not supply these arguments, the utility attempts to join an existing SSO session. If no session is found, you are prompted to enter a user ID and password. -p Specifies the password. This argument is mutually exclusive with the -pf argument. -pf Specifies the password file. For more information about managing password files, see Manage password files. This argument is mutually exclusive with the -p argument. -g Specifies the group associated with the user. If used without a value, the user's default group is assumed. -f Specifies the function to perform. Valid values are: clean_all_rec Deletes all inconsistent local/replica IXR, ITXR, and PAR records specified in the input that exist for local/replica objects at a local site. This argument deletes workspace objects only. It does not delete VariantExpression, AbsOccData, or MEApprPathNode objects. Inconsistent local/replica IXR, ITXR, and PAR records occur in the following situations: The object is local and the referencing auxiliary objects (IXR, ITXR, and PAR) are replicas. The object is replica and the referencing auxiliary objects (IXR, ITXR, and PAR) are replicas. The object is replica and the referencing auxiliary objects (IXR, ITXR, and PAR) are replicas. At a hub site, the object is local/replica and the referencing auxiliary objects (IXR, ITXR, and PAR) are replicas. list_all_rec Lists all inconsistent local/replica IXR, ITXR, and PAR records that exist for local/replica objects on a local site. This value must be used with the report value. offline_recovery Performs offline ownership recovery operations. When working with TC XML Multi-Site, use -f=offline_recovery in place of -f=recovery. If the item has an SST dataset, use -f=recovery to recover the ownership. recovery Perform recovery operations such as reclaiming site ownership, releasing transfer locks, and removing unwanted export records. report Generates a list of objects that require recovery. The list is output to a text file identified by the value of the report argument. By default, the report contains the Teamcenter Integration Framework transfers (GMS) report followed by the Synchronous Site Transfer (SST) report. If the -mode argument is supplied with this argument, the utility generates a report on the mode specified. The clean_all_rec value can be used with this value. set_owning_site Sets the owning site of the input objects to the site specified by -real_owning_site. -folder Specifies a folder that contains items on which to perform corrective action. The use of a folder is intended for Workspace objects that do not have unique IDs, for example, datasets and forms. This is useful for failed remote checkins of multiple objects where many of the remotely checked-out objects do not have unique IDs, for example, datasets, forms, BVRs, and so forth. -filename Specifies a file name that contains a list of items on which to perform corrective action. The file should only contain item IDs. This argument is mutually exclusive with the -folder, -item_id, and -search arguments. -class (cl) Specifies the Teamcenter class of the object specified by the -name or -4gd_id argument. This argument is valid only with the -name or, when the -low_level argument is specified, with the -4gd_id argument. The default class is Item. For organization objects, this argument accepts Role, User, Group, and Person classes. -key Specifies the keys of the objects on which to perform corrective action. Use the following format: Copy [keyAttr1=keyVal1] [,keyAttr2=keyVal2]…[,keyAttrN=keyValN] To find the key of an object, use the get_key_string utility. -itemKeyFile Specifies the name of the file containing the keys of the objects on which to perform corrective action. -search Finds all the objects that are flagged as requiring corrective action. This argument is mutually exclusive with the -folder, -filename, and -item_id arguments. When used with the report function, the utility generates a report on all the objects that are found as requiring corrective actions. When used with the recovery function, the utility performs corrective actions on the objects that are found as requiring corrective actions. -4gd_id Specifies a 4GD object identifier or 4GD object pattern. The -class=class-name argument must be specified with the -4gd_id argument. The utility maps the -4gd_id argument to the corresponding unique ID of the 4GD class, for example: Copy Class=Cpd0DesignElement, 4gd_id=cpd0design_element_id A 4GD partition object and 4GD subset definition objects do not have a unique 4GD class ID. Therefore, using -4gd_id for partition objects or subset definition objects may result corrective action on multiple objects. To export unique partition objects, use multifield key attributes supplied in the -key argument. See Examples. -item_id Specifies the item ID. When used with the report function, the utility generates a report on the item specified by item-ID. When used with the recovery function, the utility performs corrective action on the item specified by item-ID only if the specified item is flagged as requiring corrective actions. -report Specifies the output file path for generating the report. Use this argument with either the report function or the recovery function. When used with the report function, the report lists the objects that require corrective action. When used with the recovery function, the report lists the objects where corrective action was taken. -mode Specifies the recovery method type of transfer failures that you want to recover or the type of report to generate when used with the -report argument. If you do not specify this argument, the utility uses standard Multi-Site Collaboration transfer failures or generates both a Synchronous Site Transfer (SST) and Teamcenter Integration Framework (GMS) report when used with the -report argument. You can specify one of the following valid values: sst When used with the recovery function, sst recovers SST transaction failures. When used with the report argument, the report lists the SST transaction objects that require corrective action. gms When used with the recovery function, gms recovers GMS transaction failures. When used with the report argument, the report lists the GMS transaction objects that require corrective action. full When used with the offline_recovery function, full reimports objects from the metafile and restores site ownership to the local site. min When used with the offline_recovery function, min reads the object UIDs from the metafile and flips their ownership. A full reimport is not performed. min is valid only if the metafile was generated with a transfer of ownership. auto When used with the offline_recovery function, auto restores ownership of the specified item. Objects are not reimported. -remote_site Use to convert the replica item to be locally owned (changing the replica to the primary). When used with the offline_recovery function and with -mode=auto, -remote_site specifies the last site for which transfer of ownership was attempted. All objects owned by this site within the given item are owned by the local site. -remote_site is not valid with -real_owning_site. -real_owning_site When used with f=offline_recovery with -mode=auto, ownership is assigned to the item on the target site specified by -real_owning_site. The target site's IDSM must verify that the item exists on the site and that the item on the target site is the item master. When used with f=set_owning_site, ownership is assigned to the item on the site specified by -real_owning_site with no ISDM verification. -optionset Specifies the name of a transfer option set to use when updating exported objects. The option set must be available at exporting site. The values of the options in the option set are applied to the exported objects. -override_options Used with -optionset to override options defined in the named option set. Specify options to override with comma-separated name-value pairs. Delimit multiple name-value pairs with semicolons. -session_options Used with -optionset to override session options defined in the named option set. Specify options to override with comma-separated name-value pairs. Delimit multiple name-value pairs with semicolons. -h Displays help for this utility. Environment As specified in Setting up a Teamcenter command-line environment. Files As specified in Log files produced by Teamcenter. Restrictions None. Examples Generate a report on all the objects that are flagged as requiring corrective actions: Copy ensure_site_consistency -u=Tc-admin-user -p=password -g=group -f=report -search -report=recovery_candidates.txt Generate a report on the item specified by item_ID: Copy ensure_site_consistency -u=Tc-admin-user -p=password -g=group -f=report -item_id=000301 -report=recovery_item.txt Perform corrective actions on all the objects that are flagged as requiring corrective actions: Copy ensure_site_consistency -u=Tc-admin-user -p=password -g=group -f=recovery -search -report=recovery_fixup.txt Perform corrective actions on the item specified by item_ID: Copy ensure_site_consistency -u=Tc-admin-user -p=password -g=group
-f=recovery -item_id=000301 -report=recovery_fixup.txt Perform corrective actions on a list of item IDs: Copy ensure_site_consistency -u=Tc-admin-user -p=password -g=group
-f=recovery -filename=item_id_list.txt The item_id_list.txt file should contain a list of item IDs, one item ID per line. Perform corrective actions on all objects under a given uniquely named folder: Copy ensure_site_consistency -u=Tc-admin-user -p=password -g=group
-f=recovery -folder=RecoveryFolderFor26June2007 To restore ownership on an item whose id is MyCorruptItem: Copy ensure_site_consistency -u=Tc-admin-user -p=password -g=group -f=offline_recovery -mode=auto -item_id=MyCorruptItem -remote_site=Site2 To restore ownership on objects contained in a metafile without reimporting: Copy ensure_site_consistency -u=Tc-admin-user -p=password -g=group -f=offline_recovery -mode=min -dir=c:\metafile_dir To reimport objects from the metafile and restore site ownership: Copy ensure_site_consistency -u=Tc-admin-user -p=password -g=group -f=offline_recovery -mode=full -dir=c:\metafile_dir Set the item and all of its dependent objects to be owned by Site2. Collect the dependent objects using the MultiSiteExpOptSet option set. Copy ensure_site_consistency -u=Tc-admin-user -p=password -g=group -f=set_owning_site -item_id=item001 -real_owning_site=Site2 -optionset=MultiSiteExpOptSet Set the item and all of its dependent objects to be owned by Site2. Collect the dependent objects using the MultiSiteExpOptSet option set and set the option opt_incl_rendering with the value true. Copy ensure_site_consistency -u=Tc-admin-user -p=password -g=group -f=set_owning_site -item_id=item001 -real_owning_site=Site2 -optionset=MultiSiteExpOptSet -override_options=opt_incl_rendering:true Related Topics TC XML and PLM XML Configuration for Data Import and Export Multi-Site Collaboration

Source: https://docs.sw.siemens.com/documentation/external/PL20251212545240207/en-US/tc_help/utilities_reference/avt1737253695886/ensure_site_consistency.html · retrieved Fri Jul 31 2026 00:00:00 GMT+0000 (Coordinated Universal Time)