6 Managing Oracle User Messaging Service

This chapter describes how to manage Oracle User Messaging Service (UMS). It discusses how to deploy, undeploy and register UMS drivers by using Oracle Enterprise Manager Fusion Middleware Control using the configuration wizard. It also describes the procedure used to purge database records that are no longer need by the UMS DB schema.

This chapter includes the following topics:

6.1 Deploying Drivers

When you install Oracle UMS, preinstalled drivers are included (Email, XMPP, SMPP, and Twitter). Among these drivers, only one or a few drivers are deployed to the WebLogic Server, depending on the template that is used when creating the domain.

You can deploy additional drivers by using the expandable server groups in the Fusion Middleware Configuration Wizard while updating your domain.

6.1.1 Deploying Drivers Using the Fusion Middleware Configuration Wizard

Follow the instructions on this section to deploy drivers using the Configuration Wizard.

Task 1   Starting the Configuration Wizard

Start the Configuration wizard as described in "Starting the Configuration Wizard" in Oracle Fusion Middleware Creating WebLogic Domains Using the Configuration Wizard. The Configuration Type screen is displayed.

Task 2   Selecting a Configuration Type

On the Configuration Type screen, select Update an Existing Domain.

Select the domain directory from the Domain Location drop-down list, or click Browse to navigate to and select the domain directory. Click Next to continue. The Templates screen appears.

Task 3   Updating an Existing Domain Using Product Templates

On the Templates screen, select Update Domain Using Product Templates and then select the check box for JRF template to add to your domain as shown in the following figure.

Click Next and follow the configuration wizard screens till the Managed Servers screen appears, as described in "Updating WebLogic Domains" in Oracle Fusion Middleware Creating WebLogic Domains Using the Configuration Wizard.

FMW Config Wizard to update an existing domain
Task 4   Assigning User-Expandable Server Groups to Managed Servers

On the Managed Servers screen, for each managed server, select the check box for the server group that corresponds to the driver that shall be targeted to that managed server. It is possible to select multiple drivers as shown in the following figure.

For more information about user-expandable server groups, see "Configuration Wizard Screens" in Oracle Fusion Middleware Creating WebLogic Domains Using the Configuration Wizard.

Note:

A new driver called GCM (Google Cloud Messaging) Driver is included in UMS in release 12.2.1. This driver is included as a preview feature in the release and, is not generally available.
FMW Config wizard to specify server groups
Task 5   Completing the Configuration

Complete the configuration by following the configuration wizard screens described in "Updating WebLogic Domains" in Oracle Fusion Middleware Creating WebLogic Domains Using the Configuration Wizard.

6.2 Using UMS Schema Purge Script

ums_cleanup.purge is a PL/SQL procedure used to purge records that are no longer needed by the UMS DB schema. The procedure purges DB records from Oracle databases based on their age. It is highly recommend that the first two or three runs of the procedure be performed by a certified DBA.

WARNING:

This procedure will delete DB records from the UMS DB tables and commit instantly. It is impossible to rollback. The deleted records cannot be recovered. It is recommended to backup these tables before purging.

The purge reduces inbound and outbound message entries from UMS tables. Table 6-1 shows the tables in which records are purged:

Table 6-1 Records purged in UMS DB tables

Name of the Table Records Purged

MESSAGE

Outbound/Inbound messages and their attributes

ADDRESS

Sender and recipient addresses

DELIVERY_ATTEMPT

Records of deliveries

STATUS

Statuses of message deliveries

DELIVERY_CONTEXT

Records of deliveries


6.2.1 Purging UMS DB Schema Records

ums_cleanup.purge() takes a single parameter, that is, days_of_retention.The value of this parameter is a positive integer or a float number that signifies the number of days. The procedure deletes any records that are older than the specified number of days from the UMS DB schema. For example, ums_cleanup.purge(30.5) will delete all records that are older than 30 days and 12 hours.

Note:

The value of days_of_retention must be greater than or equal to seven days.

To purge records in UMS DB schema, perform the following tasks:

  1. Shut down all Mid-tier servers that are using the UMS schema.

  2. Set SQL Plus Options as shown below:

    set serveroutput on
    set autocommit off
    
  3. Invoke the procedure with the desired days_of_retention parameter from SQL Plus to purge records that are no longer needed. To delete entries older than 100 days, run the following command:

    SQL> call ums_cleanup.purge(100);
    

    Note:

    If the UMS schema has not been cleaned up for a long time and there are many rows in the tables, it is recommended that you purge it in multiple small steps. For example, if the instance has been heavily used for six months and you want to keep records from the last 30 days, purge the schema gradually in small steps: 170, 160, …, 30.
  4. Start all Mid-tier servers that were shut down during the purging process.