26 Converting Nonpartitioned Classes to Partitioned Classes

If you did not enable partitioning for storable classes when you installed Oracle Communications Billing and Revenue Management (BRM), follow the procedures in this chapter to convert specified nonpartitioned storable classes to partitioned storable classes in the BRM database.

Before partitioning your storable classes, read the following:

About Converting Nonpartitioned Classes to Partitioned Classes

If you did not enable partitioning for event classes when you installed BRM, use the BRM partitioning conversion feature to do so after installation.

The partitioning conversion feature splits a specified storable class table in the BRM database into the following partitions:

  • partition_migrate: Holds all objects created before the conversion. The BRM purge utility, "partition_utils," cannot purge objects in this partition. To purge them, you must develop your own tools based on sound Oracle database management principles.

  • partition_historic: Holds nonpurgeable events created after the conversion. Nonpurgeable events should not be purged from the database. See "Event Objects Stored in partition_historic."

  • partition_last: A spillover partition that is not intended to store objects you want to purge or preserve. If you do not add purgeable partitions to your tables before BRM resumes generating objects, purgeable objects created after the upgrade are stored in this partition.

Software Required for Table Partitioning

Before converting nonpartitioned storable classes to partitioned storable classes, you must install the following software:

  • Third-Party software, which includes the PERL libraries and JRE required for installing BRM components. See "Installing the Third-Party Software" in BRM Installation Guide.

  • BRM.

  • Oracle Database with Oracle Partitioning.

  • Perl.

For information about supported software versions, see "BRM Software Compatibility" in BRM Installation Guide.

Converting Nonpartitioned Classes to Partitioned Classes

To convert nonpartitioned classes to partitioned classes, perform these tasks:

  1. Increasing Disk Space for Tables and Indexes

  2. Installing the Partitioning Package

  3. (Optional) Reconfiguring the Parameters in partition.cfg

  4. Merging the pin_setup.values File

  5. Backing Up Your BRM Database

  6. Running the Partitioning Conversion Scripts

  7. Adding Purgeable Partitions to Tables

  8. Restarting BRM

Increasing Disk Space for Tables and Indexes

Before adding partitions to your tables, you should increase the disk space allocated for the tables and indexes in your BRM database.

Tip:

Oracle recommends that you add enough space for 6 to 12 months of data.

Installing the Partitioning Package

To install the partitioning conversion scripts and files, follow this procedure.

Note:

If you already installed the partitioning package, features in that package cannot be reinstalled without first being uninstalled. To reinstall a feature, uninstall it, and then install it again.

To install the partitioning package:

  1. Download the software to a temporary directory (temp_dir).

    Important:

    • If you download to a Windows workstation, use FTP to copy the .bin file to a temporary directory on your UNIX server.

    • You must increase the heap size used by the Java Virtual Machine (JVM) before running the installation program to avoid ”Out of Memory” error messages in the log file. See "Increasing Heap Size to Avoid 'Out of Memory' Error Messages" in BRM Installation Guide.

  2. Make sure no users are logged on to BRM.

  3. Go to the directory where the Third-Party package is installed and source the source.me file.

    Caution:

    You must source the source.me file to proceed with installation. Otherwise, ”suitable JVM not found” and other error messages appear.

    Bash shell:

    source source.me.sh
    

    C shell:

    source source.me.csh
    
  4. Go to temp_dir and enter this command:

    7.5.0_PartitionUpg_platform_32_opt.bin
    

    where platform is the operating system name.

    Note:

    You can use the -console parameter to run the installation in command-line mode. To use the graphical user interface (GUI) for installation, make sure you have X Windows installed in your computer.
  5. Follow the instructions displayed during installation. The default installation directory for the partitioning package is opt/portal/7.5.

    Note:

    The installation program does not prompt you for the installation directory if BRM or the partitioning package is already installed on the machine and automatically installs the package at the BRM_Home location.
  6. Go to the directory where you installed the partitioning package and source the source.me file:

    Bash shell:

    source source.me.sh
    

    C shell:

    source source.me.csh
    

(Optional) Reconfiguring the Parameters in partition.cfg

The partitioning conversion configuration file, partition.cfg, controls the parameters of your conversion. If necessary, change the parameters to meet your business requirements.

To reconfigure the parameters in the partition.cfg file:

  1. Log in as user pin, go to BRM_Home/upgrade/partition, and open the partition.cfg file in a text editor such as vi:

    % su - pin
    % cd BRM_Home/upgrade/partition
    % vi partition.cfg
    
  2. Change the default parameters as necessary. For information on each parameter, see the comments in the partition.cfg file.

    For example, modify the following parameters:

    • The list of general Oracle database scripts to run:

      @SQL_OFFLINE1 = ( "pin_upg_common.sql");
      

      Include the appropriate class_name_tables_tobe_partitioned.sql script for each class table you want to partition whose script is not listed in this parameter by default. See About the Conversion Scripts and Files.

    • The list of class tables to partition:

      @SQL_PARTITION_TABLES = ("journal_tables_tobe_partitioned.sql");
      

      Remove class tables already partitioned.

    • The list of partition scripts to run:

      @SQL_PARTITION = ("make_indexes_partition_ready.sql", "optional_partition.sql");
      
    • List of all scripts, in sequential order, that will be run by the partitioning.pl script.

      @ALL_SCRIPTS = (@SQL_OFFLINE1, @SQL_PARTITION_TABLES, @SQL_PARTITION);
      

Merging the pin_setup.values File

Copy any customizations from your backed-up pin_setup.values file into the BRM_Home/setup/pin_setup.values file.

Backing Up Your BRM Database

Make a complete offline backup of your BRM database, and make sure the backup is completely valid and usable. For more information on performing full database backups, see your database software documentation.

In addition to the backup, use the Oracle export utility to export all BRM tables. This helps you restore individual tables if necessary.

Running the Partitioning Conversion Scripts

Converting from a nonpartitioned class to a partitioned class should take about 30 minutes. The size of your tables does not affect the speed of this conversion.

Run the partitioning conversion scripts:

% cd BRM_Home/upgrade/partitioning
% perl partitioning.pl

This runs a series of scripts that perform the nonpartitioning-to-partitioning conversion.

Check the log and pinlog files in the directory specified by the UPGRADE_LOG_DIR parameter in your partition.cfg file (by default, BRM_Home/upgrade/partition/sqllog). These log files show how long each script took to execute and list any errors that occurred.

Important:

If errors are reported, fix them, and rerun the script.

Adding Purgeable Partitions to Tables

Before your BRM system resumes generating data, use the "partition_utils" script to add purgeable partitions to your newly partitionable tables. See "Adding Partitions".

Restarting BRM

Start all BRM processes. See "Starting and Stopping the BRM System."

Note:

The object IDs of objects generated in your newly partitioned class will be larger than the object IDs of objects generated in your old, nonpartitioned class. (Depending on the table, object IDs are stored in either the POID_ID0 field or the OBJ_ID0 field.)

About the Conversion Scripts and Files

Table 26-1 lists the scripts and files used to convert your nonpartitioned class tables to partitioned class tables. These scripts and files are in the BRM_Home/upgrade/partition folder.

Important:

To convert custom class tables, you might need to create additional SQL scripts. To use custom scripts in the conversion, add appropriate SQL file entries to the nonpartitioning-to-partitioning conversion configuration file, partition.cfg. See "(Optional) Reconfiguring the Parameters in partition.cfg".

Table 26-1 Conversion Scripts and Files

Script or File Description

crt_pinlog.sql

SQL script that creates the pinlog files.

partition.cfg

Configuration file in which you must enter details about the Oracle database configuration before you run the conversion scripts. All the conversion Perl scripts parse this file to get the database connection parameters.

partitioning.pl

Master Perl script for the conversion process. This script calls other SQL scripts to perform the conversion.

pin_upg_common.sql

SQL script that creates the common routines needed for the conversion.

class_name_tables_tobe_partitioned.sql

Custom SQL scripts that implement partitioning for the specified class (class_name).

make_indexes_partition_ready.sql

optional_partitioning.sql

SQL scripts that implement partitioning.

upg_oracle_functions.pl

Perl script that performs many miscellaneous conversion tasks related to the BRM database.