Table of Contents

Search

  1. Preface
  2. Introduction to the Stored Procedure Accelerator for Oracle
  3. Masking Stored Procedures and User-Defined Table Functions
  4. Stored Procedure Accelerator Setup
  5. Stored Procedure Accelerator Rules

Stored Procedure Accelerator Guide for Oracle

Stored Procedure Accelerator Guide for Oracle

Creating the Clean Up Procedure Job

Creating the Clean Up Procedure Job

Schedule the clean up procedure job.
  1. Open the following file in Notepad:
    <Dynamic Data Masking installation>\Accelerators\StoredProcedureMasking\sql\Oracle\CLEAN_TEMP_OBJECTS_JOB_CREATION_TEMPLATE.sql
  2. Use SQL Developer to log in to the database as an administrator.
  3. Paste the text of the CLEAN_TEMP_OBJECTS_JOB_CREATION_TEMPLATE.sql file into the SQL Worksheet.
  4. Search the text for the following keywords and edit the property values based on the user and client requirements:
    <SchemaName_where_package_is_created>
    The name of the schema in which you created the DDM_MASKING_SP package.
    <seconds>
    The value of the CLEANUP_TEMP_OBJECTS procedure created_before_seconds argument.
    <schema_name>
    The name of the temporary schema where the accelerator creates the temporary objects.
  5. Run the script.
  6. Use the following SQL command to verify that the job was created successfully:
    select * from ALL_SCHEDULER_JOBS
The following text is an example execution script with the edited keyword values in bold:
BEGIN -- create ddm clean-up job DBMS_SCHEDULER.CREATE_JOB ( job_name => 'clean_ddm_temp_object', job_type => 'STORED_PROCEDURE', job_action => '
DDMADMIN
.DDM_MASKING_SP.CLEANUP_TEMP_OBJECTS', number_of_arguments => 2, start_date => sysdate + 10/(24*60*60), -- start after 10 seconds repeat_interval => 'FREQ=HOURLY;BYMINUTE=0', end_date => null, comments => 'DDM Temporary Object Clean-Up'); -- setting job arguments DBMS_SCHEDULER.SET_JOB_ARGUMENT_VALUE ( job_name => 'clean_ddm_temp_object', argument_position => 1, argument_value => '
300
'); -- delete TEMP-OBJECTS created before 300 seconds from JOB-Execution time. DBMS_SCHEDULER.SET_JOB_ARGUMENT_VALUE ( job_name => 'clean_ddm_temp_object',| argument_position => 2, argument_value => '
DDMTEMPDB
'); -- schema_name of DDM Temporary Schema (IN CAPs) from where to delete the temporary objects -- enable ddm clean-up job DBMS_SCHEDULER.ENABLE('clean_ddm_temp_object'); END;

0 COMMENTS

We’d like to hear from you!