Professional Documents
Culture Documents
White Paper On Otl Archive and Purge
White Paper On Otl Archive and Purge
www.Fullinterview.com Page 1 of 20
White Paper on Oracle Time and Labor (OTL) Archive and Purge Process
1 INTRODUCTION.....................................................................................................................................3
3 TECHNICAL DETAILS.........................................................................................................................5
3.1 Points to Remember....................................................................................................................6
3.2 Package and Procedure Details...............................................................................................8
3.3 Algorithm and Technical Details..............................................................................................8
www.Fullinterview.com Page 2 of 20
White Paper on Oracle Time and Labor (OTL) Archive and Purge Process
1. Introduction
Oracle Time & Labor is an e-business suite solution to your requirements for
time capture, validation, time management, and approval.
You can archive timecards you no longer access to release disk storage space
and potentially improve OTL performance. When you archive a timecard, its
detail is moved to archive tables, and summary information remains accessible.
The summary information appears in windows that display summary
information and in reports to assure users that the timecard exists, even if they
cannot update or view the timecard details.
When you archive a timecard, its detail is moved automatically to archive tables,
but summary information remains accessible in windows that display summary
information and in reports. In this way, users can remain confident that their
timecards exist, even if they cannot view or update timecard details."
Intended Audience
This paper is intended for readers who have the desire to understand the
concept and architecture of OTL tables. Reader must possess fair knowledge of
Oracle and the concept of Oracle Time and Labor to understand this document.
The scope of this document is to detail the requirements for OTL tables Archive
and Purge process.
The OTL processes are standard process and one must be aware of how/when
to run and know the pre-requisite setups. The document will be helpful for
Oracle Project/OTL folks to understand the process, to know about the
packages and procedures being called. This process is required for better
performance of daily running jobs in a Production Environment.
How do workers enter their time using Oracle Time & Labor?
Workers use a self service web page in the format of a timecard. You can create
different timecard layouts for each group of workers so that they only see the
fields that are relevant to them. You can rearrange the fields on the layouts, edit
www.Fullinterview.com Page 3 of 20
White Paper on Oracle Time and Labor (OTL) Archive and Purge Process
the lists of values, and rewrite the instruction text to make it easy for your
workers to fill out their timecards quickly and accurately.
Workers on the move can enter their time and labor data in a spreadsheet and
upload it later to the application.
Workers can also use other entry devices such as time clocks, telephones, or
legacy entry systems. You can easily enter this data into Oracle Time & Labor
using the robust timecard API.
By moving the data off the live tables to the backup tables, the Archive Data set
process safely creates the backup copy of your old data. While the backup
tablespace can be taken offline and can be stored with some cheaper memory,
we recommend that the online tables are effectively re-organized and the spaces
reused completely. While reorganizing tables is a DBA activity, ensure that all
dependent objects involved with the above tables are considered as part of
reorganizing activity.
www.Fullinterview.com Page 4 of 20
White Paper on Oracle Time and Labor (OTL) Archive and Purge Process
3. Technical Details
1. Set up the OTL Advanced Process Administrator responsibility. You set up
the OTL Advanced Process Administrator responsibility to define data sets and
run the Archive and restore processes.
The programs are available to the standard responsibility. For business needs,
the processes/programs could be added to any custom request group (ALL
Projects and OTL Programs) attached to any custom responsibility. This way we
need not have to request for the standard responsibility.
2. Set the following profile options at the responsibility level for the
responsibility level OTL Advanced Process Administrator/ custom
responsibility to which the programs have been added. The following profile
options could be given any value depending on the Business Needs.
www.Fullinterview.com Page 5 of 20
White Paper on Oracle Time and Labor (OTL) Archive and Purge Process
OTL: Minimum Age of Data Set for Archiving: 6 (This is the minimum
value from Profile values LOV)
3. For the Custom Responsibility, the profile options should have the Hierarchy
Type Access Level set to VISIBLE and UPDATABLE. This is to ensure that the
profile options can be set at responsibility level.
For Eg.
www.Fullinterview.com Page 6 of 20
White Paper on Oracle Time and Labor (OTL) Archive and Purge Process
1. Defining a data set would depend on the week ending date. It will by
default pick up all weeks periods in which the timecards lie.
For Eg. This query will let you know the number of records that would
be fetched initially. The count will differ because of the scope column.
Here the start date is 10-JUN-2008 and end date 14-JUN-2008
www.Fullinterview.com Page 7 of 20
White Paper on Oracle Time and Labor (OTL) Archive and Purge Process
3. Archive Data Set process and Restore Data set processes are DML
intensive Programs and works best when the load on the application is
minimal.
5. Good data sets are small data sets, because they let you Archive and
Restore easily.
6. Since the processes are DML intensive, it would be best to have the
schema statistics gathered at maximum possible percentage after
each run. After every couple of executions of Archive or Restore
Process, it is recommended that you run the Gather Schema Statistics
program for the entire HXC schema or run the Gather Table Statistics
for both the live and archive tables for best results
HXC_AP_DETAIL_LINKS
HXC_APP_PERIOD_SUMMARY
HXC_TC_AP_LINKS
HXC_TIME_ATTRIBUTE_USAGES
HXC_TIME_ATTRIBUTES
HXC_TIME_BUILDING_BLOCKS
HXC_TRANSACTION_DETAILS
HXC_TRANSACTIONS
into
HXC_AP_DETAIL_LINKS_AR
HXC_APP_PERIOD_SUMMARY_AR
HXC_TC_AP_LINKS_AR
HXC_TIME_ATTRIBUTE_USAGES_AR
HXC_TIME_ATTRIBUTES_AR
HXC_TIME_BUILDING_BLOCKS_AR
HXC_TRANSACTION_DETAILS_AR
HXC_TRANSACTIONS_AR
www.Fullinterview.com Page 8 of 20
White Paper on Oracle Time and Labor (OTL) Archive and Purge Process
8. After a set of data has been marked for Archival and then restored
later, the same dates cant be used again for defining another data set.
That will result in ERROR: There is an existing Data Set whose range
overlaps with the period specified.
9. In case the process errors out due to an unforeseen error, ensure you
rerun the process to successful completion
Module
Name Package/Procedure Description
This procedure defines the
data set which has to be
archived and marks the
records with a data set id.
This will uniquely
identify the set of
records to be archived
Define Data Set hxc_archive_restore_process.define_data_set as a group in future.
This procedure validates if
Validate Data the records are fit for
Set hxc_archive_restore_process.validate_data_set archival
This procedure deletes the
records from the live tables
Archive Data and inserts them in the
Set hxc_archive_restore_process.archive_data_set archive tables
This procedure restores the
Restore Data data from archive tables to
Set hxc_archive_restore_process.restore_data_set live tables
Undo Define This procedure is used to
Data Set hxc_archive_restore_process.undo_define_data_set undo the defined data set
www.Fullinterview.com Page 9 of 20
White Paper on Oracle Time and Labor (OTL) Archive and Purge Process
Enter a unique name for the data set, for example, March 2003.
You use this defined data set name throughout the archiving
process.
Enter the date range. For example, to archive all timecards for
March 2003, enter 01-Mar-2003 in the Data Set Start Date field
and 31-Mar-2003 in the Data Set End Date field.
Brief Description
Validates that a data set with the same name does not exist in the
hxc_data_sets table.
More Details:
Calls hxc_archive_restore_process.define_data_set
3. Call hxc_data_set.mark_tables_with_data_set
www.Fullinterview.com Page 10 of 20
White Paper on Oracle Time and Labor (OTL) Archive and Purge Process
After Running the Program you should notice some of the following
points:
Brief Description:
Validates how many unretrieved timecards are there in submitted,
approved, rejected and working status.
If the no of errors exceed the value set for profile option OTL: Max
Errors in Validate Data Set then sets validation status in
hxc_data_sets to E.
More Details:
Calls hxc_archive_restore_process.validate_data_set
www.Fullinterview.com Page 11 of 20
White Paper on Oracle Time and Labor (OTL) Archive and Purge Process
3. From the data set marked, fetch all the errored records (between
the date ranges) fetch and display all non retrieved records,
except ERROR records.
2) REJECTED
3) SUBMITTED
4) WORKING
7. If there are any records which have not been retrieved yet, then
validation_status will be marked with E.
Brief Description:
www.Fullinterview.com Page 12 of 20
White Paper on Oracle Time and Labor (OTL) Archive and Purge Process
Takes a count of the live and archive tables before the archival.
Starts the archival process. First deletes all records from temp
table hxc_temp_timecard_chunks. Then inserts records from live
tables (one by one all tables mentioned above) limited to the chunk
size in temp table. Then inserts into corresponding archive tables.
More Details:
Calls hxc_archive_restore_process.archive_data_set
www.Fullinterview.com Page 13 of 20
White Paper on Oracle Time and Labor (OTL) Archive and Purge Process
--Call hxc_archive_restore_utils.core_table_count_snapshot
--Call hxc_archive_restore_utils.bkup_table_count_snapshot
After Running the Program you should notice some of the following:
(View Log for more details)
hxc_time_building_blocks_ar 6544
hxc_time_attribute_usages_ar 10972
hxc_time_attributes_ar 10160
hxc_tansaction_details_ar 5041
hxc_transactions_ar 150
www.Fullinterview.com Page 14 of 20
White Paper on Oracle Time and Labor (OTL) Archive and Purge Process
hxc_tc_ap_links_ar 110
hxc_ap_detail_links_ar 1514
hxc_app_period_summary_ar 110
Run the Restore Data Set process to move archived timecard data from the archive
Tables back to the active tables in the OTL application.
More Details
Calls hxc_archive_restore_process.restore_data_set
Call:
hxc_archive_restore_utils.core_table_count_snapshot
hxc_archive_restore_utils.bkup_table_count_snapshot
www.Fullinterview.com Page 15 of 20
White Paper on Oracle Time and Labor (OTL) Archive and Purge Process
hxc_archive_restore_utils.core_table_count_snapshot
hxc_archive_restore_utils.bkup_table_count_snapshot
hxc_archive_restore_utils.count_snapshot_check
The Undo Data Set process ungroups the timecard data you defined in the Define Data
Set process. Run this process if the Defined Data Set process returns errors. Typically,
errors occur in the Define Data Set process if the date range includes too much timecard
data for the temporary tables to accommodate.
More Details
Calls hxc_archive_restore_process.undo_define_data_set
www.Fullinterview.com Page 16 of 20
White Paper on Oracle Time and Labor (OTL) Archive and Purge Process
Before Archival
Note that Details icon is enabled.
www.Fullinterview.com Page 17 of 20
White Paper on Oracle Time and Labor (OTL) Archive and Purge Process
www.Fullinterview.com Page 18 of 20
White Paper on Oracle Time and Labor (OTL) Archive and Purge Process
After Archival
www.Fullinterview.com Page 19 of 20
White Paper on Oracle Time and Labor (OTL) Archive and Purge Process
www.Fullinterview.com Page 20 of 20