Data sharing utilities
t2c_report_extract
Use this utility to generate a migration status report for objects that have been registered using the data_share utility with its -function=register_migration_data argument. The utility can also be used to extract islands of data to .csv files from source and target sites for comparison using the t2c_report_comparator utility. This utility is used as part of the process of migrating Teamcenter data to a newer version of Teamcenter. Syntax t2c_report_extract [-u=user-id {-p=password | -pf=password-file} -g=group] -function={status_report -dir=output_directory[-class=class1,class2,...classN] [-non_migrated_list] | extract -output_file=file_name [-filename=input_file_name -classoffile=input_file_class] [-mapping_rule=rule_file -output_file=file_name] [-optionset=option_set_name] [-session_options=option1:value1,option2:value2,...optionN:valueN] [-override_options=option1:value1,option2:value2,...optionN:valueN] [-adminclass=admin_class_name] [-item_id=item_id_val] [-qry_name=saved_query_name -qry_attr=attr_name1 -qry_val=attr_val1[ -qry_attr=attr_name2 -qry_val=attr_val2[ -qry_attr=attr_nameN -qry_val=attr_valN]]] [-since=time]} [-h] Arguments -u Specifies the user ID. This must be a user with Teamcenter administration privileges. Note 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. -function status_report Saves the migration status report as an HTML page in the directory specified by -dir. If the report identifies objects that have been updated on the source site since they were migrated, an \OutOfSync directory is created in the directory specified by the -dir. In that directory, .txt files are created for each type having out-of-sync objects. If errors occurred during the migration, an \Error directory is created in the directory specified by the -dir. In that directory, .txt files are created for each type generating errors. extract Extracts the Teamcenter objects as an island of data, including related attributes, from the source and target sites. The data is saved in the file specified by -output_file. The source and target site data can then be compared using the t2c_report_comparator utility. -dir The directory in which migration status report files are saved. Used only with -function=status_report. -class The classes the utility is to report on. It missing Item is reported on, Separate multiple classes with commas. -class is used only with -function=status_report. -non_migrated_list By default, -function=status_report does not generate the (potentially long) list of objects not migrated. Specifying -non_migrated_list with -function=status_report generates a full list of objects not migrated. -output_file Specifies the path and name of the .csv file to which the island of data is saved. Required with function=extract -filename Specifies an input file containing the list of objects to report on. Each line in the file must contain only one object. If -filename is not provided, all objects are reported on. -filename is valid only with -function=extract. -filename can contain the following lists: Objects of the same type Business object unique IDs Administrative object unique IDs Item objects in MFK key format. These objects must be listed using the form shown in the following example: Copy item_id=M2Item1_001,object_name=M2Item_name1,object_type=M2Item1 Item Revision objects in MFK key format. These objects must be listed using the form shown in the following example: Copy item_id=M2Item1_001,object_name=M2Item_name1,object_type=M2Item1,rev_id=A The class of the objects in the file is specified with -classoffile. -classoffile The class of objects listed in the file specified by -filename. -classoffile is valid only with -function=extract. The following class values are supported: Value Description Item, ItemRevision, Dataset, Form, Folder The file contains objects of one of these types. uidfile The file contains business object unique IDs. adminuidfile The file contains administrative object unique IDs. itemkeyfile The file contains Item objects in MFK key format. itemrevisionkeyfile The file contains Item Revision objects in MFK key format. -mapping_rule For scenarios where data on the source site must be transformed (mapped) to different objects and attributes on the target site, -mapping_rule specifies the mapping rule .csv file used when transforming the data. Specifying -mapping_rule with -function=extract results in two .csv files: file_name.csv (the specified island of data at the source site) and file_name_mapped.csv (the transformed island of data). You can run t2c_report_extract at the target site and then use the t2c_report_comparator utility to confirm the source objects and attributes are mapped correctly to the existing target site objects and attributes. For example, At the source site, use Advanced Multi-Schema Exchanger to create a mapping rules file for migration. For example, mapping_file.csv. On the source site, run: Copy t2c_report_extract -f=extract -item_id=xxx -output_file=d:\source.csv -mapping_rule=mapping_file.csv t2c_report_extract generates source.csv (the source site data) and source_mapped.csv (the mapped data). On the target site, run: Copy t2c_report_extract -f=extract -item_id=xxx -output_file=d:\target.csv t2c_report_extract generates a folder containing target.csv, the island of data as it exists on the target site. Compare the source site mapped data to the actual target site data using t2c_report_comparator. For example, Copy t2c_report_comparator -source=d:\source_mapped_folder -target=d:\target_folder Where: -source Contains source.csv and source_mapped.csv. -target Contains target.csv. t2c_report_comparator generates a report verifying that the source objects and attributes are mapped correctly to the target objects and attributes. -optionset Specifies the option set to use when extracting data. -optionset is valid only with -function=extract. -item_id Specifies one or more item_id values to report on. Wildcard characters (*) are supported. -adminclass Reports on all instances of a specified administrative class. Used when the file specified by -filename contains administrative object unique IDs and -classoffile is set to adminuidfile. -qry_name Runs a saved Query Builder query that defines the list of objects to process. One or more -qry_attr and -qry_val pairs specify the attribute value pairs the objects must match to be processed. The pairs are separated by spaces. Enclose attribute names containing spaces with double quotes. -session_options Specifies generic session options using colon separated name-value pairs. Name-value pairs can contain multiple values paired with a name. Options are delimited by commas. Multiple values in pairs are delimited by semicolons as in the following example. Copy -session_options=opt1:value1,opt2:value2,opt3:value3a;value3b -override_options Used with -optionset to override options defined in the named option set. Specify options to override with colon-separated name-value pairs. Delimit multiple name-value pairs with commas as in the following example. Copy -override_options=opt1:value1,opt2:value2,opt3:value3 -since Reports on only those objects modified or out of sync since the specified date and time. Specify the date and time using the format YYYY-MM-DD:HH:mm format. For example, 2023-06-21:00:30 represents June 21, 2023, 12:30 am. HH:mm are optional, and default to 00:00. -h Displays help for this utility. Restrictions Use this utility in preparation for using the Multi-Site data_share utility to migrate data between different Teamcenter releases. Examples Generate migration status report for the class Item and ItemRevision Copy t2c_report_extract -f=status_report -dir=d:\xyz_01 -class=Item,ItemRevision Extract the specific item data to the CSV file. Copy t2c_report_extract -f=extract -output_file=d:\xyz.csv -item_id=xyz 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/xid2273415.html · retrieved Fri Jul 31 2026 00:00:00 GMT+0000 (Coordinated Universal Time)