D Deleting Unwanted Objects from the Repository

You can learn how to use the command-line pruning utility, prunerpd, to delete unwanted objects in the Oracle BI repository.

You can only use prunerpd with binary repositories in RPD format.

This appendix contains the following topics:

About the Object Pruning Utility

If you have a large number of extraneous or unwanted objects in your repository, you can delete the unwanted objects using the prunerpd command-line utility.

You can use prunerpd on both Windows and UNIX systems.

You can delete unwanted repository objects such as databases, tables, columns, initialization blocks, and variables. The pruning utility does not remove objects from the Oracle BI Presentation Catalog.

Deleting objects from the repository has a cascading effect. For example, if a physical column is deleted, then any mapped logical columns are deleted, as well as any associated presentation columns, see Deletion Rules for the Object Pruning Utility.

Using the Object Pruning Utility

You must create the input file that contains the list of repository objects to delete, and then, run the object pruning utility at the command line, passing the input file as an argument.

This section contains the following topics:

Creating the Input File

The prune utility accepts the list of repository objects you want to delete as a text file.

The utility can accept multiple input files at a time. The syntax rules for the input file are shown in the table.

Note:

Object names in the input file must match the fully qualified name that is used in the repository. Wildcards such as "*" and "?" are not supported in the object name.

Object Type Example Action

Database

D "Paint"

Deletes the database named "Paint."

Table

  • T "W_AGREE_D"

  • T "DB"."Catalog"."Schema"."Table"

  • Deletes the table or alias named "W_AGREE_D" from the Physical layer.

  • Deletes the table or alias named "Table" from the schema named "Schema," contained in the catalog named "Catalog," located in the database named "DB," from the Physical layer.

Column

C "W_AGREE_MD"."AGREE_CD"

Deletes the column named "AGREE_CD" located in a table or alias named "W_AGREE_D" from the Physical layer.

Initialization block

I "External Metadata Strings"

Deletes the initialization block named "External Metadata Strings."

Variable

V CURR_USER

Deletes the variable named "CURR_USER."

For example, a text file that contains instructions to delete a database named Stock Quotes and a physical column named S_NQ_ACCT"."USER_NAME would include the following entry:

D "Stock Quotes" C "S_NQ_ACCT"."USER_NAME"

Use white space as a delimiter in the input file, a single space, tab, or multiple spaces.

Running the prunerpd Utility

Learn how to use the prunerpd utility.

The location of the prunerpd utility is:

BI_DOMAIN/bitools/bin

Syntax

The prunerpd utility accepts the following parameters:

prunerpd -s source_rpd [-p rpd_password] -f input_file -o output_rpd -l output_log_file -e error_log_file [-8]

Where:

source_rpd is the name and location of the target repository file.

rpd_password is the repository password for the source repository.

The password argument is optional. If you do not provide a password argument, you are prompted to enter a password when you run the command. To minimize the risk of security breaches, Oracle recommends that you do not provide a password argument either on the command line or in scripts. The password argument is supported for backward compatibility only, and are removed in a future release. For scripting purposes, you can send the password through standard input.

input_file is the input file name, in text format, that contains the list of repository objects to remove. Separate multiple file names by spaces. Enclose spaces within a filename with double quotes (" ").

output_rpd is the name and location of the output repository file, also known as the pruned repository.

output_log_file is the name and location of the output log file. All actions performed on the repository are written to this file, including descriptions. The output log file is in XML format. Other messages such as progress indicators are sent to the standard output stream.

error_log_file is the name and location of the error log file. The pruning utility writes exceptions and errors to this log. The error log file is in XML format. Other errors are sent to the standard output error stream.

-8 specifies UTF-8 encoding.

Use -H or run .sh without any parameters to display the help content.

Example

prunerpd -s C:/OBI/Server/Repository/BIApps.rpd 
-f "C:/Remove Oracle EBS Objects.txt"
-o "C:/OBI/Server/Repository/BIApps Pruned.rpd"
-l "C:/temp/BIApps Prunning.log" -e "C:/temp/ BIApps Prunning.err"
Give password: my_repos_password

Deletion Rules for the Object Pruning Utility

Deleting repository objects has a cascading effect.

This section describes the deletion rules.

Physical Layer Rules

  • If a physical column or a table is deleted, then all of the affected keys, foreign keys, and complex joins are deleted as well. The internal obsolete attribute definition (attr defn) that links a logical column to a physical column is also removed.

  • Empty schemas, catalogs, and databases are removed.

  • If a table is deleted, then all its columns are deleted.

Logical Table Rules

  • If a regular column, not an aggregate or derived column, is not mapped in any logical source, then it is deleted. The keys, including the level key and the logical key, are also removed.

  • If the source column for a derived column or its referenced variable is deleted (corrupted), then the column is removed.

  • If an aggregate rule or override aggregate rule for an aggregate column is corrupted, due to deleting a logical column, then the column is removed.

  • If a logical table is removed, because its underlying physical table was deleted, then the keys, foreign keys, logical joins, sources, and source folder are removed.

  • If a logical table source does not have any valid mapping, then it is deleted.

  • If a logical table source is retained, but its aggregate content or filters are corrupted, then the corresponding expressions are set to null. The join specification is also removed.

  • If a logical table, dimension, or business model is empty, does not contain a meaningful child object, then it is deleted.

Presentation Layer Rules

  • If a logical column is removed, because its underlying physical column was deleted, then any corresponding presentation columns are removed.

  • If a presentation table or subject area does not contain children, then it is removed.

Security Rules

  • If a security filter for a user or application role becomes corrupt due to deletion, then the filter is removed. If all filters are removed for a user or application role, then the internal privilege object is deleted.

  • Even if all filters for an application role are deleted, the application role is still maintained.

  • To remove an application role from the repository, you must explicitly delete it. See Security Guide for Oracle Business Intelligence Enterprise Edition for information about deleting application roles.

Variable Rules

  • Initialization blocks are deleted if the underlying connection pool is deleted.

  • Repository and session variables are deleted if the associated initialization blocks are deleted.

  • If a session variable is deleted and its parent initialization block does not contain variables, then the initialization block is removed.

  • If an initialization block is deleted, then its variables are removed.

Marketing Rules

  • Qualified list items are deleted if the associated cache catalog, GUID column, or qualified column is deleted.

  • Target levels are deleted if the associated catalog (Segmentation Catalog name) is deleted.

  • List catalogs are deleted if the associated catalog, table, or column is deleted.

  • Conforming dimensions are deleted if the associated catalog, table, or column is deleted.