Auditing and Repairing Trees

This chapter provides an overview of auditing and repairing trees and discusses how to:

Click to jump to parent topicUnderstanding the Auditing and Repairing of Trees

Tree repairs should be performed on trees that are having problems or have had major changes made to them.

Before using the repair programs, you should first run audits to learn which trees, if any have problems and which utility will repair the damaged tree. Review the audit reports to determine the correct solution for repairing your tree. You may need to run more than one utility program.

The Repair Tree program is designed for administrators who need a wide range of utilities with which to work. Besides containing various utilities for repairing trees, the Repair Tree program also includes the Tree Audits utility.

The Tree Auditor program is only the Tree Audits utility, and is designed for users who only need to audit trees.

Running the utility programs may result in a large number of updates to the tree. Because the system automatically puts a lock on a tree while the process is running, you should run these programs during off-work hours, to lower the risk of users trying to access the tree.

You should also perform a backup of your tree tables before running the repair programs.

Note. If you expect that saving a tree will take an especially long time due to an audit running as a part of saving process or on account of large, memory-intensive trees, PeopleSoft recommends that you save the trees as drafts, then run the audits with Application Engine using the Repair Tree or Tree Auditor programs. After the audits have completed without finding any problems, the tree status will be automatically changed to Valid Tree.

Click to jump to parent topicUsing the Repair Tree Program

Use the Repair Tree Application Engine program to audit and repair trees.

Note. You can also use the Tree Auditor Application Engine program to audit trees.

Click to jump to top of pageClick to jump to parent topicPages Used to Audit and Repair Trees

Page Name

Definition Name

Navigation

Usage

Repair Tree


Tree Auditor

RUN_TREE_UTILITIES

Tree Manager, Tree Utilities, Repair Tree

Alternatively, access the batch audit function by selecting Tree Manager, Tree Auditor.

Audit, troubleshoot, or repair problem trees.

Repair Tree Reports

PSBATCHREPORT

Tree Manager, Tree Utilities, Repair Tree Reports

Or click the View Results link on the Tree Utilities page.

Or click the View Results link on the Repair Tree page.

Or click the View Results link on the Tree Auditor page.

View results of an audit.

N/A

PSBATCHREPORTLIST

Tree Manager, Tree Utilities, Repair Tree Reports

Click the Select link for a report on the Repair Tree Report page.

View individual reports.

Click to jump to top of pageClick to jump to parent topicWorking with the Repair Tree Program

Access the Repair Tree page by selecting Tree Manager, Tree Utilities, Repair Tree. Optionally, you can access the batch audit function by selecting Tree Manager, Tree Auditor.

This is an example of the Repair Tree page:

Report Manager

Click the link to access the report manager inquiry page.

Process Monitor

Click the link to access the process manager inquiry page.

Note. If any trees are skipped while running any repair or audit programs due to an existing checkout, you see a status of Warning after the repair or audit program has completed. When this occurs, you should check the log to determine which trees have been skipped, and then rerun the appropriate program after the checked-out trees have been released.

See Viewing the Process List.

Run

Click to run a Process Scheduler request.

Tree Utility Type

Note. Typically, you would run the audits first, and then select a repair program as indicated by the audit results.

Select a tree utility from the following options:

  • Tree Audits: Audits a selected tree or subset of trees.

  • Correct Level Numbers: Ensures level numbers are correct. Reset node numbers are equal to the parent node's level number plus one.

  • Correct Parent Node Numbers: Ensures parent node numbers are correct in the tree node table.

  • Delete Orphan Tree Objects: Ensures there are no orphan nodes or levels.

    When running this repair program and specifying a tree, the program only deletes orphan nodes and leaves, not orphan levels.

    When running the program for all trees, this program deletes orphan nodes and leaves, and then deletes orphan levels. This is because orphan levels are not tied to a specific tree.

    Orphans can be the result of the following three situations:

    1. The parent node that the orphan leaf refers to no longer exists.

      These orphans are removed when running this program either for a specific tree or all trees.

    2. The tree name that the orphan leaf refers to no longer exists.

      These orphans are removed only when running this program for all trees.

    3. The Query Access Group record no longer exists in PSRECDEFN.

      These orphans are removed when running this program either for a specific tree or all trees.

  • Remove Tree Branches: Removes all branches from the selected tree.

  • Remove Tree Reservations: Cancels all current checkouts. This utility is helpful because if you try to audit or repair any trees that are currently reserved, the audit or repair utility will skip the reserved trees. For this reason, you can use this utility before running any audit or repair tree utility to ensure that the audits or repairs are performed on every tree. Also use this utility during emergency situations.

    Note. PeopleSoft recommends you use this utility judiciously. When you run this utility, all unsaved changes of users currently editing trees will be lost.

  • Reset Tree Node Gaps: Re-gaps a tree, so that intervals between tree nodes and their node numbers are evenly distributed. Consider running this program if you start to get messages that nodes can no longer be inserted into a tree.

    Note. The SQR program PTUGAPTR is also available for re-gaps. PTUGAPPTR.SQR is an interactive SQR program which prompts for user inputs and can only run interactively from a Windows client.

  • Update Tree Table Statistics: Calls the databases Update Statistics utility on the PeopleSoft Tree Manager tables. This program can be run whenever large changes have been made to trees or a large tree is imported or deleted from the database.

  • Report Only: Select to run a report to view results prior to updating the tree. Not available for all utilities.

Audit Scope

Available options are:

  • Single Tree: Select to run the selected utility for a single tree. Not all utilities can be run for single trees.

  • Multiple Trees: Select to run the selected utility for multiple trees. Fields in the Tree Definition group box become unavailable. Not all utilities can be run for multiple trees.

Tree Definition

Available options are:

  • Tree Name: Select a tree to audit or repair.

  • SetId,Business Unit, or Tree Key Value: Select the setID, business unit, or tree key value for the specified tree. The field is not available if the selected tree does not have a setID, business unit, or tree key value.

Date Selection

Available options are:

  • Effective Date of Tree: You can select an effective date to run the audit on a single instance of the tree.

  • As of Current Date: Select to audit trees which have the most recent effective date. If you select Single Tree in the Audit Scope group box and select a specific tree, only the instance of the tree with the most recent effective date will be audited. If you select the Multiple Trees option in the Audit Scope group box, all trees whose effective dates are current will be audited. This option is only available for the Tree Audits utility.

  • As of Specific Date: Select to enter a specific date. If you select the Single Tree option in the Audit Scope group box and select a specific tree, only the instance of the tree whose effective date matches the specified date will be audited. If you select the Multiple Trees option in the Audit Scope group box, all trees whose effective dates match the specified date will be audited. This option is only available for the Tree Audits utility.

  • All Trees: Select to audit all trees. If you select the Single Tree option in the Audit Scope group box and select a specific tree, all instances of this tree will be audited, regardless of effective dates. If you select the Multiple Trees option in the Audit Scope group box, all instances of all trees will be audited. When you select Multiple Trees, fields in the Tree Definition group box become unavailable. This option is only available for the Tree Audits utility.

View Results

Click the link to open a new browser instance that displays the Batch Report page.

Enter a run control ID to view the results from running audits or a utility program.

Audits Performed

The following table lists the types of audits performed from the Repair Tree program. These audits differ from those performed on the Tree Definition and Properties page.

Audit Type

Checks For

Purpose

Detail Values

Orphan tree leaves.

Lists detail values that refer to an invalid tree node number.

Detail Values

Detail values not found in the tree.

Lists any detail values that are found in application table but are not defined in the tree.

This audit is only performed if the All Detail Values option on the tree’s Definition and Properties page is selected.

Detail Values

Duplicate detail values.

Lists any detail values that are defined more than once in the tree.

This audit is only performed if the Allow Duplicate Detail Values option on the Definition and Properties page of tree is cleared.

Detail Values

Detail values with overlapping ranges.

Lists detail values that are defined as a range of values that overlap another detail value’s range of values.

This audit is only performed if the Allow Duplicate Detail Values option on the tree’s Definition and Properties page is cleared.

Detail Values

Nodes with no child nodes or detail values specified.

Lists any nodes that do not have any detail values or child nodes defined. This audit is performed for detail value trees only.

Node Audit

Nodes without a parent.

Lists tree nodes that refer to an invalid tree node number.

Node Audit

Tree node numbers that are greater than end numbers.

Lists tree nodes with end numbers greater than the node number.

Node Audit

Tree node end numbers that are greater than the end number of parent.

Lists tree nodes with end numbers greater than the parent node's end number.

Node Audit

Tree nodes with overlapping ranges.

Lists tree nodes whose node number and ending node number overlaps with another range of node numbers.

Note. When this occurs the tree is corrupted.

Node Audit

Node level numbers that are less than the parent node’s level number.

Lists any tree node with level numbers less than the level number of parent.

Structure Audit

A level record name in the Tree Structure table that does not exist in Record Definition table.

Lists tree structures that reference an invalid record name for the tree level application data.

Structure Audit

A node record name in the Tree Structure table that does not exist in Record Definition table.

Lists tree structures that reference an invalid record name for the tree node application data.

Structure Audit

A detail record name in the Tree Structure table that does not exist in Record Definition table.

Lists tree structures that reference an invalid record name for the tree detail values application data.

Structure Audit

A missing tree structure record.

Lists any trees that refer to a tree structure that is not found in the Tree Structure table.

See Also

Using Report Manager

Using Process Monitor

Click to jump to parent topicReviewing Audit Results

Use these steps to access the Batch Report page (select Tree Manager, Tree Utilities, Repair Tree Reports):

This is an example of the Batch Report page:

Show Reports Criteria

Available options are:

  • Select the Reports with Data option to list only those reports that contains data. This is the default value.

  • Select the All Reports option to list all reports.

Report List

Lists each available report, with report title and total row count.

Click the Select link to access each report. The Select link is inactive for reports with zero row count.

Click to jump to parent topicReviewing Individual Reports

Access a report page by clicking its Select link.

Reports contain the following information:

Details on fixing problems associated with reports are given below.

Parent Node Does Not Exist

If there are no other audit errors for this tree, then running the Correct Parent Node Numbers utility program should correct this problem.

Do not run the Correct Parent Node Numbers utility program if there are other audit problems with this tree. The other errors should be addressed first before trying to correct problems by running the utility program.

Orphan Tree Leaves

Run the Delete Orphan Tree Objects utility to delete these records.

Tree Node Numbers Are Greater Than End Number

Use PeopleSoft Tree Manager to delete these nodes, and then run the Reset Tree Node Gaps utility program. You will then need to use PeopleSoft Tree Manager to reinsert the problem nodes.

Note. Deleting a node causes all of its children to be deleted. Therefore, if the problem node has child nodes or leaves under it, you will have to recapture those as well. If it is not possible to use PeopleSoft Tree Manager to delete the problem nodes, call the PeopleSoft Support Center for help to analyze this problem.

Tree Node’s End Number Is Greater Than Parent’s End Number

Use PeopleSoft Tree Manager to delete these nodes and then run the Reset Tree Node Gaps utility program. You will then need to use PeopleSoft Tree Manager to reinsert the problem nodes.

Tree Nodes with Overlapping Ranges

Use PeopleSoft Tree Manager to delete these nodes and then run the Reset Tree Node Gaps utility program. You will then need to use PeopleSoft Tree Manager to reinsert the problem nodes.

Node’s Level Number Is Less Than Parent’s Level Number

The level numbers can be corrected by either: