My Oracle Support Banner

How to Manually Run Purge Deletes for P6 (Doc ID 902292.1)

Last updated on DECEMBER 05, 2018

Applies to:

Primavera P6 Enterprise Project Portfolio Management - Version 5.0 and later
Primavera P6 Professional Project Management - Version 5.0 and later
All Platforms

Goal

This document explains how to manually run Purge Deletes via scripts by running stored procedures CLEANUP_LOGICAL_DELETES & REFRDEL_CLEANUP. For complete information about the Background Jobs please refer to Chapter Database Administration in the Administration Guide.

The following link will take you to the General site for the Primavera P6 Enterprise Project Portfolio Management Documentation Libraries

The Project Management runs two stored procedures to clean up logically deleted data:
  • Cleanup_Logical_Deletes - removes data table records that are logically deleted with delete_session and delete_date entries older than the last active user session.
  • Referdel_Cleanup - removes REFRDEL table entries older than the last active user session.
The following Variables are used in Oracle:
  • pret_val - output - Used to figure out what message it is going to return if error, used to set the number of rows changed or deleted during store procedure run
  • pret_msg - output - Used to return the message from a error
  • errorlevel - setting the error level/severity for the stored procedure.
  • day - input - parameter used within stored procedure to set the delete_date
The process to remove logically deleted records is NOT dependent on REFRDEL entries being present, so the two stored procedures can be run independently. It is recommended that everyone be out of the database before running either of the scripts, as this can cause a performance hit.

Solution

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Goal
Solution
 To manually run Purge Deletes in P6 versions 6.x and later, run the following two stored procedures:
 To manually execute Purge Deletes in Project Management version 5.0 on the database server using scripts, execute scripts as described below for CLEANUP_LOGICAL_DELETES and REFRDEL_CLEANUP:

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.