Promoting Metadata Labels Managing Metadata Labels in the MDS Repository

14-30 Oracle Fusion Middleware Administrators Guide For information about Oracle Scheduler, see Oracle Scheduler Concepts and Creating, Running, and Managing Jobs in the Oracle Database Administrators Guide.

14.5.1 Purging Oracle Infrastructure Web Services Data

Use the following script to purge data if WS-RM uses a database store: ORACLE_COMMON_HOMEcommonsqlows_purge_wsrm_msgs.sql

14.5.2 Purging Oracle WebCenter Data

The following topics describe purging Oracle WebCenter data: ■ Purging Oracle WebCenter Activity Stream Data ■ Purging Oracle WebCenter Analytics Data ■ Partitioning Oracle WebCenter Analytics Data

14.5.2.1 Purging Oracle WebCenter Activity Stream Data

Oracle WebCenter Activity Streaming provides a set of WLST commands for purging database records in a nonpartitioned environment. Purging is necessary when a database contains records that are not needed as an analysis in reports or when the performance of Oracle WebCenter decreases because of the large volume of data. To purge Oracle WebCenter Activity Stream data, you use the following WLST commands: ■ archiveASByDate: Archives activity stream data that is older than a specified date. ■ archiveASByDeletedObjects: Archives activity stream data associated with deleted objects ■ archiveASByClosedSpaces: Archives activity stream data associated with Spaces that are currently closed. ■ archiveASByInactiveSpaces: Archives activity stream data associated with Spaces that have been inactive since a specified date. ■ restoreASByDate: Restores archived activity stream data from a specified date into production tables. Note that you must invoke the WLST script from the Oracle home containing Oracle WebCenter Activity Streaming. Do not use the WLST script in the WebLogic Server home. For more information about these commands, see Activity Stream in the Oracle Fusion Middleware WebLogic Scripting Tool Command Reference.

14.5.2.2 Purging Oracle WebCenter Analytics Data

Oracle WebCenter Analytics provides a script for purging database records in a nonpartitioned environment. Purging is necessary when a database contains records that are not needed for analysis in reports or when the performance of Oracle WebCenter decreases because of the large volume of data. The script, analytics_purge_facts.sql, deletes all fact tables that meet the specified criteria. When Oracle WebCenter Analytics runs in a partitioned environment, you should use the drop partitioning feature of the database before running these scripts. Managing the Metadata Repository 14-31

14.5.2.2.1 Loading the Oracle WebCenter Purge Package Before you run the script for the

first time, you must install the purge package into the database by running the analytics_purge_package script: 1. Log in to the database as the schema user for the ACTIVITIES schema. 2. Execute the analytics_purge_package script. For example, for an Oracle Database: ORACLE_HOMEoracle_commoncommonsqloracleanalytics_purge_package.sql For a DB2 database, use the following command: db2 -td -f analytics_purge_package.sql

14.5.2.2.2 Running the Oracle WebCenter Purge Script The location of the analytics_purge_

facts.sql script differs depending on the type of database used: ■ Oracle Database: ORACLE_HOMEoracle_commoncommonsqloracleanalytics_purge_facts.sql ■ SQL Server: ORACLE_HOMEoracle_commoncommonsqlsqlserveranalytics_purge_facts.sql ■ DB2: ORACLE_HOMEoracle_commoncommonsqldb2analytics_purge_facts.sql The analytics_purge_facts.sql script takes the following parameters: ■ Month From: The script purges data that was created after the beginning of the specified month. Enter the month in the format MM. For example, 08 to specify August. ■ Year From: With the Month From parameter, the script purges data that was created after the beginning of the specified month in the specified year. Enter the year in YYYY format. For example, 2010. ■ Month To: The script purges data that was created through the end of the specified month. Enter the month in the format MM. For example, if you specify 09 for September, the script purges all data that was created before the end of September. ■ Year To: With the Month To parameter, the script purges data that was created through the end of the specified month in the specified year. Enter the year in YYYY format. For example, 2010. ■ Record Batch Size: The maximum size of records to commit at one time. ■ Max Run Time: The maximum amount of time, in minutes, that the you want the process to run. When the process reaches this time, it stops, regardless of the progress of the purge. When you are using an Oracle Database or a DB2 database, the script prompts you for input for each parameter. When you are using a SQL Server database, you must edit the analytics_purge_ facts.sql script to specify the criteria for purging data. Note: You cannot delete the current month. If you specify the current month, the script returns an error.