DBA Data[Home] [Help]

APPS.HXC_ARCHIVE dependencies on HXC_ARCHIVE

Line 1: PACKAGE BODY hxc_archive AS

1: PACKAGE BODY hxc_archive AS
2: /* $Header: hxcarchive.pkb 120.3.12010000.7 2008/10/08 10:54:43 asrajago ship $ */
3:
4:
5: ----------------------------------------------------------------------------

Line 119: l_chunk_size := nvl(fnd_profile.value('HXC_ARCHIVE_RESTORE_CHUNK_SIZE'),50);

115: BEGIN
116:
117: hr_general.g_data_migrator_mode := 'Y';
118:
119: l_chunk_size := nvl(fnd_profile.value('HXC_ARCHIVE_RESTORE_CHUNK_SIZE'),50);
120:
121: fnd_file.put_line(fnd_file.LOG,'--- > Chunk Size is: '||l_chunk_size);
122:
123: -- Update hxc_data_sets as BACKUP_IN_PROGRESS because the process is going to take some time.

Line 498: FROM hxc_archive_temp

494:
495: CURSOR get_dup_trans
496: IS SELECT master_id,
497: MAX(ROWID)
498: FROM hxc_archive_temp
499: WHERE thread_id = p_thread_id
500: GROUP BY master_id ;
501:
502:

Line 662: -- hxc_archive_temp.

658: -- * Delete the above records from hxc_time_building_blocks.
659: -- * Loop to process transaction records.
660: -- Pick up transaction detail records for the records in hxc_temp_timecard_chunks
661: -- as of now. ( detail_id, transaction_id, detail_rowid ), and insert into
662: -- hxc_archive_temp.
663: -- Using the rowids, insert the transaction detail records into
664: -- hxc_transaction_details_ar.
665: -- Delete the records from hxc_transaction_details_ar using the ROWID.
666: -- Delete duplicate transaction ids from hxc_archive_temp.

Line 666: -- Delete duplicate transaction ids from hxc_archive_temp.

662: -- hxc_archive_temp.
663: -- Using the rowids, insert the transaction detail records into
664: -- hxc_transaction_details_ar.
665: -- Delete the records from hxc_transaction_details_ar using the ROWID.
666: -- Delete duplicate transaction ids from hxc_archive_temp.
667: -- Select all deposit transaction records from hxc_transactions table and
668: -- insert into hxc_transactions_ar table.
669: -- Select all retrieval transaction ids and insert into hxc_ar_trans_temp
670: -- table for the parent thread to process.

Line 672: -- id is present in hxc_archive_temp.

668: -- insert into hxc_transactions_ar table.
669: -- Select all retrieval transaction ids and insert into hxc_ar_trans_temp
670: -- table for the parent thread to process.
671: -- Delete all transaction records from hxc_transactions table, if the transaction
672: -- id is present in hxc_archive_temp.
673: -- Delete from hxc_archive temp for the the next iteration of this loop.
674: -- * Loop to process attribute records.
675: -- Pick up attribute usage records for the records in hxc_temp_timecard_chunks
676: -- as of now. ( usage_id, attribute_id, usage_rowid ), and insert into

Line 673: -- Delete from hxc_archive temp for the the next iteration of this loop.

669: -- Select all retrieval transaction ids and insert into hxc_ar_trans_temp
670: -- table for the parent thread to process.
671: -- Delete all transaction records from hxc_transactions table, if the transaction
672: -- id is present in hxc_archive_temp.
673: -- Delete from hxc_archive temp for the the next iteration of this loop.
674: -- * Loop to process attribute records.
675: -- Pick up attribute usage records for the records in hxc_temp_timecard_chunks
676: -- as of now. ( usage_id, attribute_id, usage_rowid ), and insert into
677: -- hxc_archive_temp.

Line 677: -- hxc_archive_temp.

673: -- Delete from hxc_archive temp for the the next iteration of this loop.
674: -- * Loop to process attribute records.
675: -- Pick up attribute usage records for the records in hxc_temp_timecard_chunks
676: -- as of now. ( usage_id, attribute_id, usage_rowid ), and insert into
677: -- hxc_archive_temp.
678: -- Using the rowids, insert the attribute usage records into
679: -- hxc_attribute_usages_ar.
680: -- Delete the records from hxc_transaction_details_ar using the ROWID.
681: -- Delete all records from hxc_archive_temp if attribute_id is

Line 681: -- Delete all records from hxc_archive_temp if attribute_id is

677: -- hxc_archive_temp.
678: -- Using the rowids, insert the attribute usage records into
679: -- hxc_attribute_usages_ar.
680: -- Delete the records from hxc_transaction_details_ar using the ROWID.
681: -- Delete all records from hxc_archive_temp if attribute_id is
682: -- present in hxc_time_attributes_ar
683: -- Select all attribute records from hxc_time_attributes table and
684: -- insert into hxc_time_attributes_ar table.
685: -- Delete all attribute records from hxc_time_attributes table, if the attribute

Line 686: -- id is present in hxc_archive_temp.

682: -- present in hxc_time_attributes_ar
683: -- Select all attribute records from hxc_time_attributes table and
684: -- insert into hxc_time_attributes_ar table.
685: -- Delete all attribute records from hxc_time_attributes table, if the attribute
686: -- id is present in hxc_archive_temp.
687: -- Delete from hxc_archive temp for the the next iteration of this loop.
688: -- * Delete all other scopes except DETAIL from hxc_temp_timecard_chunks.
689: -- * Select from hxc_ap_detail_links table, the records corresponding to the
690: -- details and insert into hxc_ap_detail_links_ar table.

Line 687: -- Delete from hxc_archive temp for the the next iteration of this loop.

683: -- Select all attribute records from hxc_time_attributes table and
684: -- insert into hxc_time_attributes_ar table.
685: -- Delete all attribute records from hxc_time_attributes table, if the attribute
686: -- id is present in hxc_archive_temp.
687: -- Delete from hxc_archive temp for the the next iteration of this loop.
688: -- * Delete all other scopes except DETAIL from hxc_temp_timecard_chunks.
689: -- * Select from hxc_ap_detail_links table, the records corresponding to the
690: -- details and insert into hxc_ap_detail_links_ar table.
691: -- * Delete from hxc_ap_detail_links table the above records.

Line 736: l_chunk_size := nvl(fnd_profile.value('HXC_ARCHIVE_RESTORE_CHUNK_SIZE'),50);

732: --
733:
734: hr_general.g_data_migrator_mode := 'Y';
735:
736: l_chunk_size := nvl(fnd_profile.value('HXC_ARCHIVE_RESTORE_CHUNK_SIZE'),50);
737:
738: fnd_file.put_line(fnd_file.LOG,'--- > Chunk Size is: '||l_chunk_size);
739:
740: -- firs let's get the min start time of

Line 826: hxc_archive.log_data_mismatch(p_scope => 'Timecard',

822: AND object_version_number = tc_ovn_tab(i) ;
823:
824: l_tc_del_count := sql%rowcount;
825:
826: hxc_archive.log_data_mismatch(p_scope => 'Timecard',
827: p_insert => l_tc_count,
828: p_delete => l_tc_del_count,
829: p_mismatch => data_mismatch
830: );

Line 891: hxc_archive.log_data_mismatch(p_scope => 'TC App LINKs ',

887: AND thread_id = p_thread_id );
888:
889: l_tal_del_count := SQL%ROWCOUNT;
890:
891: hxc_archive.log_data_mismatch(p_scope => 'TC App LINKs ',
892: p_insert => l_tal_count,
893: p_delete => l_tal_del_count,
894: p_mismatch => data_mismatch );
895:

Line 935: hxc_archive.log_data_mismatch( p_scope => 'Application Period ',

931: AND thread_id = p_thread_id );
932:
933: l_app_del_count := SQL%ROWCOUNT;
934:
935: hxc_archive.log_data_mismatch( p_scope => 'Application Period ',
936: p_insert => l_app_period_count,
937: p_delete => l_app_del_count,
938: p_mismatch => data_mismatch );
939:

Line 973: hxc_archive.log_data_mismatch( p_scope => 'App Period Summary ',

969: AND thread_id = p_thread_id );
970:
971: l_app_sum_del_count := SQL%ROWCOUNT;
972:
973: hxc_archive.log_data_mismatch( p_scope => 'App Period Summary ',
974: p_insert => l_app_period_sum_count,
975: p_delete => l_app_sum_del_count,
976: p_mismatch => data_mismatch );
977:

Line 1049: hxc_archive.log_data_mismatch( p_scope => 'Day ',

1045: rowid_tab.DELETE;
1046: END LOOP;
1047: CLOSE get_tbb_rowid;
1048:
1049: hxc_archive.log_data_mismatch( p_scope => 'Day ',
1050: p_insert => l_day_count,
1051: p_delete => l_day_del_count,
1052: p_mismatch => data_mismatch );
1053:

Line 1124: hxc_archive.log_data_mismatch( p_scope => 'Detail ',

1120: rowid_tab.DELETE;
1121: END LOOP;
1122: CLOSE get_tbb_rowid;
1123:
1124: hxc_archive.log_data_mismatch( p_scope => 'Detail ',
1125: p_insert => l_det_count,
1126: p_delete => l_det_del_count,
1127: p_mismatch => data_mismatch );
1128: IF data_mismatch

Line 1153: INSERT INTO hxc_archive_temp

1149:
1150: EXIT WHEN trans_detail_tab.COUNT = 0 ;
1151:
1152: FORALL i IN trans_detail_tab.FIRST..trans_detail_tab.LAST
1153: INSERT INTO hxc_archive_temp
1154: ( detail_id,
1155: master_id,
1156: ref_rowid,
1157: thread_id )

Line 1171: FROM hxc_archive_temp temp,

1167: SELECT /*+ LEADING(temp) USE_NL(bkuptxnd) */
1168: p_data_set_id,TRANSACTION_DETAIL_ID,TIME_BUILDING_BLOCK_ID,TRANSACTION_ID,
1169: STATUS,EXCEPTION_DESCRIPTION,OBJECT_VERSION_NUMBER,CREATED_BY,CREATION_DATE,
1170: LAST_UPDATED_BY,LAST_UPDATE_DATE,LAST_UPDATE_LOGIN,TIME_BUILDING_BLOCK_OVN
1171: FROM hxc_archive_temp temp,
1172: hxc_transaction_details bkuptxnd
1173: WHERE CHARTOROWID(temp.ref_rowid) = bkuptxnd.ROWID
1174: AND thread_id = p_thread_id ;
1175:

Line 1197: DELETE FROM hxc_archive_temp

1193:
1194: EXIT WHEN trans_id_tab.COUNT = 0;
1195:
1196: FORALL i IN trans_id_tab.FIRST..trans_id_tab.LAST
1197: DELETE FROM hxc_archive_temp
1198: WHERE master_id = trans_id_tab(i)
1199: AND ROWID <> uniq_rowid_tab(i)
1200: AND thread_id = p_thread_id ;
1201: END LOOP;

Line 1204: DELETE FROM hxc_archive_temp

1200: AND thread_id = p_thread_id ;
1201: END LOOP;
1202: CLOSE get_dup_trans;
1203:
1204: DELETE FROM hxc_archive_temp
1205: WHERE EXISTS ( SELECT 1
1206: FROM hxc_transactions_ar
1207: WHERE transaction_id = master_id )
1208: AND thread_id = p_thread_id ;

Line 1220: hxc_archive_temp temp

1216: TRANSACTION_DATE,TYPE,STATUS,EXCEPTION_DESCRIPTION,OBJECT_VERSION_NUMBER,
1217: CREATED_BY,CREATION_DATE,LAST_UPDATED_BY,LAST_UPDATE_DATE,LAST_UPDATE_LOGIN,
1218: TRANSACTION_CODE
1219: FROM hxc_transactions bkuptxn,
1220: hxc_archive_temp temp
1221: WHERE transaction_id = master_id
1222: AND thread_id = p_thread_id
1223: AND transaction_id NOT IN ( SELECT transaction_id
1224: FROM hxc_transactions_ar hxc

Line 1234: FROM hxc_archive_temp temp

1230:
1231: DELETE /*+ LEADING(temp) USE_NL(bkuptxn) */
1232: FROM hxc_transactions bkuptxn
1233: WHERE transaction_id IN ( SELECT master_id
1234: FROM hxc_archive_temp temp
1235: WHERE thread_id = p_thread_id)
1236: AND type <> 'RETRIEVAL';
1237:
1238: l_trans_del_count := l_trans_del_count + SQL%ROWCOUNT;

Line 1247: hxc_archive_temp temp

1243: p_data_set_id,
1244: p_thread_id,
1245: ROWIDTOCHAR(bkuptxn.ROWID)
1246: FROM hxc_transactions bkuptxn,
1247: hxc_archive_temp temp
1248: WHERE transaction_id = master_id
1249: AND thread_id = p_thread_id
1250: AND type = 'RETRIEVAL';
1251:

Line 1252: DELETE FROM hxc_archive_temp

1248: WHERE transaction_id = master_id
1249: AND thread_id = p_thread_id
1250: AND type = 'RETRIEVAL';
1251:
1252: DELETE FROM hxc_archive_temp
1253: WHERE thread_id = p_thread_id ;
1254:
1255: END LOOP;
1256: CLOSE get_transactions;

Line 1258: hxc_archive.log_data_mismatch( p_scope => 'Transaction Detail ',

1254:
1255: END LOOP;
1256: CLOSE get_transactions;
1257:
1258: hxc_archive.log_data_mismatch( p_scope => 'Transaction Detail ',
1259: p_insert => l_td_count,
1260: p_delete => l_td_del_count,
1261: p_mismatch => data_mismatch );
1262:

Line 1269: hxc_archive.log_data_mismatch( p_scope => 'Transaction ',

1265: write_data_mismatch('Transaction Detail ');
1266: EXIT TO_CONTINUE_TO_NEXT_CHUNK ;
1267: END IF;
1268:
1269: hxc_archive.log_data_mismatch( p_scope => 'Transaction ',
1270: p_insert => l_trans_count,
1271: p_delete => l_trans_del_count,
1272: p_mismatch => data_mismatch );
1273:

Line 1299: INSERT INTO hxc_archive_temp

1295: EXIT WHEN usage_tab.COUNT = 0;
1296:
1297:
1298: FORALL i IN usage_tab.FIRST..usage_tab.LAST
1299: INSERT INTO hxc_archive_temp
1300: ( detail_id,
1301: master_id,
1302: ref_rowid,
1303: thread_id)

Line 1318: FROM hxc_archive_temp temp,

1314: SELECT /*+ LEADING(temp) USE_NL(bkuptau) */
1315: p_data_set_id,TIME_ATTRIBUTE_USAGE_ID,TIME_ATTRIBUTE_ID,TIME_BUILDING_BLOCK_ID,
1316: CREATED_BY,CREATION_DATE,LAST_UPDATED_BY,LAST_UPDATE_DATE,LAST_UPDATE_LOGIN,
1317: OBJECT_VERSION_NUMBER,TIME_BUILDING_BLOCK_OVN
1318: FROM hxc_archive_temp temp,
1319: hxc_time_attribute_usages bkuptau
1320: WHERE bkuptau.ROWID = CHARTOROWID(temp.ref_rowid)
1321: AND thread_id = p_thread_id ;
1322:

Line 1331: DELETE FROM hxc_archive_temp

1327: WHERE ROWID = CHARTOROWID(usage_rowid_tab(i)) ;
1328:
1329: l_tau_del_count := l_tau_del_count + SQL%ROWCOUNT;
1330:
1331: DELETE FROM hxc_archive_temp
1332: WHERE EXISTS ( SELECT 1
1333: FROM hxc_time_attributes_ar
1334: WHERE time_attribute_id = master_id )
1335: AND thread_id = p_thread_id ;

Line 1354: FROM hxc_archive_temp temp

1350: ATTRIBUTE14,null,p_data_set_id
1351: FROM hxc_time_attributes bkupta
1352: WHERE bkupta.time_attribute_id in ( SELECT /*+ NO_INDEX(temp) */
1353: master_id
1354: FROM hxc_archive_temp temp
1355: WHERE thread_id = p_thread_id );
1356:
1357: l_ta_count := l_ta_count + SQL%ROWCOUNT;
1358:

Line 1363: FROM hxc_archive_temp temp

1359: DELETE /*+ LEADING(temp) USE_NL(bkupta) */
1360: FROM hxc_time_attributes bkupta
1361: WHERE time_attribute_id IN ( SELECT /*+ NO_INDEX(temp) */
1362: master_id
1363: FROM hxc_archive_temp temp
1364: WHERE thread_id = p_thread_id ) ;
1365:
1366: l_ta_del_count := l_ta_del_count + SQL%ROWCOUNT;
1367:

Line 1372: DELETE FROM hxc_archive_temp

1368: usage_tab.DELETE;
1369: attribute_tab.DELETE;
1370: usage_rowid_tab.DELETE;
1371:
1372: DELETE FROM hxc_archive_temp
1373: WHERE thread_id = p_thread_id ;
1374:
1375: END LOOP ;
1376: CLOSE get_attributes;

Line 1378: hxc_archive.log_data_mismatch( p_scope => 'Attribute Usages ',

1374:
1375: END LOOP ;
1376: CLOSE get_attributes;
1377:
1378: hxc_archive.log_data_mismatch( p_scope => 'Attribute Usages ',
1379: p_insert => l_tau_count,
1380: p_delete => l_tau_del_count,
1381: p_mismatch => data_mismatch );
1382: IF data_mismatch

Line 1388: hxc_archive.log_data_mismatch( p_scope => 'Attributes ',

1384: write_data_mismatch('Attribute Usages ');
1385: EXIT TO_CONTINUE_TO_NEXT_CHUNK ;
1386: END IF;
1387:
1388: hxc_archive.log_data_mismatch( p_scope => 'Attributes ',
1389: p_insert => l_ta_count,
1390: p_delete => l_ta_del_count,
1391: p_mismatch => data_mismatch );
1392:

Line 1429: hxc_archive.log_data_mismatch( p_scope => 'App Detail LINKs ',

1425: AND thread_id = p_thread_id );
1426:
1427: l_adl_del_count := SQL%ROWCOUNT;
1428:
1429: hxc_archive.log_data_mismatch( p_scope => 'App Detail LINKs ',
1430: p_insert => l_adl_count,
1431: p_delete => l_adl_del_count,
1432: p_mismatch => data_mismatch );
1433:

Line 1528: END hxc_archive;

1524: RETURN;
1525: END log_data_mismatch ;
1526:
1527:
1528: END hxc_archive;