PCD Support tools

The PCD support tools are falling into two categories: interactive Swing applications that can be used to browse and edit PCD content, while the console-based command-line tools provide low-level access for analyzing and modifying PCD content.

Note that the tools do not require the engine to be running in order to be able to connect to the database, so they are also working if the engine is down.

A word of caution here: Wrong usage of the tools can destroy the content of the Portal. Please make sure to follow all guidelines laid out in SAP note 1086644 when using these tools.

Installation of the tools

Note 1086644 describes the procedure for obtaining the tools.

In principle, you have two options to deploy the tool SDA, either by the normal SDM deployment or by simply extracting the contents of the SDA (which is ZIP-compatible) to an arbitrary subdirectory of the j2ee folder (something like \\usr\sap\<SID>\JC<XX>\j2ee\pcdTools). If you deploy with SDM, the folder will always be “pcdTools” and this name is also recommended when unzipping the SDA manually.

During the very first start of one of the tools, a few required files must be copied into the “lib” subdirectory of the new folder.

If something goes wrong with the copying, please check which files the “copyLib.bat” tries to copy and find out why those files are not there. You can then copy these files manually into the “lib” subdirectory.

The list of required files is:

Filename Copied from
sap.com~tc~bl~offline_launcher~impl.jar ..\configtools\lib
sap.com~tc~exception~impl.jar
sap.com~tc~sec~secstorefs~java~core.jar
iaik_jce.jar
or
iaik_jce_export.jar
The path is read dynamically from the Properties file ..\confgitools\config.properties, Property key “secstorefs.lib” (Windows only); if this path is not found or in Unix, the file is taken from ../../../SYS/global/security/lib/tools/


Uninstalling the tools

If you used SDM for deploying the SDA, you can also use SDM to undeploy the tool. You’ll find it under pcdsupporttools/dc in the Undeployment tab.

Note that undeployment with SDM will not delete the copied jars nor the reports etc. generated under the directory, so if you want to get rid of these, you have to delete them manually.

If you did not use SDM, simply delete your folder from the the j2ee folder (something like \\usr\sap\<SID>\JC<XX>\j2ee\pcdTools). Since nothing is deployed on the engine, no additional action is required.

Starting the tools

Each tool comes with a batch (Windows)/shell script (Linux) from which it can be started.

The Persistence Layer Browser (PlBrowser)

Overview

The PlBrowser is a debugging tool that allows browsing the database content of the PCD. It accesses the database content using the persistence layer (PL) of the PCD.

The tool displays the PL object hierarchy in a hierarchical tree. Nodes in the hierarchy (PlObjects) can be added, modified or deleted. Attributes of PlObjects can be displayed, added, modified or deleted as well.

Changes done with the tool are collected in a Transaction. Commit must be executed explicitly to store the data.

Starting the PlBrowser

Start script: PcdDbBrowser

Functionality of the PlBrowser

The Hierarchy Tree

The hierarchy tree contains three tree roots, one for the actual portal data, one for the personalization and one for the schema data. The tree represents the hierarchy of the PL layer. Delta links cannot be navigated. Nevertheless it is possible to display delta link targets as attribute values:

In this example, the "super admin" role is selected, which in the PL is a Relation (i.e. a Deltalink).

Right-clicking on a node makes a context sensitive menu visible which allows creating new nodes, displaying an Attributes Dialog, searching for relation sources or relation targets and deleting the node including all sub-nodes.

The Attributes Dialog

The attributes dialog consists of two areas: the attributes overview and the attribute values. The overview displays all existing attributes along with their (first) value and their metadata (deltalink type, name, type, etc.). It is also possible to create and delete (with all values) attributes here.

Once an attribute was selected in the overview, the attribute values area displays the values of this attribute. Values can be added and removed here.

The "Database" menu

The "Show" menu

Search for Inconsistencies in the PCD Content

  • Parent-less objects: objects without parent. This can happen if two different threads or cluster nodes modify a sub-tree at the same time without properly using PCD locking
  • Object-less attributes: Should be prevented by the PCD because one PlObject is always stored in one transaction. If such an inconsistency occurs despite of that this can indicate a bug in the database or the database driver
  • Object-less unit attributes: Should be prevented by the PCD because one PlObject is always stored in one transaction. If such an inconsistency occurs despite of that this can indicate a bug in the database or the database driver
  • Object-less relation attributes: Should be prevented by the PCD because one PlObject is always stored in one transaction. If such an inconsistency occurs despite of that this can indicate a bug in the database or the database driver
  • Attribute-less values: Should be prevented by the PCD because one PlObject is always stored in one transaction. If such an inconsistency occurs despite of that
  • Sourceless and targetless links

    Dangling links

    Dangling links do not necessarily indicate a problem, as they are delivered with normal content.

    Other

    The "Utilities" menu

    Can be used for different conversions (Short to long String, Object ID to URL, Attribute ID to name).

    The "Analysis" dialog

    This is displayed if one of the "Show" operations is executed and the inconsistent relations (for example) are displayed:

    The "Save" button opens a File dialog and allows to store the output into a tab-separated text file.

    The PCD Generic Layer Browser (PcdGlBrowser)

    Overview

    The PcdGlBrowser shows the PCD content as hierarchy of IPcdContext objects, including roll-out of deltalinks. Since the JNDI object and state factories are not available, though, semantic objects are not available in this view.

    Starting the PcdGlBrowser

    Start script: PcdGlBrowser

    Functionality of the PlBrowser

    Other than the PlBrowser, the PcdGlBrowser is a read-only tool.

    The Hierarchy Tree

    This shows the PCD context hierarchy (rolling out deltalinks):

    The upper part displays the object hierarchy (the plain folders being yellow, while units are dark blue and unit content pale blue). The lower part of the panel displays the most important context attributes and (only in case of units) unit attributes.

    The Attribute dialog

    Can be reached from the tree using the context menu. Displays all the attributes (including unit attributes) of the selected context.

    The selected attribute's value or values are displayed in the lower part of the dialog. Note that you can switch to another object without closing this window by simply executing the context menu entry in the tree again.

    String and binary values can also be downloaded to a file or displayed in a dialog using UTF8-Decoding which can be helpful, in particular for long String values or XML-content stored in binary attributes:

    The PCD Check tool

    Starting the Check tool

    Start script: PcdCheckTool

    Functionality of the Check tool

    After successful connection, the console displays a prompt:

    Press "help" to see a list of possible commands along with an explanation.

    The PCD Overview generator

    Starting the Overview generator

    Start script: PcdOverview

    Functionality of the Overview generator

    After successful connection, the tool creates a directory /logs/<timestamp>/ and creates some text files containing information that can be used for analyzing the PCD content with respect to size, attribute usage, etc.