WebSphere Lombardi Edition 7.2 > Administer the Lombardi environments > Manage Lombardi Performance Data Warehouses


Use the Performance Data Warehouse command-line tool

The Performance Data Warehouse command-line tool enables you to perform maintenance tasks on your database to ensure optimal run-time performance. When you run the command available with the tool, it generates a SQL script that, when executed, makes the appropriate database changes. You can execute resulting SQL scripts using the database application appropriate for your environment or you can use the execute argument included with the command-line tool.

To use the command-line tool, go to the following directory: [Lombardi_home]\performance-data-warehouse\tools\perfsvrtool

The syntax for invoking the command-line tool is:

perfsvrtool[.cmd or .sh] command-name -[command-arg] [-groups tracking-group-name-1 tracking-group-name-2 ...]

The tool includes the following commands:

archive Archives the snapshots that you specify and marks all the metadata in those snapshots with an ARCHIVED timestamp. Lombardi does not use archived metadata when generating Performance Data Warehouse schema and views. To specify snapshots, use the ID for each snapshot from the SNAPSHOTS view in the performance database. (See Performance Data Warehouse database architecture in Lombardi Authoring Environment User Guide or online help for more information.)
restore Restores the snapshots that you specify by nulling out the ARCHIVED timestamp and allowing the snapshots' metadata to contribute to the Performance Data Warehouse physical schema and views. To specify snapshots, use the ID for each snapshot from the SNAPSHOTS view in the performance database. (See Performance Data Warehouse database architecture in Lombardi Authoring Environment User Guide or online help for more information.)
pending Identifies failed definition records and resolves their pending state. Also enables you to review and then commit pending schema changes from the archive and restore commands.

The following arguments are available for use with the pending command:

The archive and restore commands leave the system with pending representation actions, so you must use the pending command to either preview or execute the schema changes.

-preview Generates a preview of the SQL script generated as a result of the invoked command. No changes are made to the database.
-prepare Generates a preview of the SQL script and prepares the database for the pending actions.
-execute Invokes the command without providing a preview SQL script.

Use the -execute argument with extreme caution. It is executed when the Performance Data Warehouse is running (online), without the ability to review the SQL script prior to its execution. If the scope of changes is complex there is a chance of data loss because during the execution of the command, data might become out of sync, and this might cause a failure from which the system is not be able to recover.

Use the optional -groups attribute to specify individual tracking groups. This attribute is useful when the scope of changes to your tracked performance data is limited to known tracking groups. If you do not specify tracking groups, all groups in the database are processed when the command is executed.


Before running a command

Before running a command, complete the following:


Use the archive command

You can invoke the archive command as shown in the following example:

perfsvrtool.cmd archive [snapshot-id-1 snapshot-id-2 ...]

Where [snapshot-id] is the SNAPSHOT_ID for each snapshot from the SNAPSHOTS view in the Performance Data Warehouse database. See Performance Data Warehouse database architecture in Lombardi Authoring Environment User Guide or online help for more information.

Use the pending command to complete the archive. You can use the pending command with the -preview argument to review the changes before executing them. Or you can simply execute the archive using the pending command with the -execute argument.


Use the restore command

You can invoke the restore command as shown in the following example:

perfsvrtool.cmd restore [snapshot-id-1 snapshot-id-2 ...]

Where [snapshot-id] is the SNAPSHOT_ID for each snapshot from the SNAPSHOTS view in the Performance Data Warehouse database. See Performance Data Warehouse database architecture in Lombardi Authoring Environment User Guide or online help for more information.

Use the pending command to complete the restore. You can use the pending command with the -preview argument to review the changes before executing them. Or you can simply execute the restore using the pending command with the -execute argument. Both options are


Use the pending command

To invoke the pending command with the -preview argument:

  1. Run the pending -preview command against the performance database as shown in the following example:

    perfsvrtool.cmd pending -preview c:\temp\PS_pending_script.sql

  2. Review the SQL script that was saved to the specified output file (c:\temp\PS_pending_script.sql).

To invoke the pending command with the -prepare argument:

  1. Run the pending -prepare command against the performance database as shown in the following example:

    perfsvrtool.cmd pending -prepare c:\temp\PS_pending_script.sql

    The command-line tool creates the SQL script and prepares to move the pending records to the database. During this time, data loading is disabled until the pending actions are complete.

  2. Stop all Performance Data Warehouses.
  3. Review the SQL script that was saved to the specified output file (c:\temp\PS_pending_script.sql).
  4. Execute the SQL script against the performance database using the database maintenance tool of your choice.

    The pending records are added to the database.

  5. Restart all Performance Data Warehouses.

Use the pending -execute command only in a development environment where potential data loss is not a concern.

To invoke the pending command with the -execute argument:

Parent topic: Manage Lombardi Performance Data Warehouses

+

Search Tips   |   Advanced Search