Hi Team,
I have to do the data migration to the oracle EBS system but data is huge and it is almost 1 million.
I want to split a million records into 10K records or some size to call the main procedure parallelly multiple times and I feel that that will process the records quickly.
Please see the current code below. Actually not the exact code but it is dummy code.
I am struggling to submit the oracle_code_calling procedure multiple times parallelly and currently, my code will process a single record by single records. If you could help me to call oracle_code_calling procedure (say 20 times ) parallelly then the same time 20 records will be processed rather than a single record.
CREATE OR REPLACE PACKAGE apps.ramesh_million_pkg
IS
PROCEDURE oracle_code_calling (p_attendance_id NUMBER);
PROCEDURE million_records;
END;
/
CREATE OR REPLACE PACKAGE BODY apps.ramesh_million_pkg
IS
PROCEDURE oracle_code_calling (p_attendance_id NUMBER)
IS
BEGIN
BEGIN
hr_person_absence_api.delete_person_absence (
p_validate => FALSE,
p_absence_attendance_id => p_attendance_id,
p_object_version_number => 1);
COMMIT;
EXCEPTION
WHEN OTHERS
THEN
NULL;
END;
END;
PROCEDURE million_records
IS
CURSOR c_million
IS
SELECT attendance_id FROM xx_ram_million_tbl;
BEGIN
FOR rec_million IN c_million
LOOP
BEGIN
oracle_code_calling (rec_million.attendance_id);
EXCEPTION
WHEN OTHERS
THEN
NULL;
END;
END LOOP;
END;
END;
/