TeamcenterKnowledge

Maintenance utilities > Portfolio, Program, and Project Management

update_project_data

Updates project data in the Teamcenter database. Note The -f=update option initiates the update of all project-related data in a database. This process can take a long time depending on the number of objects assigned to projects. When specifying the project ID (-project) for one or more projects, the action applies only the given projects. When updating specific projects, you may need to update other project-related data by running the utility again. Syntax update_project_data [-u=user-id {-p=password | -pf=password_file} -g=group_name [-f=function] [-force (for update only)] [-project= project-ID1[,project-ID2...]] [-program= program-ID1[,project-ID2...]] [-operation_name= { "CheckIn","CheckOut","Create","Delete","Export","Import","Revise","Save","SaveAs","All" }] [-type={any workspace object} {-ID=item-id_or_item-rev-id | -key=key-id}] [-rev-id=revision-id] [-owning_user=owning_user_id] [-owning_group=owning_group_name] [-name= name_of_object_in_search] [-file=input_file_with_workspace_object_uids_to_process] -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 user and password 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 user's 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 performed by the utility. Must be one of the following options: update -force | -project=project_ID | -project=projectID1[,projectID2...] (Default function) Updates project-related data. Use this function to: Update project-related data in the database after modifying site propagation rules. Clean up corrupted project-related data that may have been caused by system crashes. -force Specifies that all projects in the database are unconditionally updated using the current site propagation rules. This process may take a long time for a database with projects containing a large number of objects. -project=project_ID Unconditionally updates the specified project in the database using the current site propagation rules. -project=projectID1[,projectID2...] Unconditionally updates the specified list of projects in the database using the current site propagation rules. For example, for the action performed on two projects (Proj4000 and Proj5000): Copy -project=Proj4000,Proj5000 Use double quotation marks (") if any project ID contains one or more blank spaces. See the Examples section below for examples on using the -force function. update_hierarchy Updates project-related data according to project hierarchy. Use this to update project-related data in a database after creating project hierarchy. It updates the owning project and project properties of the data according to the project hierarchy. Use the -dry argument to generate a report, which is useful to see how data looks if the utility is run. See the Examples section below for examples on using the update_hierarchy function. delete -project=project ID1[,project ID2...] Deletes one or more projects identified by the -project argument. Only the Project Administrator of each project that is to be deleted can use this function. This process may take a long time, depending on the number of objects in each project. See the Examples section below for examples on using the delete function. -project Specifies the project of the program for which data needs to be updated. When updating the hierarchy, you must specify the program ID. -program Specifies the program for which data needs to be updated. When the program security attribute on a project is set to true, Teamcenter considers the project as a program, and program-level access rules are applied. -operation_name The name of operation must be one of the supported operations: "CheckIn","CheckOut","Create","Delete","Export","Import","Revise","Save","SaveAs","All". -type -ID | -key | -rev_id Indicates the type of the source object, which can be any workspace object. -ID Specifies the ID of the source item or item revision. -key Indicates the key ID of the object. -rev_id Specifies the ID of the source item revision. If omitted, the default is the latest revision. -name -owning_group | -owning_user Indicates the name of the source object. This is required if -ID is not supplied. -owning_group Specifies the owning group of the source objects where propagation should be started. -owning_user Specifies the owning user of the source object where propagation should be started. -file Updates propagation-related data in the database for given objects. The object UIDs must be provided in a separate line in the file. This option should not be used with other options. See the Examples section below for examples on using the -file argument. -h Displays help for this utility. Migrate to a single-level hierarchical program Select an existing business situation to migrate to a single-level hierarchical program. For example: Copy Program_M1 (Program =True) - D1 (owning_program= Program_M1, Project IDs= Program_M1) Program_M2 (Program =True) - D2 (owning_program= Program_M2, Project IDs= Program_M2) Program_M3 (Program =True) - D3 (owning_program= Program_M3, Project IDs= Program_M3) Change the program to a project, which you would like to add as child under program to build the hierarchy. Copy Program_M1 (Program =False) - D1 (owning_program= Program_M1, Project IDs= Program_M1) Program_M2 (Program =False) - D2 (owning_program= Program_M2, Project IDs= Program_M2) Program_M3 (Program =False) - D3 (owning_program= Program_M3, Project IDs= Program_M3) Add the projects from Step 2 under an existing program or new program to build the hierarchy. Top Program (Program=True) Copy Program_M1 (Program =False) - D1 (owning_program= Top Program.Program_M1, Project IDs= Program_M1) Program_M2 (Program =False) - D2 (owning_program= Top Program.Program_M2, Project IDs= Program_M2) Program_M3 (Program =False) - D3 (owning_program= Top Program.Program_M3, Project IDs= Program_M3) Align the data for the newly created hierarchy in Step 3. Consider the following: Run the update_project_data utility in the mode appropriate for the volume of data. This utility can process single program or multiple programs or a single project or multiple projects. Use the switch that is appropriate based on the volume of data to process. For example, the dry run (-dry) switch generates a report on the data state after migration. The following example illustrates running the update_project_data utility for a single project: Copy apps\tc\tc13\TR\tc_menu>update_project_data -u=Tc-admin-user -p=password -g=group -f=update_hierarchy -project= Program_M1 C:\apps\tc\tc13\TR\tc_menu>update_project_data -u=Tc-admin-user -p=password -g=group -f=update_hierarchy -project= Program_M2 C:\apps\tc\tc13\TR\tc_menu>update_project_data -u=Tc-admin-user -p=password -g=group -f=update_hierarchy -project= Program_M3 Environment As specified in Setting up a Teamcenter command-line environment. Files As specified in Log files produced by Teamcenter. Examples The following examples illustrate the use of the -f=update function: Enter the following command to update the propagation data using the source object of type Item with a specified Item ID: Copy -f=update -type=Item -ID=ItemID Enter the following command to update the propagation data using the latest item revision of Item with a specified item ID as the source object: Copy -f=update -type=ItemRevision -ID=ItemID Enter the following command to update the propagation data using item revision with a specified item ID and revision ID as the source object: Copy -f=update -type=ItemRevision -ID=ItemID -rev_id=rev_id Enter the following command to update the propagation data using item with the specified key as the source object; refer to the get_key_string utility. Copy -f=update -type=Item -key=key-of-item Enter the following command to unconditionally update the specified project in the database using the current site propagation rules: Copy -f=update -project=project-id Enter the following command to unconditionally update the specified list of projects using the current site propagation rules: Copy -f=update -project=project-id1[,project-id2...] The project IDs are given as a comma-separated string. For example, -project=”Proj4000,Proj5000” specifies that the action is performed on two projects: Proj4000 and Proj5000. Enter the following command to update all projects in the database using the current site propagation rules: Copy -f=update This command is normally used to update all project data after site propagation rules have been modified. The update algorithm updates project data for objects with a last project assignment date prior to the last site propagation rule modification date. Enter the following command to unconditionally update all projects in the database using the current site propagation rules: Copy -f=update -force Note If the database contains a large number of projects, processing time could be considerable. Enter the following command to align the data specific to the projects under the Program001 program hierarchy: Copy -f=update_hierarchy -project=Program001 Enter the following command to align the data to program project hierarchy unconditionally for all programs: Copy -f=update_hierarchy Note If the database contains a large number of projects, processing time could be considerable. The following example illustrates a SQL query to generate a file of UIDs. Query to get all the workspace object UIDs that have own ProjectObjectRelation. Note This query is the default query used in utility. It runs on all the objects having own ProjectObjectRelation. This query is not sufficient to execute only on a set of few objects. You can add more criteria to the SQL and scope the objects you want to process. Copy select/+PARALLEL/ distinct trop_level_proj_obju from PROJECTOBJECTRELATION; Caution You must run this utility on the entire data object. If you only run the utility on few objects, then you should be aware that there is data that will not align with latest propagation rules. Only in exceptional cases where the volume of data is very high and takes a long time to run, you should scope in the objects by generating your own UID file. The following are examples of using the -f=update_hierarchy function: Usage 1. -f=update_hierarchy -program=program-ID When -program=program-ID is used with this function, all the data of each of the child projects of program-ID are updated as per the newly created hierarchy. Usage 2. -f=update_hierarchy -program=program-ID1, program-ID2... When -program=program-ID1, program-ID2... is used with this function, all the data of each of the child projects of the specified programs are updated as per the newly created hierarchy. Usage 3. -f=update_hierarchy -project=project-ID When -project=project-ID is used with this function, all the project data is updated as per the newly created hierarchy. Usage 4. -f=update_hierarchy -project=project-ID1, project-ID2... When -project= is used with multiple projects with this function, all the data of all the projects specified in the argument is updated as per the newly created hierarchy. Usage 5. -f=update_hierarchy When there is no -project or -program used with this function, all the data in the system is updated as per the newly created hierarchy. Note This is not recommended for a large set of data. Usage 6. -f=update_hierarchy -dry When using the -dry argument with update_hierarchy, a report is generated; however, no data is actually updated. Object Existing Owning Project Existing Projects Updated Owning Project Updated Projects Result Comments vega NULL | testproj1 | testproj12 | testproj1 | testproj12 FAIL object is not updated vega1 NULL | testproj1 | testproj12 | testproj1 | testproj12 FAIL object is not updated vega3 NULL | testproj1 | testproj12 | testproj1 | testproj12 FAIL object is not updated

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