DBA Data[Home] [Help]

APPS.EDW_MAPPING_COLLECT dependencies on EDW_OWB_COLLECTION_UTIL

Line 41: p_skip_cols EDW_OWB_COLLECTION_UTIL.varcharTableType,

37: p_fact_dlog varchar2,
38: p_key_set number,
39: p_instance_type varchar2,
40: p_load_pk number,
41: p_skip_cols EDW_OWB_COLLECTION_UTIL.varcharTableType,
42: p_number_skip_cols number,
43: p_fresh_restart boolean,
44: p_op_table_space varchar2,
45: p_da_cols EDW_OWB_COLLECTION_UTIL.varcharTableType,

Line 45: p_da_cols EDW_OWB_COLLECTION_UTIL.varcharTableType,

41: p_skip_cols EDW_OWB_COLLECTION_UTIL.varcharTableType,
42: p_number_skip_cols number,
43: p_fresh_restart boolean,
44: p_op_table_space varchar2,
45: p_da_cols EDW_OWB_COLLECTION_UTIL.varcharTableType,
46: p_number_da_cols number,
47: p_da_table varchar2,
48: p_pp_table varchar2,
49: p_master_instance varchar2,

Line 51: p_skip_levels EDW_OWB_COLLECTION_UTIL.varcharTableType,

47: p_da_table varchar2,
48: p_pp_table varchar2,
49: p_master_instance varchar2,
50: p_rollback varchar2,
51: p_skip_levels EDW_OWB_COLLECTION_UTIL.varcharTableType,
52: p_number_skip_levels number,
53: p_smart_update boolean,
54: p_fk_use_nl number,
55: p_fact_smart_update number,

Line 59: p_smart_update_cols EDW_OWB_COLLECTION_UTIL.varcharTableType,

55: p_fact_smart_update number,
56: p_auto_dang_table_extn varchar2,
57: p_log_dang_keys boolean,
58: p_create_parent_table_records boolean,
59: p_smart_update_cols EDW_OWB_COLLECTION_UTIL.varcharTableType,
60: p_number_smart_update_cols number,
61: p_check_fk_change boolean,
62: p_stg_join_nl_percentage number,
63: p_ok_switch_update number,

Line 256: p_skip_cols EDW_OWB_COLLECTION_UTIL.varcharTableType,

252: p_fact_dlog varchar2,
253: p_key_set number,
254: p_instance_type varchar2,
255: p_load_pk number,
256: p_skip_cols EDW_OWB_COLLECTION_UTIL.varcharTableType,
257: p_number_skip_cols number,
258: p_fresh_restart boolean,
259: p_op_table_space varchar2,
260: p_da_cols EDW_OWB_COLLECTION_UTIL.varcharTableType,

Line 260: p_da_cols EDW_OWB_COLLECTION_UTIL.varcharTableType,

256: p_skip_cols EDW_OWB_COLLECTION_UTIL.varcharTableType,
257: p_number_skip_cols number,
258: p_fresh_restart boolean,
259: p_op_table_space varchar2,
260: p_da_cols EDW_OWB_COLLECTION_UTIL.varcharTableType,
261: p_number_da_cols number,
262: p_da_table varchar2,
263: p_pp_table varchar2,
264: p_master_instance varchar2,

Line 266: p_skip_levels EDW_OWB_COLLECTION_UTIL.varcharTableType,

262: p_da_table varchar2,
263: p_pp_table varchar2,
264: p_master_instance varchar2,
265: p_rollback varchar2,
266: p_skip_levels EDW_OWB_COLLECTION_UTIL.varcharTableType,
267: p_number_skip_levels number,
268: p_smart_update boolean,
269: p_fk_use_nl number,
270: p_fact_smart_update number,

Line 274: p_smart_update_cols EDW_OWB_COLLECTION_UTIL.varcharTableType,

270: p_fact_smart_update number,
271: p_auto_dang_table_extn varchar2,
272: p_log_dang_keys boolean,
273: p_create_parent_table_records boolean,
274: p_smart_update_cols EDW_OWB_COLLECTION_UTIL.varcharTableType,
275: p_number_smart_update_cols number,
276: p_check_fk_change boolean,
277: p_stg_join_nl_percentage number,
278: p_ok_switch_update number,

Line 296: l_ok_low_end EDW_OWB_COLLECTION_UTIL.numberTableType;

292: ) IS
293: l_input_table varchar2(200);
294: l_ok_table varchar2(80);
295: --the number of elements in these array=g_max_threads
296: l_ok_low_end EDW_OWB_COLLECTION_UTIL.numberTableType;
297: l_ok_high_end EDW_OWB_COLLECTION_UTIL.numberTableType;
298: l_ok_end_count integer;
299: l_job_id EDW_OWB_COLLECTION_UTIL.numberTableType;
300: l_number_jobs number;

Line 297: l_ok_high_end EDW_OWB_COLLECTION_UTIL.numberTableType;

293: l_input_table varchar2(200);
294: l_ok_table varchar2(80);
295: --the number of elements in these array=g_max_threads
296: l_ok_low_end EDW_OWB_COLLECTION_UTIL.numberTableType;
297: l_ok_high_end EDW_OWB_COLLECTION_UTIL.numberTableType;
298: l_ok_end_count integer;
299: l_job_id EDW_OWB_COLLECTION_UTIL.numberTableType;
300: l_number_jobs number;
301: l_rownum_for_seq_num number;

Line 299: l_job_id EDW_OWB_COLLECTION_UTIL.numberTableType;

295: --the number of elements in these array=g_max_threads
296: l_ok_low_end EDW_OWB_COLLECTION_UTIL.numberTableType;
297: l_ok_high_end EDW_OWB_COLLECTION_UTIL.numberTableType;
298: l_ok_end_count integer;
299: l_job_id EDW_OWB_COLLECTION_UTIL.numberTableType;
300: l_number_jobs number;
301: l_rownum_for_seq_num number;
302: -----------------------------------------
303: l_temp_conc_name varchar2(200);

Line 332: if EDW_OWB_COLLECTION_UTIL.create_load_input_table(

328: p_status:=false;
329: write_to_log_file_n('Map or src or tgt not specified. Fatal...');
330: return;
331: end if;
332: if EDW_OWB_COLLECTION_UTIL.create_load_input_table(
333: l_input_table,
334: p_object_name,
335: p_mapping_id,
336: p_map_type,

Line 403: g_status_message:=EDW_OWB_COLLECTION_UTIL.get_status_message;

399: p_sleep_time,
400: g_parallel_drill_down
401: )=false then
402: p_status:=false;
403: g_status_message:=EDW_OWB_COLLECTION_UTIL.get_status_message;
404: g_status:=false;
405: end if;
406: if p_status then
407: if initial_set_up(

Line 416: if EDW_OWB_COLLECTION_UTIL.create_da_load_input_table(

412: p_status:=false;
413: g_status:=false;
414: end if;
415: if p_status then
416: if EDW_OWB_COLLECTION_UTIL.create_da_load_input_table(
417: l_input_table||'_DC',
418: g_op_table_space,
419: g_da_cols,
420: g_stg_da_cols,

Line 427: if EDW_OWB_COLLECTION_UTIL.update_load_input_table(

423: g_status:=false;
424: end if;
425: end if;
426: if p_status then
427: if EDW_OWB_COLLECTION_UTIL.update_load_input_table(
428: l_input_table,
429: l_ok_table,
430: g_max_round,
431: g_update_dlog_lookup_table,

Line 436: g_status_message:=EDW_OWB_COLLECTION_UTIL.get_status_message;

432: g_dlog_has_data,
433: g_total_records,
434: g_stg_copy_table_flag
435: )=false then
436: g_status_message:=EDW_OWB_COLLECTION_UTIL.get_status_message;
437: p_status:=false;
438: g_status:=false;
439: end if;
440: if p_status then

Line 446: if EDW_OWB_COLLECTION_UTIL.find_ok_distribution(

442: --if l_ok_table is null, there are no records to load
443: --if this stg table has no records to load, l_ok_table will be null
444: --initial_setup would not have given any value to it.
445: if l_ok_table is not null then
446: if EDW_OWB_COLLECTION_UTIL.find_ok_distribution(
447: l_ok_table,
448: p_bis_owner,
449: p_max_threads,
450: p_min_job_load_size,

Line 454: g_status_message:=EDW_OWB_COLLECTION_UTIL.get_status_message;

450: p_min_job_load_size,
451: l_ok_low_end,
452: l_ok_high_end,
453: l_ok_end_count)=false then
454: g_status_message:=EDW_OWB_COLLECTION_UTIL.get_status_message;
455: p_status:=false;
456: g_status:=false;
457: end if;
458: --l_ok_end_count decides the number of threads

Line 561: if EDW_OWB_COLLECTION_UTIL.wait_on_jobs(

557: );
558: end if;
559: end loop;
560: --wait to make sure that all threads launched are complete.
561: if EDW_OWB_COLLECTION_UTIL.wait_on_jobs(
562: l_job_id,
563: l_number_jobs,
564: p_sleep_time,
565: g_thread_type)=false then

Line 566: g_status_message:=EDW_OWB_COLLECTION_UTIL.get_status_message;

562: l_job_id,
563: l_number_jobs,
564: p_sleep_time,
565: g_thread_type)=false then
566: g_status_message:=EDW_OWB_COLLECTION_UTIL.get_status_message;
567: p_status:=false;
568: g_status:=false;
569: end if;
570: if p_status then

Line 572: if EDW_OWB_COLLECTION_UTIL.check_all_child_jobs(p_job_status_table,l_job_id,

568: g_status:=false;
569: end if;
570: if p_status then
571: --just to note. l_job_id is not used in check_all_child_jobs
572: if EDW_OWB_COLLECTION_UTIL.check_all_child_jobs(p_job_status_table,l_job_id,
573: l_number_jobs,null)=false then
574: g_status:=false;
575: p_status:=false;
576: return;

Line 598: if EDW_OWB_COLLECTION_UTIL.drop_table(l_ok_table)=false then

594: clean_up;
595: if drop_input_tables(l_input_table)=false then
596: null;
597: end if;
598: if EDW_OWB_COLLECTION_UTIL.drop_table(l_ok_table)=false then
599: null;
600: end if;
601: if EDW_OWB_COLLECTION_UTIL.drop_table(p_job_status_table)=false then
602: null;

Line 601: if EDW_OWB_COLLECTION_UTIL.drop_table(p_job_status_table)=false then

597: end if;
598: if EDW_OWB_COLLECTION_UTIL.drop_table(l_ok_table)=false then
599: null;
600: end if;
601: if EDW_OWB_COLLECTION_UTIL.drop_table(p_job_status_table)=false then
602: null;
603: end if;
604: if EDW_OWB_COLLECTION_UTIL.drop_table(g_update_dlog_lookup_table)=false then
605: null;

Line 604: if EDW_OWB_COLLECTION_UTIL.drop_table(g_update_dlog_lookup_table)=false then

600: end if;
601: if EDW_OWB_COLLECTION_UTIL.drop_table(p_job_status_table)=false then
602: null;
603: end if;
604: if EDW_OWB_COLLECTION_UTIL.drop_table(g_update_dlog_lookup_table)=false then
605: null;
606: end if;
607: if post_operations=false then
608: p_status:=false;

Line 642: if EDW_OWB_COLLECTION_UTIL.create_job_status_table(g_job_status_table,g_op_table_space)=false then

638: if read_options_table(p_table_name)=false then
639: return false;
640: end if;
641: g_total_records:=0;
642: if EDW_OWB_COLLECTION_UTIL.create_job_status_table(g_job_status_table,g_op_table_space)=false then
643: return false;
644: end if;
645: if g_debug then
646: write_to_log_file_n('pre_mapping_coll'||get_time);

Line 660: edw_owb_collection_util.dump_mem_stats;

656: Init_all(null);
657: insert_into_load_progress_d(g_load_pk,g_primary_target_name,'Read Metadata',sysdate,null,'MAPPING',
658: 'METADATA-READ',1020,'I');
659: if g_debug then
660: edw_owb_collection_util.dump_mem_stats;
661: end if;
662: Read_Metadata('PK');--?
663: if g_debug then
664: edw_owb_collection_util.dump_mem_stats;

Line 664: edw_owb_collection_util.dump_mem_stats;

660: edw_owb_collection_util.dump_mem_stats;
661: end if;
662: Read_Metadata('PK');--?
663: if g_debug then
664: edw_owb_collection_util.dump_mem_stats;
665: end if;
666: insert_into_load_progress_d(g_load_pk,null,null,null,sysdate,null,null,1020,'U');
667: if g_status=false then
668: return false;

Line 739: g_rownum_for_seq_num:=EDW_OWB_COLLECTION_UTIL.get_seq_nextval(g_pk_key_seq);

735: if put_rownum_in_ok_table=false then
736: return false;
737: end if;
738: if g_pk_key_seq is not null then
739: g_rownum_for_seq_num:=EDW_OWB_COLLECTION_UTIL.get_seq_nextval(g_pk_key_seq);
740: end if;
741: end if;
742: insert_into_load_progress_d(g_load_pk,null,null,null,sysdate,null,null,1100,'U');
743: p_ok_table:=g_ok_rowid_table;

Line 760: if edw_owb_collection_util.drop_stg_map_fk_details(g_bis_owner,g_mapping_id)=false then

756: write_to_log_file_n('In post_operations '||get_time);
757: end if;
758: --drop the fk table. this is dropped here because the main process creates it and keeps it for
759: --the child processes. then at the end, the main process drops it
760: if edw_owb_collection_util.drop_stg_map_fk_details(g_bis_owner,g_mapping_id)=false then
761: null;
762: end if;
763: analyze_target_tables;
764: if g_debug then

Line 842: EDW_OWB_COLLECTION_UTIL.init_all(p_target_name||'_'||g_job_id,null,'bis.edw.loader');

838: --g_job_id is not the dbms_job job_id. its just an identifier. goes from 1..n
839: /*need to open log file
840: this wont be conc manager log file
841: */
842: EDW_OWB_COLLECTION_UTIL.init_all(p_target_name||'_'||g_job_id,null,'bis.edw.loader');
843: write_to_log_file_n('In COLLECT. p_object_name='||p_object_name||',p_target_name='||p_target_name||
844: ', p_table_name='||p_table_name||', p_job_id='||p_job_id||', p_ok_low_end='||p_ok_low_end||
845: ', p_ok_high_end='||p_ok_high_end||', p_rownum_for_seq_num='||p_rownum_for_seq_num||get_time);
846: --null g_job_id means that this is single thread. 1 and up means that this is a thread

Line 849: if EDW_OWB_COLLECTION_UTIL.log_into_job_status_table(

845: ', p_ok_high_end='||p_ok_high_end||', p_rownum_for_seq_num='||p_rownum_for_seq_num||get_time);
846: --null g_job_id means that this is single thread. 1 and up means that this is a thread
847: --read_options_table populates all the global variables
848: if read_options_table(p_table_name)=false then
849: if EDW_OWB_COLLECTION_UTIL.log_into_job_status_table(
850: g_job_status_table,
851: p_object_name,
852: g_job_id,
853: 'ERROR',

Line 860: EDW_OWB_COLLECTION_UTIL.set_conc_program_id(g_conc_program_id);

856: end if;
857: return;
858: end if;
859: --g_conc_program_id is read from p_table_name
860: EDW_OWB_COLLECTION_UTIL.set_conc_program_id(g_conc_program_id);
861: EDW_OWB_COLLECTION_UTIL.set_debug(g_debug);
862: EDW_OWB_COLLECTION_UTIL.set_parallel(g_parallel);
863: EDW_OWB_COLLECTION_UTIL.set_g_read_cfig_options(g_read_cfig_options);
864: if set_session_parameters=false then

Line 861: EDW_OWB_COLLECTION_UTIL.set_debug(g_debug);

857: return;
858: end if;
859: --g_conc_program_id is read from p_table_name
860: EDW_OWB_COLLECTION_UTIL.set_conc_program_id(g_conc_program_id);
861: EDW_OWB_COLLECTION_UTIL.set_debug(g_debug);
862: EDW_OWB_COLLECTION_UTIL.set_parallel(g_parallel);
863: EDW_OWB_COLLECTION_UTIL.set_g_read_cfig_options(g_read_cfig_options);
864: if set_session_parameters=false then
865: l_status:=false;

Line 862: EDW_OWB_COLLECTION_UTIL.set_parallel(g_parallel);

858: end if;
859: --g_conc_program_id is read from p_table_name
860: EDW_OWB_COLLECTION_UTIL.set_conc_program_id(g_conc_program_id);
861: EDW_OWB_COLLECTION_UTIL.set_debug(g_debug);
862: EDW_OWB_COLLECTION_UTIL.set_parallel(g_parallel);
863: EDW_OWB_COLLECTION_UTIL.set_g_read_cfig_options(g_read_cfig_options);
864: if set_session_parameters=false then
865: l_status:=false;
866: end if; --alter session etc

Line 863: EDW_OWB_COLLECTION_UTIL.set_g_read_cfig_options(g_read_cfig_options);

859: --g_conc_program_id is read from p_table_name
860: EDW_OWB_COLLECTION_UTIL.set_conc_program_id(g_conc_program_id);
861: EDW_OWB_COLLECTION_UTIL.set_debug(g_debug);
862: EDW_OWB_COLLECTION_UTIL.set_parallel(g_parallel);
863: EDW_OWB_COLLECTION_UTIL.set_g_read_cfig_options(g_read_cfig_options);
864: if set_session_parameters=false then
865: l_status:=false;
866: end if; --alter session etc
867: if g_mapping_id =0 OR g_primary_src=0 OR g_primary_target=0 then

Line 871: if EDW_OWB_COLLECTION_UTIL.log_into_job_status_table(

867: if g_mapping_id =0 OR g_primary_src=0 OR g_primary_target=0 then
868: l_status:=false;
869: g_status_message:='Map or src or tgt not specified. Fatal...';
870: write_to_log_file_n(g_status_message);
871: if EDW_OWB_COLLECTION_UTIL.log_into_job_status_table(
872: g_job_status_table,
873: p_object_name,
874: g_job_id,
875: 'ERROR',

Line 903: if EDW_OWB_COLLECTION_UTIL.log_into_job_status_table(

899: l_status:=false;
900: end if;
901: end if;
902: if l_status=false then
903: if EDW_OWB_COLLECTION_UTIL.log_into_job_status_table(
904: g_job_status_table,
905: p_object_name,
906: g_job_id,
907: 'ERROR',

Line 912: if EDW_OWB_COLLECTION_UTIL.log_into_job_status_table(

908: g_status_message)=false then
909: null;
910: end if;
911: else
912: if EDW_OWB_COLLECTION_UTIL.log_into_job_status_table(
913: g_job_status_table,
914: p_object_name,
915: g_job_id,
916: 'SUCCESS',

Line 937: edw_owb_collection_util.dump_mem_stats;

933: if g_job_id is not null then
934: insert_into_load_progress_d(g_load_pk,g_primary_target_name,g_jobid_stmt||'Read Metadata',sysdate,null,'MAPPING',
935: 'METADATA-READ',g_jobid_stmt||'1020','I');
936: if g_debug then
937: edw_owb_collection_util.dump_mem_stats;
938: end if;
939: Read_Metadata('ALL');--?
940: if g_debug then
941: edw_owb_collection_util.dump_mem_stats;

Line 941: edw_owb_collection_util.dump_mem_stats;

937: edw_owb_collection_util.dump_mem_stats;
938: end if;
939: Read_Metadata('ALL');--?
940: if g_debug then
941: edw_owb_collection_util.dump_mem_stats;
942: end if;
943: insert_into_load_progress_d(g_load_pk,null,null,null,sysdate,null,null,g_jobid_stmt||'1020','U');
944: if g_status=false then
945: return false;

Line 1026: p_skip_cols EDW_OWB_COLLECTION_UTIL.varcharTableType,

1022: p_fact_dlog varchar2,
1023: p_key_set number,
1024: p_instance_type varchar2,
1025: p_load_pk number,
1026: p_skip_cols EDW_OWB_COLLECTION_UTIL.varcharTableType,
1027: p_number_skip_cols number,
1028: p_fresh_restart boolean,
1029: p_op_table_space varchar2,
1030: p_da_cols EDW_OWB_COLLECTION_UTIL.varcharTableType,

Line 1030: p_da_cols EDW_OWB_COLLECTION_UTIL.varcharTableType,

1026: p_skip_cols EDW_OWB_COLLECTION_UTIL.varcharTableType,
1027: p_number_skip_cols number,
1028: p_fresh_restart boolean,
1029: p_op_table_space varchar2,
1030: p_da_cols EDW_OWB_COLLECTION_UTIL.varcharTableType,
1031: p_number_da_cols number,
1032: p_da_table varchar2,
1033: p_pp_table varchar2,
1034: p_master_instance varchar2,

Line 1036: p_skip_levels EDW_OWB_COLLECTION_UTIL.varcharTableType,

1032: p_da_table varchar2,
1033: p_pp_table varchar2,
1034: p_master_instance varchar2,
1035: p_rollback varchar2,
1036: p_skip_levels EDW_OWB_COLLECTION_UTIL.varcharTableType,
1037: p_number_skip_levels number,
1038: p_smart_update boolean,
1039: p_fk_use_nl number,
1040: p_fact_smart_update number,

Line 1044: p_smart_update_cols EDW_OWB_COLLECTION_UTIL.varcharTableType,

1040: p_fact_smart_update number,
1041: p_auto_dang_table_extn varchar2,
1042: p_log_dang_keys boolean,
1043: p_create_parent_table_records boolean,
1044: p_smart_update_cols EDW_OWB_COLLECTION_UTIL.varcharTableType,
1045: p_number_smart_update_cols number,
1046: p_check_fk_change boolean,
1047: p_stg_join_nl_percentage number,
1048: p_ok_switch_update number,

Line 1106: g_object_id:=EDW_OWB_COLLECTION_UTIL.get_object_id(g_object_name);

1102: g_fact_smart_update:=p_fact_smart_update;
1103: g_auto_dang_table_extn:=p_auto_dang_table_extn;
1104: g_log_dang_keys:=p_log_dang_keys;
1105: g_create_parent_table_records:=p_create_parent_table_records;
1106: g_object_id:=EDW_OWB_COLLECTION_UTIL.get_object_id(g_object_name);
1107: g_smart_update_cols:=p_smart_update_cols;
1108: g_number_smart_update_cols:=p_number_smart_update_cols;
1109: g_check_fk_change:=p_check_fk_change;
1110: g_stg_join_nl_percentage:=p_stg_join_nl_percentage;

Line 1264: edw_owb_collection_util.dump_mem_stats;

1260: end if;
1261: insert_into_load_progress_d(g_load_pk,g_primary_target_name,'Read Metadata',sysdate,null,'MAPPING',
1262: 'METADATA-READ',1020,'I');
1263: if g_debug then
1264: edw_owb_collection_util.dump_mem_stats;
1265: end if;
1266: Read_Metadata('ALL');
1267: if g_debug then
1268: edw_owb_collection_util.dump_mem_stats;

Line 1268: edw_owb_collection_util.dump_mem_stats;

1264: edw_owb_collection_util.dump_mem_stats;
1265: end if;
1266: Read_Metadata('ALL');
1267: if g_debug then
1268: edw_owb_collection_util.dump_mem_stats;
1269: end if;
1270: insert_into_load_progress_d(g_load_pk,null,null,null,sysdate,null,null,1020,'U');
1271: if g_status=false then
1272: write_to_log_file_n('ERROR Read_Metadata for '||

Line 1480: if EDW_OWB_COLLECTION_UTIL.does_table_have_data(g_ok_rowid_table,' status=1 ')<2 then

1476: g_skip_ilog_update:=false;
1477: end if;
1478: insert_into_load_progress_d(g_load_pk,null,null,null,sysdate,null,null,g_jobid_stmt||'MKRP'||l_count,'U');
1479: else
1480: if EDW_OWB_COLLECTION_UTIL.does_table_have_data(g_ok_rowid_table,' status=1 ')<2 then
1481: make_records_processing; --makes ready records to processing.
1482: end if;
1483: end if;
1484: g_err_rec_flag:=false;

Line 1527: if EDW_OWB_COLLECTION_UTIL.insert_temp_log_table(

1523: this ing is only for the lowest level. so we need to control that with g_temp_log
1524: also true for facts
1525: */
1526: if g_temp_log then
1527: if EDW_OWB_COLLECTION_UTIL.insert_temp_log_table(
1528: g_object_name,
1529: g_object_type,
1530: g_conc_program_id,
1531: g_ins_instance_name,

Line 1544: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;

1540: g_total_insert,
1541: g_total_update,
1542: g_total_delete,
1543: g_number_ins_req_coll) = false then
1544: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;
1545: g_status:=false;
1546: write_to_log_file_n(g_status_message);
1547: return false;
1548: end if;

Line 1608: l_columns EDW_OWB_COLLECTION_UTIL.varcharTableType;

1604: cv CurTyp;
1605: l_res number;
1606: -----------------------------
1607: l_table1 varchar2(200);
1608: l_columns EDW_OWB_COLLECTION_UTIL.varcharTableType;
1609: l_number_columns number;
1610: -----------------------------
1611: Begin
1612: if g_debug then

Line 1623: /*g_status_message:=EDW_OWB_COLLECTION_UTIL.get_message('EDW_DUPLICATE_ROW_FOUND');

1619: open cv for l_stmt;
1620: fetch cv into l_res;
1621: close cv;
1622: if l_res=1 then
1623: /*g_status_message:=EDW_OWB_COLLECTION_UTIL.get_message('EDW_DUPLICATE_ROW_FOUND');
1624: write_to_log_file_n(g_status_message);
1625: g_status:=false;
1626: return false;*/
1627: --remove the duplicates from g_surr_table

Line 1631: if EDW_OWB_COLLECTION_UTIL.get_db_columns_for_table(substr(g_surr_table,

1627: --remove the duplicates from g_surr_table
1628: if g_debug then
1629: write_to_log_file_n('Duplicate rows found...Deleting...');
1630: end if;
1631: if EDW_OWB_COLLECTION_UTIL.get_db_columns_for_table(substr(g_surr_table,
1632: instr(g_surr_table,'.')+1,length(g_surr_table)),l_columns,l_number_columns,
1633: g_bis_owner)=false then
1634: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;
1635: write_to_log_file_n(g_status_message);

Line 1634: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;

1630: end if;
1631: if EDW_OWB_COLLECTION_UTIL.get_db_columns_for_table(substr(g_surr_table,
1632: instr(g_surr_table,'.')+1,length(g_surr_table)),l_columns,l_number_columns,
1633: g_bis_owner)=false then
1634: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;
1635: write_to_log_file_n(g_status_message);
1636: g_status:=false;
1637: return false;
1638: end if;

Line 1640: if edw_owb_collection_util.drop_table(l_table1)=false then

1636: g_status:=false;
1637: return false;
1638: end if;
1639: l_table1:=g_surr_table||'_T1';
1640: if edw_owb_collection_util.drop_table(l_table1)=false then
1641: null;
1642: end if;
1643: l_stmt:='create table '||l_table1||' tablespace '||g_op_table_space;
1644: if g_parallel is not null then

Line 1661: if edw_owb_collection_util.drop_table(g_surr_table)=false then

1657: execute immediate l_stmt;
1658: if g_debug then
1659: write_to_log_file_n('Created with '||sql%rowcount||' rows '||get_time);
1660: end if;
1661: if edw_owb_collection_util.drop_table(g_surr_table)=false then
1662: null;
1663: end if;
1664: l_stmt:='create table '||g_surr_table||' tablespace '||g_op_table_space;
1665: if g_parallel is not null then

Line 1677: if edw_owb_collection_util.drop_table(l_table1)=false then

1673: g_surr_count:=sql%rowcount;
1674: if g_debug then
1675: write_to_log_file_n('Created with '||g_surr_count||' rows '||get_time);
1676: end if;
1677: if edw_owb_collection_util.drop_table(l_table1)=false then
1678: null;
1679: end if;
1680: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(g_surr_table,instr(g_surr_table,'.')+1,
1681: length(g_surr_table)),substr(g_surr_table,1,instr(g_surr_table,'.')-1));

Line 1680: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(g_surr_table,instr(g_surr_table,'.')+1,

1676: end if;
1677: if edw_owb_collection_util.drop_table(l_table1)=false then
1678: null;
1679: end if;
1680: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(g_surr_table,instr(g_surr_table,'.')+1,
1681: length(g_surr_table)),substr(g_surr_table,1,instr(g_surr_table,'.')-1));
1682: end if;
1683: return true;
1684: Exception when others then

Line 1698: l_dimTableUsageId EDW_OWB_COLLECTION_UTIL.numberTableType ;

1694: l_fstgTableUsageId number;
1695: l_fstgTableId number;
1696: l_factTableUsageId number;
1697: l_factTableId number;
1698: l_dimTableUsageId EDW_OWB_COLLECTION_UTIL.numberTableType ;
1699: l_dimTableId EDW_OWB_COLLECTION_UTIL.numberTableType ;
1700: l_fstgUserFKUsageId EDW_OWB_COLLECTION_UTIL.numberTableType ;
1701: l_fstgUserFKId EDW_OWB_COLLECTION_UTIL.numberTableType ;
1702: l_pk_extn varchar2(20);

Line 1699: l_dimTableId EDW_OWB_COLLECTION_UTIL.numberTableType ;

1695: l_fstgTableId number;
1696: l_factTableUsageId number;
1697: l_factTableId number;
1698: l_dimTableUsageId EDW_OWB_COLLECTION_UTIL.numberTableType ;
1699: l_dimTableId EDW_OWB_COLLECTION_UTIL.numberTableType ;
1700: l_fstgUserFKUsageId EDW_OWB_COLLECTION_UTIL.numberTableType ;
1701: l_fstgUserFKId EDW_OWB_COLLECTION_UTIL.numberTableType ;
1702: l_pk_extn varchar2(20);
1703: l_option_value varchar2(40);

Line 1700: l_fstgUserFKUsageId EDW_OWB_COLLECTION_UTIL.numberTableType ;

1696: l_factTableUsageId number;
1697: l_factTableId number;
1698: l_dimTableUsageId EDW_OWB_COLLECTION_UTIL.numberTableType ;
1699: l_dimTableId EDW_OWB_COLLECTION_UTIL.numberTableType ;
1700: l_fstgUserFKUsageId EDW_OWB_COLLECTION_UTIL.numberTableType ;
1701: l_fstgUserFKId EDW_OWB_COLLECTION_UTIL.numberTableType ;
1702: l_pk_extn varchar2(20);
1703: l_option_value varchar2(40);
1704: Begin

Line 1701: l_fstgUserFKId EDW_OWB_COLLECTION_UTIL.numberTableType ;

1697: l_factTableId number;
1698: l_dimTableUsageId EDW_OWB_COLLECTION_UTIL.numberTableType ;
1699: l_dimTableId EDW_OWB_COLLECTION_UTIL.numberTableType ;
1700: l_fstgUserFKUsageId EDW_OWB_COLLECTION_UTIL.numberTableType ;
1701: l_fstgUserFKId EDW_OWB_COLLECTION_UTIL.numberTableType ;
1702: l_pk_extn varchar2(20);
1703: l_option_value varchar2(40);
1704: Begin
1705: l_pk_extn:='_KEY';

Line 1714: if EDW_OWB_COLLECTION_UTIL.get_stg_map_pk_params(

1710: g_number_sequence :=1;
1711: begin
1712: --get the delatails about the primary source
1713: --not checked
1714: if EDW_OWB_COLLECTION_UTIL.get_stg_map_pk_params(
1715: l_mapping_id,
1716: l_fstgTableUsageId,
1717: l_fstgTableId,
1718: g_fstgTableName ,

Line 1725: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;

1721: g_factTableName ,
1722: g_fstgPKName,
1723: g_factPKName)=false then
1724: g_status:=false;
1725: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;
1726: return;
1727: end if;
1728: g_primary_src_name:=g_fstgTableName ;
1729: g_factPKNameKey:=g_factPKName||l_pk_extn;

Line 1742: if EDW_OWB_COLLECTION_UTIL.get_stg_map_fk_details(

1738: end;
1739: g_dim_auto_dang_table_dim:=g_bis_owner||'.'||g_auto_dang_table_extn||'_'||g_object_id;--need to add instance
1740: --this is only used for lowest level of dimensions
1741: Begin
1742: if EDW_OWB_COLLECTION_UTIL.get_stg_map_fk_details(
1743: l_fstgTableUsageId,
1744: l_fstgTableId,
1745: l_mapping_id,
1746: g_job_id,

Line 1758: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;

1754: g_factFKName,
1755: g_numberOfDimTables
1756: )=false then
1757: g_status:=false;
1758: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;
1759: return;
1760: end if;
1761: for i in 1..g_numberOfDimTables loop
1762: g_dimActualPKName(i):=g_dimUserPKName(i)||l_pk_extn;

Line 1779: if EDW_OWB_COLLECTION_UTIL.is_itemset_implemented(g_dimTableName(i),'DATA_ALIGNMENT')='Y' then

1775: g_status:=false;
1776: return;
1777: end if;
1778: else
1779: if EDW_OWB_COLLECTION_UTIL.is_itemset_implemented(g_dimTableName(i),'DATA_ALIGNMENT')='Y' then
1780: l_option_value:='Y';
1781: else
1782: l_option_value:='N';
1783: end if;

Line 1787: g_dimTableName_kl(i):=EDW_OWB_COLLECTION_UTIL.get_PP_table(g_dimTableName(i));

1783: end if;
1784: end if;
1785: if l_option_value='Y' then
1786: g_dimTable_da_flag(i):=true;
1787: g_dimTableName_kl(i):=EDW_OWB_COLLECTION_UTIL.get_PP_table(g_dimTableName(i));
1788: g_dimTableName_pp(i):=g_dimTableName_kl(i);
1789: g_dimTableName_da(i):=EDW_OWB_COLLECTION_UTIL.get_DA_table(g_dimTableName(i));
1790: if g_dimTableName_kl(i) is null then
1791: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;

Line 1789: g_dimTableName_da(i):=EDW_OWB_COLLECTION_UTIL.get_DA_table(g_dimTableName(i));

1785: if l_option_value='Y' then
1786: g_dimTable_da_flag(i):=true;
1787: g_dimTableName_kl(i):=EDW_OWB_COLLECTION_UTIL.get_PP_table(g_dimTableName(i));
1788: g_dimTableName_pp(i):=g_dimTableName_kl(i);
1789: g_dimTableName_da(i):=EDW_OWB_COLLECTION_UTIL.get_DA_table(g_dimTableName(i));
1790: if g_dimTableName_kl(i) is null then
1791: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;
1792: g_status:=false;
1793: return;

Line 1791: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;

1787: g_dimTableName_kl(i):=EDW_OWB_COLLECTION_UTIL.get_PP_table(g_dimTableName(i));
1788: g_dimTableName_pp(i):=g_dimTableName_kl(i);
1789: g_dimTableName_da(i):=EDW_OWB_COLLECTION_UTIL.get_DA_table(g_dimTableName(i));
1790: if g_dimTableName_kl(i) is null then
1791: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;
1792: g_status:=false;
1793: return;
1794: end if;
1795: else

Line 1809: if EDW_OWB_COLLECTION_UTIL.is_itemset_implemented(g_dimTableName(i),'DIMENSION_HISTORY')='Y' then

1805: g_status:=false;
1806: return;
1807: end if;
1808: else
1809: if EDW_OWB_COLLECTION_UTIL.is_itemset_implemented(g_dimTableName(i),'DIMENSION_HISTORY')='Y' then
1810: l_option_value:='Y';
1811: else
1812: l_option_value:='N';
1813: end if;

Line 1822: if EDW_OWB_COLLECTION_UTIL.value_in_table(g_skip_cols,g_number_skip_cols,g_factFKName(i)) then

1818: else
1819: g_dimTable_slow_flag(i):=false;
1820: end if;
1821: g_fstg_fk_direct_load(i):=false;--need surr key lookup by default.
1822: if EDW_OWB_COLLECTION_UTIL.value_in_table(g_skip_cols,g_number_skip_cols,g_factFKName(i)) then
1823: g_fstg_fk_value_load(i):=true;
1824: g_fstg_fk_load_value(i):=g_naedw_value;
1825: elsif g_dimTableName(i)='EDW_NA' then
1826: g_fstg_fk_value_load(i):=true;

Line 1828: elsif EDW_OWB_COLLECTION_UTIL.value_in_table(g_skip_levels,g_number_skip_levels,g_dimTableName(i)) then

1824: g_fstg_fk_load_value(i):=g_naedw_value;
1825: elsif g_dimTableName(i)='EDW_NA' then
1826: g_fstg_fk_value_load(i):=true;
1827: g_fstg_fk_load_value(i):=g_naedw_value;
1828: elsif EDW_OWB_COLLECTION_UTIL.value_in_table(g_skip_levels,g_number_skip_levels,g_dimTableName(i)) then
1829: g_fstg_fk_value_load(i):=true;
1830: g_fstg_fk_load_value(i):=g_naedw_value;
1831: else
1832: g_fstg_fk_value_load(i):=false;

Line 1860: if EDW_OWB_COLLECTION_UTIL.get_src_tgt_map_details(

1856: g_key_set:=g_numberOfDimTables;
1857: end if;
1858: --get the stg to tgt mapping details
1859: --get_src_tgt_map_details is only used here.
1860: if EDW_OWB_COLLECTION_UTIL.get_src_tgt_map_details(
1861: g_mapping_id,
1862: g_primary_target,
1863: g_primary_src,
1864: g_factPKNameKey ,

Line 1876: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;

1872: g_instance_column,
1873: g_groupby_on,
1874: g_pk_key_seq_pos,
1875: g_pk_key_seq)=false then
1876: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;
1877: g_status:=false;
1878: return;
1879: end if;
1880: for i in 1..g_num_ff_map_cols loop

Line 1899: l_dim_list EDW_OWB_COLLECTION_UTIL.varcharTableType;

1895: write_to_log_file_n('The sequence for the pk_key and position');
1896: write_to_log_file(g_pk_key_seq||' '||g_pk_key_seq_pos);
1897: end if;
1898: declare
1899: l_dim_list EDW_OWB_COLLECTION_UTIL.varcharTableType;
1900: l_number_dim_list number;
1901: l_index number;
1902: begin
1903: if EDW_OWB_COLLECTION_UTIL.get_dims_slow_change(g_dimTableName,g_numberOfDimTables,

Line 1903: if EDW_OWB_COLLECTION_UTIL.get_dims_slow_change(g_dimTableName,g_numberOfDimTables,

1899: l_dim_list EDW_OWB_COLLECTION_UTIL.varcharTableType;
1900: l_number_dim_list number;
1901: l_index number;
1902: begin
1903: if EDW_OWB_COLLECTION_UTIL.get_dims_slow_change(g_dimTableName,g_numberOfDimTables,
1904: l_dim_list,l_number_dim_list) = false then
1905: g_status:=false;
1906: return;
1907: end if;

Line 1910: l_index:=EDW_OWB_COLLECTION_UTIL.index_in_table(l_dim_list,l_number_dim_list,

1906: return;
1907: end if;
1908: for i in 1..g_numberOfDimTables loop
1909: l_index:=0;
1910: l_index:=EDW_OWB_COLLECTION_UTIL.index_in_table(l_dim_list,l_number_dim_list,
1911: g_dimTableName(i));
1912: g_slow_change_tables(i):=null;
1913: if l_index>0 then
1914: g_slow_change_tables(i):=g_dimTableName(i);

Line 1929: l_alias EDW_OWB_COLLECTION_UTIL.varcharTableType;

1925:
1926: procedure make_sql_surrogate_fk IS
1927: --make the sql statement
1928: l_stmt varchar2(30000);
1929: l_alias EDW_OWB_COLLECTION_UTIL.varcharTableType;
1930: l_pk EDW_OWB_COLLECTION_UTIL.varcharTableType;
1931: l_pk_key EDW_OWB_COLLECTION_UTIL.varcharTableType;
1932: begin
1933: write_to_debug_n('In make_sql_surrogate_fk');

Line 1930: l_pk EDW_OWB_COLLECTION_UTIL.varcharTableType;

1926: procedure make_sql_surrogate_fk IS
1927: --make the sql statement
1928: l_stmt varchar2(30000);
1929: l_alias EDW_OWB_COLLECTION_UTIL.varcharTableType;
1930: l_pk EDW_OWB_COLLECTION_UTIL.varcharTableType;
1931: l_pk_key EDW_OWB_COLLECTION_UTIL.varcharTableType;
1932: begin
1933: write_to_debug_n('In make_sql_surrogate_fk');
1934: /*

Line 1931: l_pk_key EDW_OWB_COLLECTION_UTIL.varcharTableType;

1927: --make the sql statement
1928: l_stmt varchar2(30000);
1929: l_alias EDW_OWB_COLLECTION_UTIL.varcharTableType;
1930: l_pk EDW_OWB_COLLECTION_UTIL.varcharTableType;
1931: l_pk_key EDW_OWB_COLLECTION_UTIL.varcharTableType;
1932: begin
1933: write_to_debug_n('In make_sql_surrogate_fk');
1934: /*
1935: if g_fstg_all_fk_direct_load is true then g_user_fk_table is not going to be created at all

Line 2080: l_cols EDW_OWB_COLLECTION_UTIL.varcharTableType;

2076: End; --end procedure make_sql_surrogate_fk IS
2077:
2078: procedure make_hd_insert_stmt is
2079: l_divide number:=2;
2080: l_cols EDW_OWB_COLLECTION_UTIL.varcharTableType;
2081: l_cols_datatype EDW_OWB_COLLECTION_UTIL.varcharTableType;
2082: l_cols_flag EDW_OWB_COLLECTION_UTIL.booleanTableType;
2083: l_number_cols number;
2084: l_data_length EDW_OWB_COLLECTION_UTIL.varcharTableType;

Line 2081: l_cols_datatype EDW_OWB_COLLECTION_UTIL.varcharTableType;

2077:
2078: procedure make_hd_insert_stmt is
2079: l_divide number:=2;
2080: l_cols EDW_OWB_COLLECTION_UTIL.varcharTableType;
2081: l_cols_datatype EDW_OWB_COLLECTION_UTIL.varcharTableType;
2082: l_cols_flag EDW_OWB_COLLECTION_UTIL.booleanTableType;
2083: l_number_cols number;
2084: l_data_length EDW_OWB_COLLECTION_UTIL.varcharTableType;
2085: l_num_distinct EDW_OWB_COLLECTION_UTIL.numberTableType;

Line 2082: l_cols_flag EDW_OWB_COLLECTION_UTIL.booleanTableType;

2078: procedure make_hd_insert_stmt is
2079: l_divide number:=2;
2080: l_cols EDW_OWB_COLLECTION_UTIL.varcharTableType;
2081: l_cols_datatype EDW_OWB_COLLECTION_UTIL.varcharTableType;
2082: l_cols_flag EDW_OWB_COLLECTION_UTIL.booleanTableType;
2083: l_number_cols number;
2084: l_data_length EDW_OWB_COLLECTION_UTIL.varcharTableType;
2085: l_num_distinct EDW_OWB_COLLECTION_UTIL.numberTableType;
2086: l_num_nulls EDW_OWB_COLLECTION_UTIL.numberTableType;

Line 2084: l_data_length EDW_OWB_COLLECTION_UTIL.varcharTableType;

2080: l_cols EDW_OWB_COLLECTION_UTIL.varcharTableType;
2081: l_cols_datatype EDW_OWB_COLLECTION_UTIL.varcharTableType;
2082: l_cols_flag EDW_OWB_COLLECTION_UTIL.booleanTableType;
2083: l_number_cols number;
2084: l_data_length EDW_OWB_COLLECTION_UTIL.varcharTableType;
2085: l_num_distinct EDW_OWB_COLLECTION_UTIL.numberTableType;
2086: l_num_nulls EDW_OWB_COLLECTION_UTIL.numberTableType;
2087: l_avg_col_length EDW_OWB_COLLECTION_UTIL.numberTableType;
2088: l_itemset_cols EDW_OWB_COLLECTION_UTIL.varcharTableType;

Line 2085: l_num_distinct EDW_OWB_COLLECTION_UTIL.numberTableType;

2081: l_cols_datatype EDW_OWB_COLLECTION_UTIL.varcharTableType;
2082: l_cols_flag EDW_OWB_COLLECTION_UTIL.booleanTableType;
2083: l_number_cols number;
2084: l_data_length EDW_OWB_COLLECTION_UTIL.varcharTableType;
2085: l_num_distinct EDW_OWB_COLLECTION_UTIL.numberTableType;
2086: l_num_nulls EDW_OWB_COLLECTION_UTIL.numberTableType;
2087: l_avg_col_length EDW_OWB_COLLECTION_UTIL.numberTableType;
2088: l_itemset_cols EDW_OWB_COLLECTION_UTIL.varcharTableType;
2089: l_number_itemset_cols number;

Line 2086: l_num_nulls EDW_OWB_COLLECTION_UTIL.numberTableType;

2082: l_cols_flag EDW_OWB_COLLECTION_UTIL.booleanTableType;
2083: l_number_cols number;
2084: l_data_length EDW_OWB_COLLECTION_UTIL.varcharTableType;
2085: l_num_distinct EDW_OWB_COLLECTION_UTIL.numberTableType;
2086: l_num_nulls EDW_OWB_COLLECTION_UTIL.numberTableType;
2087: l_avg_col_length EDW_OWB_COLLECTION_UTIL.numberTableType;
2088: l_itemset_cols EDW_OWB_COLLECTION_UTIL.varcharTableType;
2089: l_number_itemset_cols number;
2090: l_extent number;

Line 2087: l_avg_col_length EDW_OWB_COLLECTION_UTIL.numberTableType;

2083: l_number_cols number;
2084: l_data_length EDW_OWB_COLLECTION_UTIL.varcharTableType;
2085: l_num_distinct EDW_OWB_COLLECTION_UTIL.numberTableType;
2086: l_num_nulls EDW_OWB_COLLECTION_UTIL.numberTableType;
2087: l_avg_col_length EDW_OWB_COLLECTION_UTIL.numberTableType;
2088: l_itemset_cols EDW_OWB_COLLECTION_UTIL.varcharTableType;
2089: l_number_itemset_cols number;
2090: l_extent number;
2091: l_option_value varchar2(40);

Line 2088: l_itemset_cols EDW_OWB_COLLECTION_UTIL.varcharTableType;

2084: l_data_length EDW_OWB_COLLECTION_UTIL.varcharTableType;
2085: l_num_distinct EDW_OWB_COLLECTION_UTIL.numberTableType;
2086: l_num_nulls EDW_OWB_COLLECTION_UTIL.numberTableType;
2087: l_avg_col_length EDW_OWB_COLLECTION_UTIL.numberTableType;
2088: l_itemset_cols EDW_OWB_COLLECTION_UTIL.varcharTableType;
2089: l_number_itemset_cols number;
2090: l_extent number;
2091: l_option_value varchar2(40);
2092: l_index integer;

Line 2099: if EDW_OWB_COLLECTION_UTIL.get_table_next_extent(g_factTableName,g_table_owner,g_fact_next_extent)=false then

2095: Begin
2096: if g_debug then
2097: write_to_log_file_n('In make_hd_insert_stmt');
2098: end if;
2099: if EDW_OWB_COLLECTION_UTIL.get_table_next_extent(g_factTableName,g_table_owner,g_fact_next_extent)=false then
2100: g_fact_next_extent:=null;
2101: end if;
2102: if g_fact_next_extent is null or g_fact_next_extent=0 then
2103: g_fact_next_extent:=16777216;

Line 2107: if edw_owb_collection_util.get_db_columns_for_table(

2103: g_fact_next_extent:=16777216;
2104: end if;
2105: l_size:=0;
2106: if g_smart_update then
2107: if edw_owb_collection_util.get_db_columns_for_table(
2108: g_factTableName,
2109: l_cols,
2110: l_cols_datatype,
2111: l_data_length,

Line 2117: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;

2113: l_num_nulls,
2114: l_avg_col_length,
2115: l_number_cols,
2116: g_table_owner)=false then
2117: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;
2118: g_status:=false;
2119: return;
2120: end if;
2121: for i in 1..l_number_cols loop

Line 2128: l_cols_flag(EDW_OWB_COLLECTION_UTIL.index_in_table(l_cols,l_number_cols,l_itemset_cols(i))):=true;

2124: l_number_itemset_cols:=g_number_smart_update_cols;
2125: l_itemset_cols:=g_smart_update_cols;
2126: if l_number_itemset_cols>0 then
2127: for i in 1..l_number_itemset_cols loop
2128: l_cols_flag(EDW_OWB_COLLECTION_UTIL.index_in_table(l_cols,l_number_cols,l_itemset_cols(i))):=true;
2129: end loop;
2130: else
2131: for i in 1..l_number_cols loop
2132: l_cols_flag(i):=true;

Line 2138: l_index:=edw_owb_collection_util.index_in_table(g_fact_mapping_columns,g_num_ff_map_cols,l_cols(i));

2134: end if;
2135: --we only check those columns that are not for skip
2136: for i in 1..l_number_cols loop
2137: l_index:=0;
2138: l_index:=edw_owb_collection_util.index_in_table(g_fact_mapping_columns,g_num_ff_map_cols,l_cols(i));
2139: if l_index>0 then
2140: if g_skip_item(l_index) then
2141: l_cols_flag(i):=false;
2142: else

Line 2312: if EDW_OWB_COLLECTION_UTIL.value_in_table(g_fact_mapping_columns,

2308: --g_creation_date_flag boolean;
2309: --g_last_update_date_flag boolean;
2310: begin
2311: write_to_debug_n('In make_insert_update_stmt');
2312: if EDW_OWB_COLLECTION_UTIL.value_in_table(g_fact_mapping_columns,
2313: g_num_ff_map_cols,'CREATION_DATE')= false then
2314: g_creation_date_flag:=true;
2315: else
2316: g_creation_date_flag:=false;

Line 2318: if EDW_OWB_COLLECTION_UTIL.value_in_table(g_fact_mapping_columns,

2314: g_creation_date_flag:=true;
2315: else
2316: g_creation_date_flag:=false;
2317: end if;
2318: if EDW_OWB_COLLECTION_UTIL.value_in_table(g_fact_mapping_columns,
2319: g_num_ff_map_cols,'LAST_UPDATE_DATE')= false then
2320: g_last_update_date_flag:=true;
2321: else
2322: g_last_update_date_flag:=false;

Line 2731: if EDW_OWB_COLLECTION_UTIL.does_table_have_data(g_surr_table,'operation_code=0') = 2 then

2727: Begin
2728: g_insert_flag:=false;
2729: g_update_flag:=false;
2730: --op code of 0=insert 1=update and 2=delete
2731: if EDW_OWB_COLLECTION_UTIL.does_table_have_data(g_surr_table,'operation_code=0') = 2 then
2732: g_insert_flag:=true;
2733: if g_debug then
2734: write_to_log_file_n('Insert Needed');
2735: end if;

Line 2743: if EDW_OWB_COLLECTION_UTIL.does_table_have_data(g_surr_table,'operation_code=1') = 2 then

2739: write_to_log_file_n('NO Insert Needed');
2740: end if;
2741: end if;
2742: --op code of 0=insert 1=update and 2=delete
2743: if EDW_OWB_COLLECTION_UTIL.does_table_have_data(g_surr_table,'operation_code=1') = 2 then
2744: g_update_flag:=true;
2745: if g_debug then
2746: write_to_log_file_n('Update Needed');
2747: end if;

Line 2755: if EDW_OWB_COLLECTION_UTIL.does_table_have_data(g_surr_table,'operation_code=2') = 2 then

2751: write_to_log_file_n('NO Update Needed');
2752: end if;
2753: end if;
2754:
2755: if EDW_OWB_COLLECTION_UTIL.does_table_have_data(g_surr_table,'operation_code=2') = 2 then
2756: g_delete_flag:=true;
2757: if g_debug then
2758: write_to_log_file_n('Delete Needed');
2759: end if;

Line 2878: l_ok_low_end EDW_OWB_COLLECTION_UTIL.numberTableType;

2874: l_count number;
2875: l_total_count number;
2876: l_status varchar2(40);
2877: l_num_threads number;
2878: l_ok_low_end EDW_OWB_COLLECTION_UTIL.numberTableType;
2879: l_ok_high_end EDW_OWB_COLLECTION_UTIL.numberTableType;
2880: l_ok_end_count number;
2881: l_dup_hold_table varchar2(80);
2882: l_job_id EDW_OWB_COLLECTION_UTIL.numberTableType;

Line 2879: l_ok_high_end EDW_OWB_COLLECTION_UTIL.numberTableType;

2875: l_total_count number;
2876: l_status varchar2(40);
2877: l_num_threads number;
2878: l_ok_low_end EDW_OWB_COLLECTION_UTIL.numberTableType;
2879: l_ok_high_end EDW_OWB_COLLECTION_UTIL.numberTableType;
2880: l_ok_end_count number;
2881: l_dup_hold_table varchar2(80);
2882: l_job_id EDW_OWB_COLLECTION_UTIL.numberTableType;
2883: l_number_jobs number;

Line 2882: l_job_id EDW_OWB_COLLECTION_UTIL.numberTableType;

2878: l_ok_low_end EDW_OWB_COLLECTION_UTIL.numberTableType;
2879: l_ok_high_end EDW_OWB_COLLECTION_UTIL.numberTableType;
2880: l_ok_end_count number;
2881: l_dup_hold_table varchar2(80);
2882: l_job_id EDW_OWB_COLLECTION_UTIL.numberTableType;
2883: l_number_jobs number;
2884: l_debug varchar2(10);
2885: l_duplicate_collect varchar2(10);
2886: l_low_system_mem varchar2(10);

Line 2887: l_status_table EDW_OWB_COLLECTION_UTIL.varcharTableType;

2883: l_number_jobs number;
2884: l_debug varchar2(10);
2885: l_duplicate_collect varchar2(10);
2886: l_low_system_mem varchar2(10);
2887: l_status_table EDW_OWB_COLLECTION_UTIL.varcharTableType;
2888: TYPE CurTyp IS REF CURSOR;
2889: cv CurTyp;
2890: l_rollback varchar2(80);
2891: l_parallel number;

Line 2907: if EDW_OWB_COLLECTION_UTIL.find_ok_distribution(

2903: if g_debug then
2904: write_to_log_file_n('In execute_duplicate_stmt_multi '||get_time);
2905: end if;
2906: l_ok_end_count:=0;
2907: if EDW_OWB_COLLECTION_UTIL.find_ok_distribution(
2908: g_dup_hold_table,
2909: g_bis_owner,
2910: g_max_threads,
2911: g_min_job_load_size,

Line 2920: if EDW_OWB_COLLECTION_UTIL.put_rownum_in_ilog_table(

2916: end if;
2917: if l_ok_end_count>1 then
2918: l_number_jobs:=0;
2919: l_dup_hold_table:=g_dup_hold_table||'_N';
2920: if EDW_OWB_COLLECTION_UTIL.put_rownum_in_ilog_table(
2921: l_dup_hold_table,
2922: g_dup_hold_table,
2923: g_op_table_space,
2924: g_parallel)=false then

Line 3046: if EDW_OWB_COLLECTION_UTIL.wait_on_jobs(

3042: l_status_table(l_number_jobs)
3043: );
3044: end if;
3045: end loop;
3046: if EDW_OWB_COLLECTION_UTIL.wait_on_jobs(
3047: l_job_id,
3048: l_number_jobs,
3049: g_sleep_time,
3050: g_thread_type)=false then

Line 3051: g_status_message:=EDW_OWB_COLLECTION_UTIL.get_status_message;

3047: l_job_id,
3048: l_number_jobs,
3049: g_sleep_time,
3050: g_thread_type)=false then
3051: g_status_message:=EDW_OWB_COLLECTION_UTIL.get_status_message;
3052: g_status:=false;
3053: end if;
3054: --check the job status
3055: l_total_count:=0;

Line 3066: if EDW_OWB_COLLECTION_UTIL.drop_table(l_status_table(i))=false then

3062: l_total_count:=l_total_count+l_count;
3063: if l_status='ERROR' then
3064: g_status:=false;
3065: end if;
3066: if EDW_OWB_COLLECTION_UTIL.drop_table(l_status_table(i))=false then
3067: null;
3068: end if;
3069: end loop;
3070: if EDW_OWB_COLLECTION_UTIL.drop_table(l_dup_hold_table)=false then

Line 3070: if EDW_OWB_COLLECTION_UTIL.drop_table(l_dup_hold_table)=false then

3066: if EDW_OWB_COLLECTION_UTIL.drop_table(l_status_table(i))=false then
3067: null;
3068: end if;
3069: end loop;
3070: if EDW_OWB_COLLECTION_UTIL.drop_table(l_dup_hold_table)=false then
3071: null;
3072: end if;
3073: /*if g_thread_type='CONC' then
3074: --drop the conc programs

Line 3075: if EDW_OWB_COLLECTION_UTIL.delete_conc_program(

3071: null;
3072: end if;
3073: /*if g_thread_type='CONC' then
3074: --drop the conc programs
3075: if EDW_OWB_COLLECTION_UTIL.delete_conc_program(
3076: l_temp_conc_short_name,
3077: l_temp_exe_name,
3078: l_bis_short_name,
3079: 'SHORT')=false then

Line 3168: EDW_OWB_COLLECTION_UTIL.init_all(l_file_name,null,'bis.edw.loader');

3164: l_count number;
3165: Begin
3166: l_file_name:='DUP_'||p_primary_target_name||'_'||p_job_id;
3167: l_dup_hold_table:=p_dup_hold_table||'_'||p_job_id;
3168: EDW_OWB_COLLECTION_UTIL.init_all(l_file_name,null,'bis.edw.loader');
3169: g_debug:=false;
3170: if p_debug='Y' then
3171: g_debug:=true;
3172: end if;

Line 3191: EDW_OWB_COLLECTION_UTIL.set_debug(g_debug);

3187: g_rollback:=null;
3188: else
3189: g_rollback:=p_rollback;
3190: end if;
3191: EDW_OWB_COLLECTION_UTIL.set_debug(g_debug);
3192: EDW_OWB_COLLECTION_UTIL.set_parallel(g_parallel);
3193: if g_parallel>1 then
3194: EDW_OWB_COLLECTION_UTIL.alter_session('PARALLEL');
3195: end if;

Line 3192: EDW_OWB_COLLECTION_UTIL.set_parallel(g_parallel);

3188: else
3189: g_rollback:=p_rollback;
3190: end if;
3191: EDW_OWB_COLLECTION_UTIL.set_debug(g_debug);
3192: EDW_OWB_COLLECTION_UTIL.set_parallel(g_parallel);
3193: if g_parallel>1 then
3194: EDW_OWB_COLLECTION_UTIL.alter_session('PARALLEL');
3195: end if;
3196: if EDW_OWB_COLLECTION_UTIL.drop_table(p_status_table)=false then

Line 3194: EDW_OWB_COLLECTION_UTIL.alter_session('PARALLEL');

3190: end if;
3191: EDW_OWB_COLLECTION_UTIL.set_debug(g_debug);
3192: EDW_OWB_COLLECTION_UTIL.set_parallel(g_parallel);
3193: if g_parallel>1 then
3194: EDW_OWB_COLLECTION_UTIL.alter_session('PARALLEL');
3195: end if;
3196: if EDW_OWB_COLLECTION_UTIL.drop_table(p_status_table)=false then
3197: null;
3198: end if;

Line 3196: if EDW_OWB_COLLECTION_UTIL.drop_table(p_status_table)=false then

3192: EDW_OWB_COLLECTION_UTIL.set_parallel(g_parallel);
3193: if g_parallel>1 then
3194: EDW_OWB_COLLECTION_UTIL.alter_session('PARALLEL');
3195: end if;
3196: if EDW_OWB_COLLECTION_UTIL.drop_table(p_status_table)=false then
3197: null;
3198: end if;
3199: if g_debug then
3200: edw_owb_collection_util.dump_mem_stats;

Line 3200: edw_owb_collection_util.dump_mem_stats;

3196: if EDW_OWB_COLLECTION_UTIL.drop_table(p_status_table)=false then
3197: null;
3198: end if;
3199: if g_debug then
3200: edw_owb_collection_util.dump_mem_stats;
3201: edw_owb_collection_util.dump_parallel_stats;
3202: write_to_log_file_n('In execute_duplicate_stmt_multi for jobs '||p_object_name||' '||
3203: p_primary_target_name||' '||l_dup_hold_table);
3204: end if;

Line 3201: edw_owb_collection_util.dump_parallel_stats;

3197: null;
3198: end if;
3199: if g_debug then
3200: edw_owb_collection_util.dump_mem_stats;
3201: edw_owb_collection_util.dump_parallel_stats;
3202: write_to_log_file_n('In execute_duplicate_stmt_multi for jobs '||p_object_name||' '||
3203: p_primary_target_name||' '||l_dup_hold_table);
3204: end if;
3205: --4161164 : remove IOT , replace with ordinary table and index

Line 3217: if EDW_OWB_COLLECTION_UTIL.drop_table(l_dup_hold_table)=false then

3213: p_high_end;
3214: if g_debug then
3215: write_to_log_file_n(g_stmt||get_time);
3216: end if;
3217: if EDW_OWB_COLLECTION_UTIL.drop_table(l_dup_hold_table)=false then
3218: null;
3219: end if;
3220: execute immediate g_stmt;
3221: if g_debug then

Line 3225: EDW_OWB_COLLECTION_UTIL.create_iot_index(l_dup_hold_table,'row_id',p_op_table_space,g_parallel);

3221: if g_debug then
3222: write_to_log_file_n('Created '||get_time);
3223: end if;
3224: --4161164 : remove IOT , replace with ordinary table and index
3225: EDW_OWB_COLLECTION_UTIL.create_iot_index(l_dup_hold_table,'row_id',p_op_table_space,g_parallel);
3226: l_count:=execute_duplicate_stmt_single(
3227: g_duplicate_collect,
3228: p_update_type,
3229: g_low_system_mem,

Line 3234: edw_owb_collection_util.dump_mem_stats;

3230: p_fstgTableName,
3231: l_dup_hold_table,
3232: g_rollback);
3233: if g_debug then
3234: edw_owb_collection_util.dump_mem_stats;
3235: edw_owb_collection_util.dump_parallel_stats;
3236: end if;
3237: if g_status=false then
3238: --process error

Line 3235: edw_owb_collection_util.dump_parallel_stats;

3231: l_dup_hold_table,
3232: g_rollback);
3233: if g_debug then
3234: edw_owb_collection_util.dump_mem_stats;
3235: edw_owb_collection_util.dump_parallel_stats;
3236: end if;
3237: if g_status=false then
3238: --process error
3239: EDW_OWB_COLLECTION_UTIL.create_status_table(p_status_table,p_op_table_space,'ERROR',l_count);

Line 3239: EDW_OWB_COLLECTION_UTIL.create_status_table(p_status_table,p_op_table_space,'ERROR',l_count);

3235: edw_owb_collection_util.dump_parallel_stats;
3236: end if;
3237: if g_status=false then
3238: --process error
3239: EDW_OWB_COLLECTION_UTIL.create_status_table(p_status_table,p_op_table_space,'ERROR',l_count);
3240: else
3241: EDW_OWB_COLLECTION_UTIL.create_status_table(p_status_table,p_op_table_space,'OK',l_count);
3242: if EDW_OWB_COLLECTION_UTIL.drop_table(l_dup_hold_table)=false then
3243: null;

Line 3241: EDW_OWB_COLLECTION_UTIL.create_status_table(p_status_table,p_op_table_space,'OK',l_count);

3237: if g_status=false then
3238: --process error
3239: EDW_OWB_COLLECTION_UTIL.create_status_table(p_status_table,p_op_table_space,'ERROR',l_count);
3240: else
3241: EDW_OWB_COLLECTION_UTIL.create_status_table(p_status_table,p_op_table_space,'OK',l_count);
3242: if EDW_OWB_COLLECTION_UTIL.drop_table(l_dup_hold_table)=false then
3243: null;
3244: end if;
3245: end if;

Line 3242: if EDW_OWB_COLLECTION_UTIL.drop_table(l_dup_hold_table)=false then

3238: --process error
3239: EDW_OWB_COLLECTION_UTIL.create_status_table(p_status_table,p_op_table_space,'ERROR',l_count);
3240: else
3241: EDW_OWB_COLLECTION_UTIL.create_status_table(p_status_table,p_op_table_space,'OK',l_count);
3242: if EDW_OWB_COLLECTION_UTIL.drop_table(l_dup_hold_table)=false then
3243: null;
3244: end if;
3245: end if;
3246: EXCEPTION when others then

Line 3311: EDW_OWB_COLLECTION_UTIL.set_rollback(p_rollback);

3307: p_dup_hold_table||') ';
3308: if g_debug then
3309: write_to_log_file_n('Going to execute '||l_stmt||' using '||l_status||get_time);
3310: end if;
3311: EDW_OWB_COLLECTION_UTIL.set_rollback(p_rollback);
3312: execute immediate l_stmt using l_status;
3313: l_count:=sql%rowcount;
3314: commit;
3315: if g_debug then

Line 3359: if EDW_OWB_COLLECTION_UTIL.drop_table(g_surr_table)=false then

3355: return false;
3356: end if;
3357: end if;
3358: end if;
3359: if EDW_OWB_COLLECTION_UTIL.drop_table(g_surr_table)=false then
3360: null;
3361: end if;
3362: g_surr_table:=g_surr_table_name;
3363: if g_numberOfDimTables>0 or g_mapping_type='FACT' then --always use this

Line 3392: if EDW_OWB_COLLECTION_UTIL.drop_table(g_surr_table)=false then

3388: end if;
3389: end if;--if g_fstg_all_fk_direct_load=false then
3390: else --consider all fks at one time
3391: begin
3392: if EDW_OWB_COLLECTION_UTIL.drop_table(g_surr_table)=false then
3393: null;
3394: end if;
3395: if g_debug then
3396: write_to_log_file_n('Going to execute g_surrogate_stmt');

Line 3418: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(g_surr_table,instr(g_surr_table,'.')+1,

3414: write_to_log_file_n('create_index_surr_table returned with error');
3415: return false;
3416: end if;
3417: --analyze the table
3418: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(g_surr_table,instr(g_surr_table,'.')+1,
3419: length(g_surr_table)),substr(g_surr_table,1,instr(g_surr_table,'.')-1));
3420: set_execute_flags; --is there insert and or update
3421: if g_status =false then
3422: write_to_log_file_n('set_execute_flags returned with error');

Line 3444: l_cols EDW_OWB_COLLECTION_UTIL.varcharTableType;

3440: */
3441: function create_hd_table(p_count number) return boolean is
3442: l_stmt varchar2(32000);
3443: l_table varchar2(400);
3444: l_cols EDW_OWB_COLLECTION_UTIL.varcharTableType;
3445: l_cols_datatype EDW_OWB_COLLECTION_UTIL.varcharTableType;
3446: l_cols_flag EDW_OWB_COLLECTION_UTIL.booleanTableType;
3447: l_number_cols number;
3448: l_itemset_cols EDW_OWB_COLLECTION_UTIL.varcharTableType;

Line 3445: l_cols_datatype EDW_OWB_COLLECTION_UTIL.varcharTableType;

3441: function create_hd_table(p_count number) return boolean is
3442: l_stmt varchar2(32000);
3443: l_table varchar2(400);
3444: l_cols EDW_OWB_COLLECTION_UTIL.varcharTableType;
3445: l_cols_datatype EDW_OWB_COLLECTION_UTIL.varcharTableType;
3446: l_cols_flag EDW_OWB_COLLECTION_UTIL.booleanTableType;
3447: l_number_cols number;
3448: l_itemset_cols EDW_OWB_COLLECTION_UTIL.varcharTableType;
3449: l_number_itemset_cols number;

Line 3446: l_cols_flag EDW_OWB_COLLECTION_UTIL.booleanTableType;

3442: l_stmt varchar2(32000);
3443: l_table varchar2(400);
3444: l_cols EDW_OWB_COLLECTION_UTIL.varcharTableType;
3445: l_cols_datatype EDW_OWB_COLLECTION_UTIL.varcharTableType;
3446: l_cols_flag EDW_OWB_COLLECTION_UTIL.booleanTableType;
3447: l_number_cols number;
3448: l_itemset_cols EDW_OWB_COLLECTION_UTIL.varcharTableType;
3449: l_number_itemset_cols number;
3450: l_divide number;

Line 3448: l_itemset_cols EDW_OWB_COLLECTION_UTIL.varcharTableType;

3444: l_cols EDW_OWB_COLLECTION_UTIL.varcharTableType;
3445: l_cols_datatype EDW_OWB_COLLECTION_UTIL.varcharTableType;
3446: l_cols_flag EDW_OWB_COLLECTION_UTIL.booleanTableType;
3447: l_number_cols number;
3448: l_itemset_cols EDW_OWB_COLLECTION_UTIL.varcharTableType;
3449: l_number_itemset_cols number;
3450: l_divide number;
3451: l_extent number;
3452: --

Line 3459: if EDW_OWB_COLLECTION_UTIL.drop_table(g_hold_table_temp) = false then

3455: if g_debug then
3456: write_to_log_file_n('In create_hd_table p_count='||p_count||get_time);
3457: end if;
3458: if g_smart_update then
3459: if EDW_OWB_COLLECTION_UTIL.drop_table(g_hold_table_temp) = false then
3460: null;
3461: end if;
3462: end if;
3463: if EDW_OWB_COLLECTION_UTIL.drop_table(g_hold_table) = false then

Line 3463: if EDW_OWB_COLLECTION_UTIL.drop_table(g_hold_table) = false then

3459: if EDW_OWB_COLLECTION_UTIL.drop_table(g_hold_table_temp) = false then
3460: null;
3461: end if;
3462: end if;
3463: if EDW_OWB_COLLECTION_UTIL.drop_table(g_hold_table) = false then
3464: null;
3465: end if;
3466: begin
3467: if g_debug then

Line 3486: if EDW_OWB_COLLECTION_UTIL.get_db_columns_for_table(l_table,l_cols,l_cols_datatype,l_number_cols,

3482: if g_smart_update then
3483: l_number_itemset_cols:=g_number_smart_update_cols;
3484: l_itemset_cols:=g_smart_update_cols;
3485: l_table:=substr(g_hold_table_temp,instr(g_hold_table_temp,'.')+1,length(g_hold_table_temp));
3486: if EDW_OWB_COLLECTION_UTIL.get_db_columns_for_table(l_table,l_cols,l_cols_datatype,l_number_cols,
3487: g_bis_owner)=false then
3488: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;
3489: g_status:=false;
3490: return false;

Line 3488: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;

3484: l_itemset_cols:=g_smart_update_cols;
3485: l_table:=substr(g_hold_table_temp,instr(g_hold_table_temp,'.')+1,length(g_hold_table_temp));
3486: if EDW_OWB_COLLECTION_UTIL.get_db_columns_for_table(l_table,l_cols,l_cols_datatype,l_number_cols,
3487: g_bis_owner)=false then
3488: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;
3489: g_status:=false;
3490: return false;
3491: end if;
3492: if g_debug then

Line 3519: if EDW_OWB_COLLECTION_UTIL.value_in_table(l_itemset_cols,l_number_itemset_cols,l_cols(i)) then

3515: end loop;
3516: else
3517: for i in 1..l_number_cols loop
3518: if l_cols_flag(i) then
3519: if EDW_OWB_COLLECTION_UTIL.value_in_table(l_itemset_cols,l_number_itemset_cols,l_cols(i)) then
3520: if l_cols(i)<>'LAST_UPDATE_DATE' and l_cols(i)<>'CREATION_DATE' and l_cols(i)<>'ROW_ID1' then
3521: l_cols_flag(i):=true;
3522: else
3523: l_cols_flag(i):=false;

Line 3605: if EDW_OWB_COLLECTION_UTIL.drop_table(g_hold_table_temp) = false then

3601: if g_debug then
3602: write_to_log_file_n('Created index on '||g_hold_table);
3603: end if;
3604: if g_smart_update then
3605: if EDW_OWB_COLLECTION_UTIL.drop_table(g_hold_table_temp) = false then
3606: null;
3607: end if;
3608: end if;
3609: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(g_hold_table,instr(g_hold_table,'.')+1,

Line 3609: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(g_hold_table,instr(g_hold_table,'.')+1,

3605: if EDW_OWB_COLLECTION_UTIL.drop_table(g_hold_table_temp) = false then
3606: null;
3607: end if;
3608: end if;
3609: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(g_hold_table,instr(g_hold_table,'.')+1,
3610: length(g_hold_table)),substr(g_hold_table,1,instr(g_hold_table,'.')-1));
3611: if g_parallel_drill_down and g_temp_log=false then
3612: --g_temp_log=false means this is not the lowest level
3613: l_table:=g_bis_owner||'.TAB_'||g_primary_target||'_HDUR_'||g_job_id||'_'||p_count;

Line 3619: if edw_owb_collection_util.drop_table(l_table)=false then

3615: if g_parallel is not null then
3616: l_stmt:=l_stmt||' parallel (degree '||g_parallel||') ';
3617: end if;
3618: l_stmt:=l_stmt||' as select row_id1 row_id from '||g_hold_table;
3619: if edw_owb_collection_util.drop_table(l_table)=false then
3620: null;
3621: end if;
3622: if g_debug then
3623: write_to_log_file_n(l_stmt||get_time);

Line 3644: l_rowid EDW_OWB_COLLECTION_UTIL.rowidTableType;

3640: l_stmt varchar2(10000);
3641: TYPE CurTyp IS REF CURSOR;
3642: cv CurTyp;
3643: l_count number;
3644: l_rowid EDW_OWB_COLLECTION_UTIL.rowidTableType;
3645: l_total_update number:=0;
3646: l_update_type varchar2(400);
3647: l_hold_table varchar2(400);
3648: Begin

Line 3666: if EDW_OWB_COLLECTION_UTIL.drop_table(l_hold_table)=false then

3662: if g_parallel is not null then
3663: l_stmt:=l_stmt||' parallel (degree '||g_parallel||') ';
3664: end if;
3665: l_stmt:=l_stmt||' as select row_id1 from '||g_hold_table;
3666: if EDW_OWB_COLLECTION_UTIL.drop_table(l_hold_table)=false then
3667: null;
3668: end if;
3669: if g_debug then
3670: write_to_log_file_n('Going to execute '||l_stmt||get_time);

Line 3700: if EDW_OWB_COLLECTION_UTIL.drop_table(l_hold_table)=false then

3696: execute immediate g_update_stmt_row using l_rowid(i),l_rowid(i);
3697: end loop;
3698: l_total_update:=l_total_update+l_count;
3699: end if;
3700: if EDW_OWB_COLLECTION_UTIL.drop_table(l_hold_table)=false then
3701: null;
3702: end if;
3703: elsif l_update_type='MASS' then
3704: begin

Line 3705: EDW_OWB_COLLECTION_UTIL.set_rollback(g_rollback);

3701: null;
3702: end if;
3703: elsif l_update_type='MASS' then
3704: begin
3705: EDW_OWB_COLLECTION_UTIL.set_rollback(g_rollback);
3706: execute immediate g_update_stmt;
3707: l_total_update:=sql%rowcount;
3708: exception when others then
3709: if sqlcode=-4030 then

Line 3736: EDW_OWB_COLLECTION_UTIL.set_rollback(g_rollback);

3732: if g_debug then
3733: write_to_log_file_n('Going to execute '||l_stmt||get_time);
3734: end if;
3735: begin
3736: EDW_OWB_COLLECTION_UTIL.set_rollback(g_rollback);
3737: execute immediate l_stmt;
3738: if g_debug then
3739: write_to_log_file_n('Deleted '||sql%rowcount||' rows'||get_time);
3740: end if;

Line 3752: EDW_OWB_COLLECTION_UTIL.set_rollback(g_rollback);

3748: begin
3749: if g_debug then
3750: write_to_log_file_n('Going to execute g_update_stmt'||get_time);
3751: end if;
3752: EDW_OWB_COLLECTION_UTIL.set_rollback(g_rollback);
3753: execute immediate g_update_stmt;
3754: l_total_update:=sql%rowcount;
3755: exception when others then
3756: g_status:=false;

Line 3781: l_rowid EDW_OWB_COLLECTION_UTIL.rowidTableType;

3777: l_stmt varchar2(10000);
3778: TYPE CurTyp IS REF CURSOR;
3779: cv CurTyp;
3780: l_count number;
3781: l_rowid EDW_OWB_COLLECTION_UTIL.rowidTableType;
3782: l_total_delete number:=0;
3783: Begin
3784: if g_debug then
3785: write_to_log_file_n('In execute_delete_stmt'||get_time);

Line 3815: EDW_OWB_COLLECTION_UTIL.set_rollback(g_rollback);

3811: end if;
3812: elsif g_update_type='MASS' or g_update_type='DELETE-INSERT' then
3813: begin
3814: --create a rowid table here and use that for deletes
3815: EDW_OWB_COLLECTION_UTIL.set_rollback(g_rollback);
3816: execute immediate g_delete_stmt;
3817: l_total_delete:=sql%rowcount;
3818: exception when others then
3819: g_status:=false;

Line 3855: if EDW_OWB_COLLECTION_UTIL.drop_table(g_fact_audit_net_table)=false then

3851: end if;
3852: end if;
3853: --g_fact_audit_net_table is dropped here for error recovery
3854: if g_fact_audit or g_fact_net_change then
3855: if EDW_OWB_COLLECTION_UTIL.drop_table(g_fact_audit_net_table)=false then
3856: null;
3857: end if;
3858: end if;
3859: end if;

Line 3930: EDW_OWB_COLLECTION_UTIL.alter_session('NO-PARALLEL');

3926: end if;
3927: insert_into_load_progress_d(g_load_pk,g_primary_target_name,g_jobid_stmt||'Update '||g_primary_target_name,sysdate,
3928: null,'MAPPING','UPDATE',g_jobid_stmt||'UPDATE'||p_count,'I');
3929: if g_parallel is null then
3930: EDW_OWB_COLLECTION_UTIL.alter_session('NO-PARALLEL');
3931: else
3932: if g_is_source=false and g_object_type='FACT' then
3933: if edw_owb_collection_util.is_source_for_fast_refresh_mv(g_primary_target_name,g_table_owner)=1 then
3934: --3529591

Line 3933: if edw_owb_collection_util.is_source_for_fast_refresh_mv(g_primary_target_name,g_table_owner)=1 then

3929: if g_parallel is null then
3930: EDW_OWB_COLLECTION_UTIL.alter_session('NO-PARALLEL');
3931: else
3932: if g_is_source=false and g_object_type='FACT' then
3933: if edw_owb_collection_util.is_source_for_fast_refresh_mv(g_primary_target_name,g_table_owner)=1 then
3934: --3529591
3935: EDW_OWB_COLLECTION_UTIL.alter_session('NO-PARALLEL');
3936: else
3937: null;

Line 3935: EDW_OWB_COLLECTION_UTIL.alter_session('NO-PARALLEL');

3931: else
3932: if g_is_source=false and g_object_type='FACT' then
3933: if edw_owb_collection_util.is_source_for_fast_refresh_mv(g_primary_target_name,g_table_owner)=1 then
3934: --3529591
3935: EDW_OWB_COLLECTION_UTIL.alter_session('NO-PARALLEL');
3936: else
3937: null;
3938: end if;
3939: else

Line 3940: EDW_OWB_COLLECTION_UTIL.alter_session('NO-PARALLEL');

3936: else
3937: null;
3938: end if;
3939: else
3940: EDW_OWB_COLLECTION_UTIL.alter_session('NO-PARALLEL');
3941: end if;
3942: end if;
3943: l_count:=execute_update_stmt;
3944: g_total_update:=l_count;

Line 3949: EDW_OWB_COLLECTION_UTIL.alter_session('PARALLEL');

3945: if l_count is null then
3946: return false;
3947: end if;
3948: if g_parallel is not null then
3949: EDW_OWB_COLLECTION_UTIL.alter_session('PARALLEL');
3950: end if;
3951: insert_into_load_progress_d(g_load_pk,null,null,null,sysdate,null,null,g_jobid_stmt||'UPDATE'||p_count,'U');
3952: g_number_rows_processed:=g_number_rows_processed+l_count;
3953: else

Line 4009: edw_owb_collection_util.dump_mem_stats;

4005: ---
4006: Begin
4007: if g_debug then
4008: write_to_debug_n('In execute_all'||get_time);
4009: edw_owb_collection_util.dump_mem_stats;
4010: edw_owb_collection_util.dump_parallel_stats;
4011: end if;
4012: g_number_rows_dangling:=0;
4013: --executes all the statements

Line 4010: edw_owb_collection_util.dump_parallel_stats;

4006: Begin
4007: if g_debug then
4008: write_to_debug_n('In execute_all'||get_time);
4009: edw_owb_collection_util.dump_mem_stats;
4010: edw_owb_collection_util.dump_parallel_stats;
4011: end if;
4012: g_number_rows_dangling:=0;
4013: --executes all the statements
4014: if g_use_mti then

Line 4045: edw_owb_collection_util.dump_mem_stats;

4041: end if;
4042: insert_into_load_progress_d(g_load_pk,null,null,null,sysdate,null,null,g_jobid_stmt||'CROPTAB'||p_count,'U');
4043: --here we set the join to the stg table
4044: if g_debug then
4045: edw_owb_collection_util.dump_mem_stats;
4046: edw_owb_collection_util.dump_parallel_stats;
4047: end if;
4048: if set_stg_nl_parameters(g_number_rows_ready)=false then
4049: g_stg_join_nl:=true;

Line 4046: edw_owb_collection_util.dump_parallel_stats;

4042: insert_into_load_progress_d(g_load_pk,null,null,null,sysdate,null,null,g_jobid_stmt||'CROPTAB'||p_count,'U');
4043: --here we set the join to the stg table
4044: if g_debug then
4045: edw_owb_collection_util.dump_mem_stats;
4046: edw_owb_collection_util.dump_parallel_stats;
4047: end if;
4048: if set_stg_nl_parameters(g_number_rows_ready)=false then
4049: g_stg_join_nl:=true;
4050: end if;

Line 4073: edw_owb_collection_util.dump_mem_stats;

4069: return;
4070: end if;
4071: insert_into_load_progress_d(g_load_pk,null,null,null,sysdate,null,null,g_jobid_stmt||'CRFKT'||p_count,'U');
4072: if g_debug then
4073: edw_owb_collection_util.dump_mem_stats;
4074: edw_owb_collection_util.dump_parallel_stats;
4075: end if;
4076: --we launch a separate thread here to update the interface table with DANGLING or COLLECTED
4077: --if the job launched has not started by the time execute_insert_update_delete is done, then

Line 4074: edw_owb_collection_util.dump_parallel_stats;

4070: end if;
4071: insert_into_load_progress_d(g_load_pk,null,null,null,sysdate,null,null,g_jobid_stmt||'CRFKT'||p_count,'U');
4072: if g_debug then
4073: edw_owb_collection_util.dump_mem_stats;
4074: edw_owb_collection_util.dump_parallel_stats;
4075: end if;
4076: --we launch a separate thread here to update the interface table with DANGLING or COLLECTED
4077: --if the job launched has not started by the time execute_insert_update_delete is done, then
4078: --kill the job and do manually

Line 4095: edw_owb_collection_util.dump_mem_stats;

4091: write_to_log_file_n('execute_insert_update_delete returned with error');
4092: return;
4093: end if;
4094: if g_debug then
4095: edw_owb_collection_util.dump_mem_stats;
4096: edw_owb_collection_util.dump_parallel_stats;
4097: end if;
4098: if l_int_upd_job_id is not null then
4099: declare

Line 4096: edw_owb_collection_util.dump_parallel_stats;

4092: return;
4093: end if;
4094: if g_debug then
4095: edw_owb_collection_util.dump_mem_stats;
4096: edw_owb_collection_util.dump_parallel_stats;
4097: end if;
4098: if l_int_upd_job_id is not null then
4099: declare
4100: l_status varchar2(400);

Line 4103: if edw_owb_collection_util.check_and_wait_for_job(l_int_upd_job_id,l_int_upd_status_table,null,

4099: declare
4100: l_status varchar2(400);
4101: l_message varchar2(4000);
4102: begin
4103: if edw_owb_collection_util.check_and_wait_for_job(l_int_upd_job_id,l_int_upd_status_table,null,
4104: g_sleep_time,l_status,l_message)=false then
4105: g_status_message:=EDW_OWB_COLLECTION_UTIL.get_status_message;
4106: g_status:=false;
4107: return;

Line 4105: g_status_message:=EDW_OWB_COLLECTION_UTIL.get_status_message;

4101: l_message varchar2(4000);
4102: begin
4103: if edw_owb_collection_util.check_and_wait_for_job(l_int_upd_job_id,l_int_upd_status_table,null,
4104: g_sleep_time,l_status,l_message)=false then
4105: g_status_message:=EDW_OWB_COLLECTION_UTIL.get_status_message;
4106: g_status:=false;
4107: return;
4108: end if;
4109: if l_status='NO JOB' then

Line 4120: if edw_owb_collection_util.drop_table(l_int_upd_status_table)=false then

4116: end if;
4117: end if;
4118: end;
4119: end if;
4120: if edw_owb_collection_util.drop_table(l_int_upd_status_table)=false then
4121: null;
4122: end if;
4123: if l_int_upd_job_id is null then
4124: if execute_dangling_collected(p_count)=false then

Line 4128: edw_owb_collection_util.dump_mem_stats;

4124: if execute_dangling_collected(p_count)=false then
4125: return;
4126: end if;
4127: if g_debug then
4128: edw_owb_collection_util.dump_mem_stats;
4129: edw_owb_collection_util.dump_parallel_stats;
4130: end if;
4131: end if;
4132: if calc_rows_processed_errors = false then

Line 4129: edw_owb_collection_util.dump_parallel_stats;

4125: return;
4126: end if;
4127: if g_debug then
4128: edw_owb_collection_util.dump_mem_stats;
4129: edw_owb_collection_util.dump_parallel_stats;
4130: end if;
4131: end if;
4132: if calc_rows_processed_errors = false then
4133: return;

Line 4166: if edw_owb_collection_util.drop_table(p_table)=false then

4162: if g_debug then
4163: write_to_log_file_n('In procedure execute_dangling_collected. Going to launch dbms job'||get_time);
4164: end if;
4165: --p_table is the status table
4166: if edw_owb_collection_util.drop_table(p_table)=false then
4167: null;
4168: end if;
4169: if g_debug then
4170: l_debug:='Y';

Line 4179: if edw_owb_collection_util.g_version_GT_1159 then

4175: l_low_system_mem:='Y';
4176: else
4177: l_low_system_mem:='N';
4178: end if;
4179: if edw_owb_collection_util.g_version_GT_1159 then
4180: l_version_GT_1159:='Y';
4181: else
4182: l_version_GT_1159:='N';
4183: end if;

Line 4305: edw_owb_collection_util.g_version_GT_1159:=true;

4301: g_surr_count:=p_surr_count;
4302: g_number_rows_processed:=p_surr_count;
4303: ----
4304: if p_version_GT_1159='Y' then
4305: edw_owb_collection_util.g_version_GT_1159:=true;
4306: else
4307: edw_owb_collection_util.g_version_GT_1159:=false;
4308: end if;
4309: if p_debug='Y' then

Line 4307: edw_owb_collection_util.g_version_GT_1159:=false;

4303: ----
4304: if p_version_GT_1159='Y' then
4305: edw_owb_collection_util.g_version_GT_1159:=true;
4306: else
4307: edw_owb_collection_util.g_version_GT_1159:=false;
4308: end if;
4309: if p_debug='Y' then
4310: g_debug:=true;
4311: edw_owb_collection_util.setup_conc_program_log('INT_UPD_'||g_primary_target||'_'||g_job_id);

Line 4311: edw_owb_collection_util.setup_conc_program_log('INT_UPD_'||g_primary_target||'_'||g_job_id);

4307: edw_owb_collection_util.g_version_GT_1159:=false;
4308: end if;
4309: if p_debug='Y' then
4310: g_debug:=true;
4311: edw_owb_collection_util.setup_conc_program_log('INT_UPD_'||g_primary_target||'_'||g_job_id);
4312: else
4313: g_debug:=false;
4314: end if;
4315: g_update_type:=p_update_type;

Line 4327: edw_owb_collection_util.alter_session('PARALLEL',g_parallel);

4323: if g_parallel=0 then
4324: g_parallel:=null;
4325: end if;
4326: if g_parallel is not null and g_parallel>0 then
4327: edw_owb_collection_util.alter_session('PARALLEL',g_parallel);
4328: end if;
4329: g_sort_area_size:=p_sort_area_size;
4330: if g_sort_area_size=0 then
4331: g_sort_area_size:=null;

Line 4338: edw_owb_collection_util.alter_session('SORT_AREA_SIZE',g_sort_area_size);

4334: if g_hash_area_size=0 then
4335: g_hash_area_size:=null;
4336: end if;
4337: if g_sort_area_size is not null then
4338: edw_owb_collection_util.alter_session('SORT_AREA_SIZE',g_sort_area_size);
4339: end if;
4340: if g_hash_area_size is not null then
4341: edw_owb_collection_util.alter_session('HASH_AREA_SIZE',g_hash_area_size);
4342: end if;

Line 4341: edw_owb_collection_util.alter_session('HASH_AREA_SIZE',g_hash_area_size);

4337: if g_sort_area_size is not null then
4338: edw_owb_collection_util.alter_session('SORT_AREA_SIZE',g_sort_area_size);
4339: end if;
4340: if g_hash_area_size is not null then
4341: edw_owb_collection_util.alter_session('HASH_AREA_SIZE',g_hash_area_size);
4342: end if;
4343: g_rollback:=p_rollback;
4344: if g_rollback='null' then
4345: g_rollback:=null;

Line 4359: edw_owb_collection_util.dump_mem_stats;

4355: write_to_log_file_n(l_stmt);
4356: end if;
4357: execute immediate l_stmt;
4358: if g_debug then
4359: edw_owb_collection_util.dump_mem_stats;
4360: edw_owb_collection_util.dump_parallel_stats;
4361: end if;
4362: ----
4363: if execute_dangling_collected(p_count)=false then

Line 4360: edw_owb_collection_util.dump_parallel_stats;

4356: end if;
4357: execute immediate l_stmt;
4358: if g_debug then
4359: edw_owb_collection_util.dump_mem_stats;
4360: edw_owb_collection_util.dump_parallel_stats;
4361: end if;
4362: ----
4363: if execute_dangling_collected(p_count)=false then
4364: execute immediate 'insert into '||p_table||'(status,message) values(:1,:2)' using

Line 4371: edw_owb_collection_util.dump_mem_stats;

4367: execute immediate 'insert into '||p_table||'(status,message) values(:1,:2)' using
4368: 'SUCCESSS','SUCCESS';
4369: end if;
4370: if g_debug then
4371: edw_owb_collection_util.dump_mem_stats;
4372: edw_owb_collection_util.dump_parallel_stats;
4373: end if;
4374: commit;
4375: Exception when others then

Line 4372: edw_owb_collection_util.dump_parallel_stats;

4368: 'SUCCESSS','SUCCESS';
4369: end if;
4370: if g_debug then
4371: edw_owb_collection_util.dump_mem_stats;
4372: edw_owb_collection_util.dump_parallel_stats;
4373: end if;
4374: commit;
4375: Exception when others then
4376: execute immediate 'insert into '||p_table||'(status,message) values(:1,:2)' using

Line 4506: if EDW_OWB_COLLECTION_UTIL.drop_table(l_surr_rowid_table)=false then

4502: if g_parallel is not null then
4503: l_stmt:=l_stmt||' parallel (degree '||g_parallel||') ';
4504: end if;
4505: l_stmt:=l_stmt||' as select '||p_rowid_col||' from '||p_src_table||' '||p_where_stmt;
4506: if EDW_OWB_COLLECTION_UTIL.drop_table(l_surr_rowid_table)=false then
4507: null;
4508: end if;
4509: if g_debug then
4510: write_to_log_file_n('Going to execute '||l_stmt||get_time);

Line 4517: EDW_OWB_COLLECTION_UTIL.create_iot_index(l_surr_rowid_table,p_rowid_col,g_op_table_space,g_parallel);

4513: if g_debug then
4514: write_to_log_file_n('Created '||l_surr_rowid_table||' with '||sql%rowcount||' records '||get_time);
4515: end if;
4516: --4161164 : remove IOT , replace with ordinary table and index
4517: EDW_OWB_COLLECTION_UTIL.create_iot_index(l_surr_rowid_table,p_rowid_col,g_op_table_space,g_parallel);
4518: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(l_surr_rowid_table,instr(l_surr_rowid_table,'.')+1,
4519: length(l_surr_rowid_table)),substr(l_surr_rowid_table,1,instr(l_surr_rowid_table,'.')-1));
4520: else
4521: l_surr_rowid_table:=p_src_table;

Line 4518: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(l_surr_rowid_table,instr(l_surr_rowid_table,'.')+1,

4514: write_to_log_file_n('Created '||l_surr_rowid_table||' with '||sql%rowcount||' records '||get_time);
4515: end if;
4516: --4161164 : remove IOT , replace with ordinary table and index
4517: EDW_OWB_COLLECTION_UTIL.create_iot_index(l_surr_rowid_table,p_rowid_col,g_op_table_space,g_parallel);
4518: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(l_surr_rowid_table,instr(l_surr_rowid_table,'.')+1,
4519: length(l_surr_rowid_table)),substr(l_surr_rowid_table,1,instr(l_surr_rowid_table,'.')-1));
4520: else
4521: l_surr_rowid_table:=p_src_table;
4522: end if;

Line 4532: EDW_OWB_COLLECTION_UTIL.set_rollback(g_rollback);

4528: '(select '||p_rowid_col||' from '||l_surr_rowid_table||')';
4529: if g_debug then
4530: write_to_log_file_n('Going to execute '||l_stmt||get_time);
4531: end if;
4532: EDW_OWB_COLLECTION_UTIL.set_rollback(g_rollback);
4533: execute immediate l_stmt;
4534: if g_debug then
4535: write_to_log_file_n('Updated '||sql%rowcount||' records to '''||p_status||''''||get_time);
4536: end if;

Line 4539: if EDW_OWB_COLLECTION_UTIL.drop_table(l_surr_rowid_table)=false then

4535: write_to_log_file_n('Updated '||sql%rowcount||' records to '''||p_status||''''||get_time);
4536: end if;
4537: commit;
4538: if p_create_iot then
4539: if EDW_OWB_COLLECTION_UTIL.drop_table(l_surr_rowid_table)=false then
4540: null;
4541: end if;
4542: end if;
4543: elsif l_update_type='ROW-BY-ROW' then

Line 4579: if EDW_OWB_COLLECTION_UTIL.check_table_column(g_fact_dlog,'round') then

4575: Begin
4576: if g_debug then
4577: write_to_log_file_n('In create_dlog_lookup_table ');
4578: end if;
4579: if EDW_OWB_COLLECTION_UTIL.check_table_column(g_fact_dlog,'round') then
4580: l_stmt:='select max(round) from '||g_fact_dlog;
4581: if g_debug then
4582: write_to_log_file_n(l_stmt||get_time);
4583: end if;

Line 4603: if EDW_OWB_COLLECTION_UTIL.drop_table(g_update_dlog_lookup_table)=false then

4599: if g_parallel is not null and instr(g_fact_dlog,g_bis_owner||'.') = 0 then
4600: l_stmt:=l_stmt||' /*+PARALLEL('||g_fact_dlog||','||g_parallel||')*/ ';
4601: end if;
4602: l_stmt:=l_stmt||' row_id row_id, rowid row_id1 from '||g_fact_dlog;
4603: if EDW_OWB_COLLECTION_UTIL.drop_table(g_update_dlog_lookup_table)=false then
4604: null;
4605: end if;
4606: if g_debug then
4607: write_to_log_file_n('Going to execute '||l_stmt||get_time);

Line 4613: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(g_update_dlog_lookup_table,instr(g_update_dlog_lookup_table,'.')+1,

4609: execute immediate l_stmt;
4610: if g_debug then
4611: write_to_log_file('Created '||g_update_dlog_lookup_table||' with '||sql%rowcount||' rows '||get_time);
4612: end if;
4613: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(g_update_dlog_lookup_table,instr(g_update_dlog_lookup_table,'.')+1,
4614: length(g_update_dlog_lookup_table)),substr(g_update_dlog_lookup_table,1,instr(g_update_dlog_lookup_table,'.')-1));
4615: return true;
4616: Exception when others then
4617: g_status_message:=sqlerrm;

Line 4649: l_owner:=EDW_OWB_COLLECTION_UTIL.get_table_owner(g_fact_dlog);

4645: l_dlog:=substr(g_fact_dlog,instr(g_fact_dlog,'.')+1,length(g_fact_dlog));
4646: l_owner:=g_bis_owner;
4647: else
4648: l_dlog:=g_fact_dlog;
4649: l_owner:=EDW_OWB_COLLECTION_UTIL.get_table_owner(g_fact_dlog);
4650: end if;
4651: if EDW_OWB_COLLECTION_UTIL.get_db_columns_for_table(l_dlog,g_dlog_columns,g_number_dlog_columns,l_owner) = false then
4652: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;
4653: g_status:=false;

Line 4651: if EDW_OWB_COLLECTION_UTIL.get_db_columns_for_table(l_dlog,g_dlog_columns,g_number_dlog_columns,l_owner) = false then

4647: else
4648: l_dlog:=g_fact_dlog;
4649: l_owner:=EDW_OWB_COLLECTION_UTIL.get_table_owner(g_fact_dlog);
4650: end if;
4651: if EDW_OWB_COLLECTION_UTIL.get_db_columns_for_table(l_dlog,g_dlog_columns,g_number_dlog_columns,l_owner) = false then
4652: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;
4653: g_status:=false;
4654: write_to_log_file_n(g_status_message);
4655: return;

Line 4652: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;

4648: l_dlog:=g_fact_dlog;
4649: l_owner:=EDW_OWB_COLLECTION_UTIL.get_table_owner(g_fact_dlog);
4650: end if;
4651: if EDW_OWB_COLLECTION_UTIL.get_db_columns_for_table(l_dlog,g_dlog_columns,g_number_dlog_columns,l_owner) = false then
4652: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;
4653: g_status:=false;
4654: write_to_log_file_n(g_status_message);
4655: return;
4656: end if;

Line 4679: if EDW_OWB_COLLECTION_UTIL.value_in_table(g_dlog_columns,g_number_dlog_columns,'DLOG_LAST_UPDATE_DATE')=true then

4675: g_fact_dlog_stmt:=g_fact_dlog_stmt||g_dlog_columns(i)||',';
4676: end if;
4677: end loop;
4678: g_fact_dlog_stmt:=g_fact_dlog_stmt||'row_id,pk_key,round ';
4679: if EDW_OWB_COLLECTION_UTIL.value_in_table(g_dlog_columns,g_number_dlog_columns,'DLOG_LAST_UPDATE_DATE')=true then
4680: g_fact_dlog_stmt:=g_fact_dlog_stmt||',DLOG_LAST_UPDATE_DATE ';
4681: end if;
4682: g_fact_dlog_stmt:=g_fact_dlog_stmt||') select /*+ORDERED USE_NL('||g_object_name||')*/ ';
4683: if g_parallel is not null then

Line 4694: if EDW_OWB_COLLECTION_UTIL.value_in_table(g_dlog_columns,g_number_dlog_columns,'DLOG_LAST_UPDATE_DATE')=true then

4690: end if;
4691: end loop;
4692: g_fact_dlog_stmt:=g_fact_dlog_stmt||g_object_name||'.rowid,'||g_object_name||'.'||g_factPKNameKey||
4693: ','||g_dlog_rowid_table||'.round';
4694: if EDW_OWB_COLLECTION_UTIL.value_in_table(g_dlog_columns,g_number_dlog_columns,'DLOG_LAST_UPDATE_DATE')=true then
4695: g_fact_dlog_stmt:=g_fact_dlog_stmt||',SYSDATE ';
4696: end if;
4697: g_fact_dlog_stmt:=g_fact_dlog_stmt||' from '||g_dlog_rowid_table||','||g_object_name;
4698: g_fact_dlog_stmt:=g_fact_dlog_stmt||' where '||g_dlog_rowid_table||'.row_id='||g_object_name||'.rowid';

Line 4714: if EDW_OWB_COLLECTION_UTIL.value_in_table(g_dlog_columns,g_number_dlog_columns,'DLOG_LAST_UPDATE_DATE')=true then

4710: g_fact_delete_dlog_stmt:=g_fact_delete_dlog_stmt||g_dlog_columns(i)||',';
4711: end if;
4712: end loop;
4713: g_fact_delete_dlog_stmt:=g_fact_delete_dlog_stmt||'row_id,pk_key,round ';
4714: if EDW_OWB_COLLECTION_UTIL.value_in_table(g_dlog_columns,g_number_dlog_columns,'DLOG_LAST_UPDATE_DATE')=true then
4715: g_fact_delete_dlog_stmt:=g_fact_delete_dlog_stmt||',DLOG_LAST_UPDATE_DATE ';
4716: end if;
4717: g_fact_delete_dlog_stmt:=g_fact_delete_dlog_stmt||') select /*+ORDERED USE_NL('||g_object_name||')*/ ';
4718: if g_parallel is not null then

Line 4729: if EDW_OWB_COLLECTION_UTIL.value_in_table(g_dlog_columns,g_number_dlog_columns,'DLOG_LAST_UPDATE_DATE')=true then

4725: end if;
4726: end loop;
4727: g_fact_delete_dlog_stmt:=g_fact_delete_dlog_stmt||g_object_name||'.rowid,'||g_object_name||'.'||g_factPKNameKey||
4728: ','||g_dlog_rowid_table||'.round';
4729: if EDW_OWB_COLLECTION_UTIL.value_in_table(g_dlog_columns,g_number_dlog_columns,'DLOG_LAST_UPDATE_DATE')=true then
4730: g_fact_delete_dlog_stmt:=g_fact_delete_dlog_stmt||',SYSDATE ';
4731: end if;
4732: g_fact_delete_dlog_stmt:=g_fact_delete_dlog_stmt||' from '||g_dlog_rowid_table||','||g_object_name;
4733: g_fact_delete_dlog_stmt:=g_fact_delete_dlog_stmt||' where '||

Line 4756: if EDW_OWB_COLLECTION_UTIL.drop_table(l_dlog_rowid_table)=false then

4752: end if;
4753: if g_dlog_has_data then
4754: l_dlog_rowid_table:=g_dlog_rowid_table||'T';
4755: l_distinct_table:=g_dlog_rowid_table||'D';
4756: if EDW_OWB_COLLECTION_UTIL.drop_table(l_dlog_rowid_table)=false then
4757: null;
4758: end if;
4759: l_stmt:='create table '||l_dlog_rowid_table||' tablespace '||g_op_table_space;
4760: if g_parallel is not null then

Line 4776: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(l_dlog_rowid_table,instr(l_dlog_rowid_table,'.')+1,

4772: execute immediate l_stmt;
4773: if g_debug then
4774: write_to_log_file('Created '||l_dlog_rowid_table||' with '||sql%rowcount||' rows '||get_time);
4775: end if;
4776: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(l_dlog_rowid_table,instr(l_dlog_rowid_table,'.')+1,
4777: length(l_dlog_rowid_table)),substr(l_dlog_rowid_table,1,instr(l_dlog_rowid_table,'.')-1));
4778: if EDW_OWB_COLLECTION_UTIL.drop_table(l_distinct_table)=false then
4779: null;
4780: end if;

Line 4778: if EDW_OWB_COLLECTION_UTIL.drop_table(l_distinct_table)=false then

4774: write_to_log_file('Created '||l_dlog_rowid_table||' with '||sql%rowcount||' rows '||get_time);
4775: end if;
4776: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(l_dlog_rowid_table,instr(l_dlog_rowid_table,'.')+1,
4777: length(l_dlog_rowid_table)),substr(l_dlog_rowid_table,1,instr(l_dlog_rowid_table,'.')-1));
4778: if EDW_OWB_COLLECTION_UTIL.drop_table(l_distinct_table)=false then
4779: null;
4780: end if;
4781: l_stmt:='create table '||l_distinct_table||' tablespace '||g_op_table_space;
4782: if g_parallel is not null then

Line 4786: if EDW_OWB_COLLECTION_UTIL.drop_table(l_distinct_table)=false then

4782: if g_parallel is not null then
4783: l_stmt:=l_stmt||' parallel (degree '||g_parallel||') ';
4784: end if;
4785: l_stmt:=l_stmt||' as select distinct row_id from '||g_update_dlog_lookup_table;
4786: if EDW_OWB_COLLECTION_UTIL.drop_table(l_distinct_table)=false then
4787: null;
4788: end if;
4789: if g_debug then
4790: write_to_log_file_n('Going to execute '||l_stmt||get_time);

Line 4796: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(l_distinct_table,instr(l_distinct_table,'.')+1,

4792: execute immediate l_stmt;
4793: if g_debug then
4794: write_to_log_file('Created with '||sql%rowcount||' rows '||get_time);
4795: end if;
4796: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(l_distinct_table,instr(l_distinct_table,'.')+1,
4797: length(l_distinct_table)),substr(l_distinct_table,1,instr(l_distinct_table,'.')-1));
4798: l_stmt:='create table '||g_dlog_rowid_table||' tablespace '||g_op_table_space;
4799: if g_parallel is not null then
4800: l_stmt:=l_stmt||' parallel (degree '||g_parallel||') ';

Line 4805: if EDW_OWB_COLLECTION_UTIL.drop_table(g_dlog_rowid_table)=false then

4801: end if;
4802: l_stmt:=l_stmt||' ';
4803: l_stmt:=l_stmt||' as select A.row_id,decode(B.rowid,null,0,'||g_max_round||') round from '||
4804: l_dlog_rowid_table||' A,'||l_distinct_table||' B where A.row_id=B.row_id(+)';
4805: if EDW_OWB_COLLECTION_UTIL.drop_table(g_dlog_rowid_table)=false then
4806: null;
4807: end if;
4808: if g_debug then
4809: write_to_log_file_n('Going to execute '||l_stmt||get_time);

Line 4815: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(g_dlog_rowid_table,instr(g_dlog_rowid_table,'.')+1,

4811: execute immediate l_stmt;
4812: if g_debug then
4813: write_to_log_file('Created '||g_dlog_rowid_table||' with '||sql%rowcount||' rows '||get_time);
4814: end if;
4815: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(g_dlog_rowid_table,instr(g_dlog_rowid_table,'.')+1,
4816: length(g_dlog_rowid_table)),substr(g_dlog_rowid_table,1,instr(g_dlog_rowid_table,'.')-1));
4817: if EDW_OWB_COLLECTION_UTIL.drop_table(l_dlog_rowid_table)=false then
4818: null;
4819: end if;

Line 4817: if EDW_OWB_COLLECTION_UTIL.drop_table(l_dlog_rowid_table)=false then

4813: write_to_log_file('Created '||g_dlog_rowid_table||' with '||sql%rowcount||' rows '||get_time);
4814: end if;
4815: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(g_dlog_rowid_table,instr(g_dlog_rowid_table,'.')+1,
4816: length(g_dlog_rowid_table)),substr(g_dlog_rowid_table,1,instr(g_dlog_rowid_table,'.')-1));
4817: if EDW_OWB_COLLECTION_UTIL.drop_table(l_dlog_rowid_table)=false then
4818: null;
4819: end if;
4820: if EDW_OWB_COLLECTION_UTIL.drop_table(l_distinct_table)=false then
4821: null;

Line 4820: if EDW_OWB_COLLECTION_UTIL.drop_table(l_distinct_table)=false then

4816: length(g_dlog_rowid_table)),substr(g_dlog_rowid_table,1,instr(g_dlog_rowid_table,'.')-1));
4817: if EDW_OWB_COLLECTION_UTIL.drop_table(l_dlog_rowid_table)=false then
4818: null;
4819: end if;
4820: if EDW_OWB_COLLECTION_UTIL.drop_table(l_distinct_table)=false then
4821: null;
4822: end if;
4823: else --if the dlog did not have any data
4824: if EDW_OWB_COLLECTION_UTIL.drop_table(g_dlog_rowid_table)=false then

Line 4824: if EDW_OWB_COLLECTION_UTIL.drop_table(g_dlog_rowid_table)=false then

4820: if EDW_OWB_COLLECTION_UTIL.drop_table(l_distinct_table)=false then
4821: null;
4822: end if;
4823: else --if the dlog did not have any data
4824: if EDW_OWB_COLLECTION_UTIL.drop_table(g_dlog_rowid_table)=false then
4825: null;
4826: end if;
4827: l_stmt:='create table '||g_dlog_rowid_table||' tablespace '||g_op_table_space;
4828: if g_parallel is not null then

Line 4844: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(g_dlog_rowid_table,instr(g_dlog_rowid_table,'.')+1,

4840: execute immediate l_stmt;
4841: if g_debug then
4842: write_to_log_file('Created '||g_dlog_rowid_table||' with '||sql%rowcount||' rows '||get_time);
4843: end if;
4844: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(g_dlog_rowid_table,instr(g_dlog_rowid_table,'.')+1,
4845: length(g_dlog_rowid_table)),substr(g_dlog_rowid_table,1,instr(g_dlog_rowid_table,'.')-1));
4846: end if;
4847: return true;
4848: Exception when others then

Line 4877: EDW_OWB_COLLECTION_UTIL.set_rollback(g_rollback);

4873: if l_stmt is null then
4874: write_to_log_file_n('There is no delete log for this fact.');
4875: return true;
4876: end if;
4877: EDW_OWB_COLLECTION_UTIL.set_rollback(g_rollback);
4878: execute immediate l_stmt;
4879: if g_debug then
4880: write_to_log_file_n('Moved '||sql%rowcount||' rows into the DLOG table '||get_time);
4881: end if;

Line 4886: if EDW_OWB_COLLECTION_UTIL.drop_table(g_dlog_rowid_table)=false then

4882: commit;
4883: if g_debug then
4884: write_to_log_file_n('commit');
4885: end if;
4886: if EDW_OWB_COLLECTION_UTIL.drop_table(g_dlog_rowid_table)=false then
4887: null;
4888: end if;
4889: return true;
4890: Exception when others then

Line 4979: if EDW_OWB_COLLECTION_UTIL.get_columns_for_table(g_fact_audit_name,g_item_audit_all,

4975: end loop;
4976: end if;
4977: --get all the columns of
4978: g_item_audit_number_all:=0;
4979: if EDW_OWB_COLLECTION_UTIL.get_columns_for_table(g_fact_audit_name,g_item_audit_all,
4980: g_item_audit_number_all)=false then
4981: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;
4982: g_status:=false;
4983: write_to_log_file_n(g_status_message);

Line 4981: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;

4977: --get all the columns of
4978: g_item_audit_number_all:=0;
4979: if EDW_OWB_COLLECTION_UTIL.get_columns_for_table(g_fact_audit_name,g_item_audit_all,
4980: g_item_audit_number_all)=false then
4981: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;
4982: g_status:=false;
4983: write_to_log_file_n(g_status_message);
4984: write_to_log_file(EDW_OWB_COLLECTION_UTIL.g_status_message);
4985: end if;

Line 4984: write_to_log_file(EDW_OWB_COLLECTION_UTIL.g_status_message);

4980: g_item_audit_number_all)=false then
4981: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;
4982: g_status:=false;
4983: write_to_log_file_n(g_status_message);
4984: write_to_log_file(EDW_OWB_COLLECTION_UTIL.g_status_message);
4985: end if;
4986: if g_item_audit_number_all =0 then --there are no columns to be tracked
4987: write_to_log_file_n('No fact audit for '||g_primary_target_name||' No columns found in audit fact');
4988: g_fact_audit:=false;

Line 5051: if EDW_OWB_COLLECTION_UTIL.get_columns_for_table(g_fact_net_change_name,g_item_net_change_all,

5047: end loop;
5048: end if;
5049: --get all the columns of
5050: g_item_net_change_number_all :=0;
5051: if EDW_OWB_COLLECTION_UTIL.get_columns_for_table(g_fact_net_change_name,g_item_net_change_all,
5052: g_item_net_change_number_all)=false then
5053: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;
5054: g_status:=false;
5055: write_to_log_file_n(g_status_message);

Line 5053: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;

5049: --get all the columns of
5050: g_item_net_change_number_all :=0;
5051: if EDW_OWB_COLLECTION_UTIL.get_columns_for_table(g_fact_net_change_name,g_item_net_change_all,
5052: g_item_net_change_number_all)=false then
5053: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;
5054: g_status:=false;
5055: write_to_log_file_n(g_status_message);
5056: write_to_log_file(EDW_OWB_COLLECTION_UTIL.g_status_message);
5057: end if;

Line 5056: write_to_log_file(EDW_OWB_COLLECTION_UTIL.g_status_message);

5052: g_item_net_change_number_all)=false then
5053: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;
5054: g_status:=false;
5055: write_to_log_file_n(g_status_message);
5056: write_to_log_file(EDW_OWB_COLLECTION_UTIL.g_status_message);
5057: end if;
5058: if g_item_net_change_number_all=0 then --there are no columns to be tracked
5059: write_to_log_file_n('No fact net change for '||g_primary_target_name||' No columns found in NC fact');
5060: g_fact_net_change:=false;

Line 5128: if edw_owb_collection_util.drop_table(g_ul_table)=false then

5124: g_insert_ctas_table:=g_bis_owner||'.'||l_primary_target_name||'ICT';
5125: g_stg_copy_table:=g_bis_owner||'.'||l_primary_target_name||'CP';
5126: g_int_upd_status_table_name:='INT_UPD_'||g_primary_target;--used in error recovery.
5127: g_ul_table:=g_bis_owner||'.TAB_'||g_primary_target||'_UL';
5128: if edw_owb_collection_util.drop_table(g_ul_table)=false then
5129: null;
5130: end if;
5131: --the table is used in parallelization of COLLECTED and DANGLING update
5132: g_err_rec_flag:=false;

Line 5159: if EDW_OWB_COLLECTION_UTIL.does_table_have_data(g_primary_target_name)=1 then

5155: g_stg_join_nl:=true;--by default
5156: if p_job_id is null then
5157: g_stg_copy_table_flag:=false;
5158: end if;
5159: if EDW_OWB_COLLECTION_UTIL.does_table_have_data(g_primary_target_name)=1 then
5160: g_load_type:='INITIAL';
5161: write_to_log_file_n('Initial Load');
5162: g_target_rec_count:=0;
5163: else

Line 5168: l_var:=EDW_OWB_COLLECTION_UTIL.is_source_for_inc_derived_fact(g_object_name);

5164: g_load_type:='INC';
5165: write_to_log_file_n('Incremental Load');
5166: end if;
5167: if g_mapping_type='FACT' then
5168: l_var:=EDW_OWB_COLLECTION_UTIL.is_source_for_inc_derived_fact(g_object_name);
5169: if l_var=-1 then
5170: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;
5171: write_to_log_file_n(g_status_message);
5172: g_status:=false;

Line 5170: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;

5166: end if;
5167: if g_mapping_type='FACT' then
5168: l_var:=EDW_OWB_COLLECTION_UTIL.is_source_for_inc_derived_fact(g_object_name);
5169: if l_var=-1 then
5170: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;
5171: write_to_log_file_n(g_status_message);
5172: g_status:=false;
5173: return;
5174: elsif l_var=1 then

Line 5179: l_var:=EDW_OWB_COLLECTION_UTIL.is_src_of_custom_inc_derv_fact(g_object_name);

5175: g_is_source:=true;
5176: else
5177: g_is_source:=false;
5178: end if;
5179: l_var:=EDW_OWB_COLLECTION_UTIL.is_src_of_custom_inc_derv_fact(g_object_name);
5180: if l_var=-1 then
5181: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;
5182: write_to_log_file_n(g_status_message);
5183: g_status:=false;

Line 5181: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;

5177: g_is_source:=false;
5178: end if;
5179: l_var:=EDW_OWB_COLLECTION_UTIL.is_src_of_custom_inc_derv_fact(g_object_name);
5180: if l_var=-1 then
5181: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;
5182: write_to_log_file_n(g_status_message);
5183: g_status:=false;
5184: return;
5185: elsif l_var=1 then

Line 5190: --g_is_source:=EDW_OWB_COLLECTION_UTIL.is_object_a_source(g_object_name);

5186: g_is_custom_source:=true;
5187: else
5188: g_is_custom_source:=false;
5189: end if;
5190: --g_is_source:=EDW_OWB_COLLECTION_UTIL.is_object_a_source(g_object_name);
5191: if g_is_source then
5192: write_to_log_file_n('The fact is a source for derived or summary facts');
5193: else
5194: write_to_log_file_n('The fact is NOT a source for derived or summary facts');

Line 5196: g_is_delete_trigger_imp:=EDW_OWB_COLLECTION_UTIL.is_delete_trigger_imp(g_primary_target_name,g_table_owner);

5192: write_to_log_file_n('The fact is a source for derived or summary facts');
5193: else
5194: write_to_log_file_n('The fact is NOT a source for derived or summary facts');
5195: end if;
5196: g_is_delete_trigger_imp:=EDW_OWB_COLLECTION_UTIL.is_delete_trigger_imp(g_primary_target_name,g_table_owner);
5197: if g_is_delete_trigger_imp then
5198: write_to_log_file_n('Delete trigger implemented');
5199: else
5200: write_to_log_file_n('Delete trigger NOT implemented');

Line 5204: l_table EDW_OWB_COLLECTION_UTIL.varcharTableType;

5200: write_to_log_file_n('Delete trigger NOT implemented');
5201: end if;
5202: end if;
5203: declare
5204: l_table EDW_OWB_COLLECTION_UTIL.varcharTableType;
5205: l_number_table number;
5206: begin
5207: g_skip_update:=false;
5208: l_option_value:=null;

Line 5223: if EDW_OWB_COLLECTION_UTIL.value_in_table(l_table,l_number_table,

5219: l_number_table:=0;
5220: end if;
5221: g_skip_update:=true;
5222: if l_number_table>0 then
5223: if EDW_OWB_COLLECTION_UTIL.value_in_table(l_table,l_number_table,
5224: substr(g_primary_target_name,1,instr(g_primary_target_name,'_LTC')-1))=false then
5225: g_skip_update:=false;
5226: end if;
5227: end if;

Line 5233: if EDW_OWB_COLLECTION_UTIL.is_itemset_implemented(g_primary_target_name,'SKIP_UPDATE')='Y' then

5229: g_skip_update:=true;
5230: end if;
5231: end if;
5232: else
5233: if EDW_OWB_COLLECTION_UTIL.is_itemset_implemented(g_primary_target_name,'SKIP_UPDATE')='Y' then
5234: g_skip_update:=true;
5235: end if;
5236: end if;
5237: if g_debug then

Line 5259: if EDW_OWB_COLLECTION_UTIL.value_in_table(l_table,l_number_table,

5255: if l_number_table is null then
5256: l_number_table:=0;
5257: end if;
5258: if l_number_table>0 then
5259: if EDW_OWB_COLLECTION_UTIL.value_in_table(l_table,l_number_table,
5260: substr(g_primary_target_name,1,instr(g_primary_target_name,'_LTC')-1))=false then
5261: g_skip_delete:=false;
5262: end if;
5263: end if;

Line 5269: if EDW_OWB_COLLECTION_UTIL.is_itemset_implemented(g_primary_target_name,'SKIP_DELETE')='Y' then

5265: g_skip_delete:=true;
5266: end if;
5267: end if;
5268: else
5269: if EDW_OWB_COLLECTION_UTIL.is_itemset_implemented(g_primary_target_name,'SKIP_DELETE')='Y' then
5270: g_skip_delete:=true;
5271: end if;
5272: end if;
5273: if g_debug then

Line 5285: l_db_version:=edw_owb_collection_util.get_db_version;

5281: declare
5282: l_value varchar2(40);
5283: l_db_version varchar2(40);
5284: begin
5285: l_db_version:=edw_owb_collection_util.get_db_version;
5286: if edw_owb_collection_util.is_db_version_gt(l_db_version,'9.2') then
5287: l_value:=edw_owb_collection_util.get_parameter_value('cluster_database');
5288: if l_value='FALSE' then
5289: g_use_mti:=true;

Line 5286: if edw_owb_collection_util.is_db_version_gt(l_db_version,'9.2') then

5282: l_value varchar2(40);
5283: l_db_version varchar2(40);
5284: begin
5285: l_db_version:=edw_owb_collection_util.get_db_version;
5286: if edw_owb_collection_util.is_db_version_gt(l_db_version,'9.2') then
5287: l_value:=edw_owb_collection_util.get_parameter_value('cluster_database');
5288: if l_value='FALSE' then
5289: g_use_mti:=true;
5290: g_stg_copy_table_flag:=false;

Line 5287: l_value:=edw_owb_collection_util.get_parameter_value('cluster_database');

5283: l_db_version varchar2(40);
5284: begin
5285: l_db_version:=edw_owb_collection_util.get_db_version;
5286: if edw_owb_collection_util.is_db_version_gt(l_db_version,'9.2') then
5287: l_value:=edw_owb_collection_util.get_parameter_value('cluster_database');
5288: if l_value='FALSE' then
5289: g_use_mti:=true;
5290: g_stg_copy_table_flag:=false;
5291: else

Line 5297: g_job_queue_processes:=edw_owb_collection_util.get_parameter_value('job_queue_processes');

5293: end if;
5294: end if;
5295: end;
5296: end if;
5297: g_job_queue_processes:=edw_owb_collection_util.get_parameter_value('job_queue_processes');
5298: if p_job_id is null then
5299: if edw_owb_collection_util.drop_tables_like('TAB_'||g_primary_target||'_HDUR_%',g_bis_owner)=false then
5300: null;
5301: end if;

Line 5299: if edw_owb_collection_util.drop_tables_like('TAB_'||g_primary_target||'_HDUR_%',g_bis_owner)=false then

5295: end;
5296: end if;
5297: g_job_queue_processes:=edw_owb_collection_util.get_parameter_value('job_queue_processes');
5298: if p_job_id is null then
5299: if edw_owb_collection_util.drop_tables_like('TAB_'||g_primary_target||'_HDUR_%',g_bis_owner)=false then
5300: null;
5301: end if;
5302: end if;
5303: Exception when others then

Line 5314: if EDW_OWB_COLLECTION_UTIL.drop_table(g_surr_table)= false then

5310: Begin
5311: if g_debug then
5312: write_to_log_file_n('In clean_up'||get_time);
5313: end if;
5314: if EDW_OWB_COLLECTION_UTIL.drop_table(g_surr_table)= false then
5315: null;
5316: end if;
5317: if EDW_OWB_COLLECTION_UTIL.drop_table(g_hold_table)= false then
5318: null;

Line 5317: if EDW_OWB_COLLECTION_UTIL.drop_table(g_hold_table)= false then

5313: end if;
5314: if EDW_OWB_COLLECTION_UTIL.drop_table(g_surr_table)= false then
5315: null;
5316: end if;
5317: if EDW_OWB_COLLECTION_UTIL.drop_table(g_hold_table)= false then
5318: null;
5319: end if;
5320: if EDW_OWB_COLLECTION_UTIL.drop_table(g_error_rowid_table)= false then
5321: null;

Line 5320: if EDW_OWB_COLLECTION_UTIL.drop_table(g_error_rowid_table)= false then

5316: end if;
5317: if EDW_OWB_COLLECTION_UTIL.drop_table(g_hold_table)= false then
5318: null;
5319: end if;
5320: if EDW_OWB_COLLECTION_UTIL.drop_table(g_error_rowid_table)= false then
5321: null;
5322: end if;
5323: if EDW_OWB_COLLECTION_UTIL.drop_table(g_dup_hold_table)= false then
5324: null;

Line 5323: if EDW_OWB_COLLECTION_UTIL.drop_table(g_dup_hold_table)= false then

5319: end if;
5320: if EDW_OWB_COLLECTION_UTIL.drop_table(g_error_rowid_table)= false then
5321: null;
5322: end if;
5323: if EDW_OWB_COLLECTION_UTIL.drop_table(g_dup_hold_table)= false then
5324: null;
5325: end if;
5326: if EDW_OWB_COLLECTION_UTIL.drop_table(g_dup_hold_pk_table)= false then
5327: null;

Line 5326: if EDW_OWB_COLLECTION_UTIL.drop_table(g_dup_hold_pk_table)= false then

5322: end if;
5323: if EDW_OWB_COLLECTION_UTIL.drop_table(g_dup_hold_table)= false then
5324: null;
5325: end if;
5326: if EDW_OWB_COLLECTION_UTIL.drop_table(g_dup_hold_pk_table)= false then
5327: null;
5328: end if;
5329: if EDW_OWB_COLLECTION_UTIL.drop_table(g_opcode_table)= false then
5330: null;

Line 5329: if EDW_OWB_COLLECTION_UTIL.drop_table(g_opcode_table)= false then

5325: end if;
5326: if EDW_OWB_COLLECTION_UTIL.drop_table(g_dup_hold_pk_table)= false then
5327: null;
5328: end if;
5329: if EDW_OWB_COLLECTION_UTIL.drop_table(g_opcode_table)= false then
5330: null;
5331: end if;
5332: if EDW_OWB_COLLECTION_UTIL.drop_table(g_dup_rownum)= false then
5333: null;

Line 5332: if EDW_OWB_COLLECTION_UTIL.drop_table(g_dup_rownum)= false then

5328: end if;
5329: if EDW_OWB_COLLECTION_UTIL.drop_table(g_opcode_table)= false then
5330: null;
5331: end if;
5332: if EDW_OWB_COLLECTION_UTIL.drop_table(g_dup_rownum)= false then
5333: null;
5334: end if;
5335: if EDW_OWB_COLLECTION_UTIL.drop_table(g_dup_rownum_rowid)= false then
5336: null;

Line 5335: if EDW_OWB_COLLECTION_UTIL.drop_table(g_dup_rownum_rowid)= false then

5331: end if;
5332: if EDW_OWB_COLLECTION_UTIL.drop_table(g_dup_rownum)= false then
5333: null;
5334: end if;
5335: if EDW_OWB_COLLECTION_UTIL.drop_table(g_dup_rownum_rowid)= false then
5336: null;
5337: end if;
5338: if EDW_OWB_COLLECTION_UTIL.drop_table(g_ok_rowid_table)= false then
5339: null;

Line 5338: if EDW_OWB_COLLECTION_UTIL.drop_table(g_ok_rowid_table)= false then

5334: end if;
5335: if EDW_OWB_COLLECTION_UTIL.drop_table(g_dup_rownum_rowid)= false then
5336: null;
5337: end if;
5338: if EDW_OWB_COLLECTION_UTIL.drop_table(g_ok_rowid_table)= false then
5339: null;
5340: end if;
5341: if g_ok_rowid_table_prev is not null then
5342: if EDW_OWB_COLLECTION_UTIL.drop_table(g_ok_rowid_table_prev)= false then

Line 5342: if EDW_OWB_COLLECTION_UTIL.drop_table(g_ok_rowid_table_prev)= false then

5338: if EDW_OWB_COLLECTION_UTIL.drop_table(g_ok_rowid_table)= false then
5339: null;
5340: end if;
5341: if g_ok_rowid_table_prev is not null then
5342: if EDW_OWB_COLLECTION_UTIL.drop_table(g_ok_rowid_table_prev)= false then
5343: null;
5344: end if;
5345: end if;
5346: if EDW_OWB_COLLECTION_UTIL.drop_table(g_plan_table)= false then

Line 5346: if EDW_OWB_COLLECTION_UTIL.drop_table(g_plan_table)= false then

5342: if EDW_OWB_COLLECTION_UTIL.drop_table(g_ok_rowid_table_prev)= false then
5343: null;
5344: end if;
5345: end if;
5346: if EDW_OWB_COLLECTION_UTIL.drop_table(g_plan_table)= false then
5347: null;
5348: end if;
5349: if EDW_OWB_COLLECTION_UTIL.drop_table(g_user_fk_table)= false then
5350: null;

Line 5349: if EDW_OWB_COLLECTION_UTIL.drop_table(g_user_fk_table)= false then

5345: end if;
5346: if EDW_OWB_COLLECTION_UTIL.drop_table(g_plan_table)= false then
5347: null;
5348: end if;
5349: if EDW_OWB_COLLECTION_UTIL.drop_table(g_user_fk_table)= false then
5350: null;
5351: end if;
5352: if EDW_OWB_COLLECTION_UTIL.drop_table(g_user_measure_table)= false then
5353: null;

Line 5352: if EDW_OWB_COLLECTION_UTIL.drop_table(g_user_measure_table)= false then

5348: end if;
5349: if EDW_OWB_COLLECTION_UTIL.drop_table(g_user_fk_table)= false then
5350: null;
5351: end if;
5352: if EDW_OWB_COLLECTION_UTIL.drop_table(g_user_measure_table)= false then
5353: null;
5354: end if;
5355: if EDW_OWB_COLLECTION_UTIL.drop_table(g_reqid_table)=false then
5356: null;

Line 5355: if EDW_OWB_COLLECTION_UTIL.drop_table(g_reqid_table)=false then

5351: end if;
5352: if EDW_OWB_COLLECTION_UTIL.drop_table(g_user_measure_table)= false then
5353: null;
5354: end if;
5355: if EDW_OWB_COLLECTION_UTIL.drop_table(g_reqid_table)=false then
5356: null;
5357: end if;
5358: --if EDW_OWB_COLLECTION_UTIL.drop_table(g_update_dlog_lookup_table)=false then
5359: --null;

Line 5358: --if EDW_OWB_COLLECTION_UTIL.drop_table(g_update_dlog_lookup_table)=false then

5354: end if;
5355: if EDW_OWB_COLLECTION_UTIL.drop_table(g_reqid_table)=false then
5356: null;
5357: end if;
5358: --if EDW_OWB_COLLECTION_UTIL.drop_table(g_update_dlog_lookup_table)=false then
5359: --null;
5360: --end if;
5361: if EDW_OWB_COLLECTION_UTIL.drop_table(g_insert_ctas_table)=false then
5362: null;

Line 5361: if EDW_OWB_COLLECTION_UTIL.drop_table(g_insert_ctas_table)=false then

5357: end if;
5358: --if EDW_OWB_COLLECTION_UTIL.drop_table(g_update_dlog_lookup_table)=false then
5359: --null;
5360: --end if;
5361: if EDW_OWB_COLLECTION_UTIL.drop_table(g_insert_ctas_table)=false then
5362: null;
5363: end if;
5364: if EDW_OWB_COLLECTION_UTIL.drop_table(g_stg_copy_table)=false then
5365: null;

Line 5364: if EDW_OWB_COLLECTION_UTIL.drop_table(g_stg_copy_table)=false then

5360: --end if;
5361: if EDW_OWB_COLLECTION_UTIL.drop_table(g_insert_ctas_table)=false then
5362: null;
5363: end if;
5364: if EDW_OWB_COLLECTION_UTIL.drop_table(g_stg_copy_table)=false then
5365: null;
5366: end if;
5367: --if EDW_OWB_COLLECTION_UTIL.drop_table(g_update_dlog_rowid_table)=false then
5368: --null;

Line 5367: --if EDW_OWB_COLLECTION_UTIL.drop_table(g_update_dlog_rowid_table)=false then

5363: end if;
5364: if EDW_OWB_COLLECTION_UTIL.drop_table(g_stg_copy_table)=false then
5365: null;
5366: end if;
5367: --if EDW_OWB_COLLECTION_UTIL.drop_table(g_update_dlog_rowid_table)=false then
5368: --null;
5369: --end if;
5370: if g_number_drop_objects>0 then
5371: for i in 1..g_number_drop_objects loop

Line 5372: if EDW_OWB_COLLECTION_UTIL.drop_table(g_drop_objects(i))= false then

5368: --null;
5369: --end if;
5370: if g_number_drop_objects>0 then
5371: for i in 1..g_number_drop_objects loop
5372: if EDW_OWB_COLLECTION_UTIL.drop_table(g_drop_objects(i))= false then
5373: null;
5374: end if;
5375: end loop;
5376: end if;

Line 5395: EDW_OWB_COLLECTION_UTIL.write_to_log_file(p_message);

5391: End;
5392:
5393: procedure write_to_log_file(p_message varchar2) is
5394: begin
5395: EDW_OWB_COLLECTION_UTIL.write_to_log_file(p_message);
5396: Exception when others then
5397: null;
5398: End;
5399:

Line 5410: EDW_OWB_COLLECTION_UTIL.write_to_out_file(p_message);

5406: End;
5407:
5408: procedure write_to_out_file(p_message varchar2) is
5409: begin
5410: EDW_OWB_COLLECTION_UTIL.write_to_out_file(p_message);
5411: Exception when others then
5412: null;
5413: End;
5414:

Line 5491: if EDW_OWB_COLLECTION_UTIL.drop_table(g_error_rowid_table)=false then

5487: Begin
5488: if g_debug then
5489: write_to_log_file_n('In create_error_table, p_type is '||p_type||get_time);
5490: end if;
5491: if EDW_OWB_COLLECTION_UTIL.drop_table(g_error_rowid_table)=false then
5492: write_to_log_file_n('Table '||g_error_rowid_table||' not found for dropping');
5493: end if;
5494: --4161164 : remove IOT , replace with ordinary table and index
5495: --l_stmt:='create table '||g_error_rowid_table||'(row_id primary key) organization index '||

Line 5527: EDW_OWB_COLLECTION_UTIL.create_iot_index(g_error_rowid_table,'row_id',g_op_table_space,g_parallel);

5523: if g_debug then
5524: write_to_log_file('Created '||g_error_rowid_table||' with '||sql%rowcount||' rows '||get_time);
5525: end if;
5526: --4161164 : remove IOT , replace with ordinary table and index
5527: EDW_OWB_COLLECTION_UTIL.create_iot_index(g_error_rowid_table,'row_id',g_op_table_space,g_parallel);
5528: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(g_error_rowid_table,instr(g_error_rowid_table,'.')+1,
5529: length(g_error_rowid_table)),substr(g_error_rowid_table,1,instr(g_error_rowid_table,'.')-1));
5530: return true;
5531: Exception when others then

Line 5528: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(g_error_rowid_table,instr(g_error_rowid_table,'.')+1,

5524: write_to_log_file('Created '||g_error_rowid_table||' with '||sql%rowcount||' rows '||get_time);
5525: end if;
5526: --4161164 : remove IOT , replace with ordinary table and index
5527: EDW_OWB_COLLECTION_UTIL.create_iot_index(g_error_rowid_table,'row_id',g_op_table_space,g_parallel);
5528: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(g_error_rowid_table,instr(g_error_rowid_table,'.')+1,
5529: length(g_error_rowid_table)),substr(g_error_rowid_table,1,instr(g_error_rowid_table,'.')-1));
5530: return true;
5531: Exception when others then
5532: g_status_message:=sqlerrm;

Line 5594: p_ins_instance_name out NOCOPY EDW_OWB_COLLECTION_UTIL.varcharTableType,

5590:
5591: function get_rows_processed_errored
5592: (p_object_name out NOCOPY varchar2,
5593: p_object_type out NOCOPY varchar2,
5594: p_ins_instance_name out NOCOPY EDW_OWB_COLLECTION_UTIL.varcharTableType,
5595: p_ins_request_id out NOCOPY EDW_OWB_COLLECTION_UTIL.numberTableType,
5596: p_ins_rows_ready out NOCOPY EDW_OWB_COLLECTION_UTIL.numberTableType,
5597: p_ins_rows_processed out NOCOPY EDW_OWB_COLLECTION_UTIL.numberTableType,
5598: p_ins_rows_collected out NOCOPY EDW_OWB_COLLECTION_UTIL.numberTableType,

Line 5595: p_ins_request_id out NOCOPY EDW_OWB_COLLECTION_UTIL.numberTableType,

5591: function get_rows_processed_errored
5592: (p_object_name out NOCOPY varchar2,
5593: p_object_type out NOCOPY varchar2,
5594: p_ins_instance_name out NOCOPY EDW_OWB_COLLECTION_UTIL.varcharTableType,
5595: p_ins_request_id out NOCOPY EDW_OWB_COLLECTION_UTIL.numberTableType,
5596: p_ins_rows_ready out NOCOPY EDW_OWB_COLLECTION_UTIL.numberTableType,
5597: p_ins_rows_processed out NOCOPY EDW_OWB_COLLECTION_UTIL.numberTableType,
5598: p_ins_rows_collected out NOCOPY EDW_OWB_COLLECTION_UTIL.numberTableType,
5599: p_ins_rows_dangling out NOCOPY EDW_OWB_COLLECTION_UTIL.numberTableType,

Line 5596: p_ins_rows_ready out NOCOPY EDW_OWB_COLLECTION_UTIL.numberTableType,

5592: (p_object_name out NOCOPY varchar2,
5593: p_object_type out NOCOPY varchar2,
5594: p_ins_instance_name out NOCOPY EDW_OWB_COLLECTION_UTIL.varcharTableType,
5595: p_ins_request_id out NOCOPY EDW_OWB_COLLECTION_UTIL.numberTableType,
5596: p_ins_rows_ready out NOCOPY EDW_OWB_COLLECTION_UTIL.numberTableType,
5597: p_ins_rows_processed out NOCOPY EDW_OWB_COLLECTION_UTIL.numberTableType,
5598: p_ins_rows_collected out NOCOPY EDW_OWB_COLLECTION_UTIL.numberTableType,
5599: p_ins_rows_dangling out NOCOPY EDW_OWB_COLLECTION_UTIL.numberTableType,
5600: p_ins_rows_duplicate out NOCOPY EDW_OWB_COLLECTION_UTIL.numberTableType,

Line 5597: p_ins_rows_processed out NOCOPY EDW_OWB_COLLECTION_UTIL.numberTableType,

5593: p_object_type out NOCOPY varchar2,
5594: p_ins_instance_name out NOCOPY EDW_OWB_COLLECTION_UTIL.varcharTableType,
5595: p_ins_request_id out NOCOPY EDW_OWB_COLLECTION_UTIL.numberTableType,
5596: p_ins_rows_ready out NOCOPY EDW_OWB_COLLECTION_UTIL.numberTableType,
5597: p_ins_rows_processed out NOCOPY EDW_OWB_COLLECTION_UTIL.numberTableType,
5598: p_ins_rows_collected out NOCOPY EDW_OWB_COLLECTION_UTIL.numberTableType,
5599: p_ins_rows_dangling out NOCOPY EDW_OWB_COLLECTION_UTIL.numberTableType,
5600: p_ins_rows_duplicate out NOCOPY EDW_OWB_COLLECTION_UTIL.numberTableType,
5601: p_ins_rows_error out NOCOPY EDW_OWB_COLLECTION_UTIL.numberTableType,

Line 5598: p_ins_rows_collected out NOCOPY EDW_OWB_COLLECTION_UTIL.numberTableType,

5594: p_ins_instance_name out NOCOPY EDW_OWB_COLLECTION_UTIL.varcharTableType,
5595: p_ins_request_id out NOCOPY EDW_OWB_COLLECTION_UTIL.numberTableType,
5596: p_ins_rows_ready out NOCOPY EDW_OWB_COLLECTION_UTIL.numberTableType,
5597: p_ins_rows_processed out NOCOPY EDW_OWB_COLLECTION_UTIL.numberTableType,
5598: p_ins_rows_collected out NOCOPY EDW_OWB_COLLECTION_UTIL.numberTableType,
5599: p_ins_rows_dangling out NOCOPY EDW_OWB_COLLECTION_UTIL.numberTableType,
5600: p_ins_rows_duplicate out NOCOPY EDW_OWB_COLLECTION_UTIL.numberTableType,
5601: p_ins_rows_error out NOCOPY EDW_OWB_COLLECTION_UTIL.numberTableType,
5602: p_number_ins_req_coll out NOCOPY number) return boolean is

Line 5599: p_ins_rows_dangling out NOCOPY EDW_OWB_COLLECTION_UTIL.numberTableType,

5595: p_ins_request_id out NOCOPY EDW_OWB_COLLECTION_UTIL.numberTableType,
5596: p_ins_rows_ready out NOCOPY EDW_OWB_COLLECTION_UTIL.numberTableType,
5597: p_ins_rows_processed out NOCOPY EDW_OWB_COLLECTION_UTIL.numberTableType,
5598: p_ins_rows_collected out NOCOPY EDW_OWB_COLLECTION_UTIL.numberTableType,
5599: p_ins_rows_dangling out NOCOPY EDW_OWB_COLLECTION_UTIL.numberTableType,
5600: p_ins_rows_duplicate out NOCOPY EDW_OWB_COLLECTION_UTIL.numberTableType,
5601: p_ins_rows_error out NOCOPY EDW_OWB_COLLECTION_UTIL.numberTableType,
5602: p_number_ins_req_coll out NOCOPY number) return boolean is
5603: begin

Line 5600: p_ins_rows_duplicate out NOCOPY EDW_OWB_COLLECTION_UTIL.numberTableType,

5596: p_ins_rows_ready out NOCOPY EDW_OWB_COLLECTION_UTIL.numberTableType,
5597: p_ins_rows_processed out NOCOPY EDW_OWB_COLLECTION_UTIL.numberTableType,
5598: p_ins_rows_collected out NOCOPY EDW_OWB_COLLECTION_UTIL.numberTableType,
5599: p_ins_rows_dangling out NOCOPY EDW_OWB_COLLECTION_UTIL.numberTableType,
5600: p_ins_rows_duplicate out NOCOPY EDW_OWB_COLLECTION_UTIL.numberTableType,
5601: p_ins_rows_error out NOCOPY EDW_OWB_COLLECTION_UTIL.numberTableType,
5602: p_number_ins_req_coll out NOCOPY number) return boolean is
5603: begin
5604: p_object_name:= g_fstgTableName;

Line 5601: p_ins_rows_error out NOCOPY EDW_OWB_COLLECTION_UTIL.numberTableType,

5597: p_ins_rows_processed out NOCOPY EDW_OWB_COLLECTION_UTIL.numberTableType,
5598: p_ins_rows_collected out NOCOPY EDW_OWB_COLLECTION_UTIL.numberTableType,
5599: p_ins_rows_dangling out NOCOPY EDW_OWB_COLLECTION_UTIL.numberTableType,
5600: p_ins_rows_duplicate out NOCOPY EDW_OWB_COLLECTION_UTIL.numberTableType,
5601: p_ins_rows_error out NOCOPY EDW_OWB_COLLECTION_UTIL.numberTableType,
5602: p_number_ins_req_coll out NOCOPY number) return boolean is
5603: begin
5604: p_object_name:= g_fstgTableName;
5605: p_object_type:=g_object_type;

Line 5636: if EDW_OWB_COLLECTION_UTIL.drop_table(g_ok_rowid_table)=false then

5632: if g_debug then
5633: write_to_log_file_n('In recover_from_previous_error'||get_time);
5634: end if;
5635: if g_fresh_restart then
5636: if EDW_OWB_COLLECTION_UTIL.drop_table(g_ok_rowid_table)=false then
5637: null;
5638: end if;
5639: if EDW_OWB_COLLECTION_UTIL.drop_ilog_tables(g_ok_rowid_table,'OK',g_bis_owner)=false then
5640: return false;

Line 5639: if EDW_OWB_COLLECTION_UTIL.drop_ilog_tables(g_ok_rowid_table,'OK',g_bis_owner)=false then

5635: if g_fresh_restart then
5636: if EDW_OWB_COLLECTION_UTIL.drop_table(g_ok_rowid_table)=false then
5637: null;
5638: end if;
5639: if EDW_OWB_COLLECTION_UTIL.drop_ilog_tables(g_ok_rowid_table,'OK',g_bis_owner)=false then
5640: return false;
5641: end if;
5642: end if;
5643: if EDW_OWB_COLLECTION_UTIL.check_table(g_ok_rowid_table||'A')=true

Line 5643: if EDW_OWB_COLLECTION_UTIL.check_table(g_ok_rowid_table||'A')=true

5639: if EDW_OWB_COLLECTION_UTIL.drop_ilog_tables(g_ok_rowid_table,'OK',g_bis_owner)=false then
5640: return false;
5641: end if;
5642: end if;
5643: if EDW_OWB_COLLECTION_UTIL.check_table(g_ok_rowid_table||'A')=true
5644: and EDW_OWB_COLLECTION_UTIL.check_table(g_ok_rowid_table)=false then
5645: g_ok_rowid_table:=g_ok_rowid_table||'A';
5646: if g_fresh_restart then
5647: if EDW_OWB_COLLECTION_UTIL.drop_table(g_ok_rowid_table)=false then

Line 5644: and EDW_OWB_COLLECTION_UTIL.check_table(g_ok_rowid_table)=false then

5640: return false;
5641: end if;
5642: end if;
5643: if EDW_OWB_COLLECTION_UTIL.check_table(g_ok_rowid_table||'A')=true
5644: and EDW_OWB_COLLECTION_UTIL.check_table(g_ok_rowid_table)=false then
5645: g_ok_rowid_table:=g_ok_rowid_table||'A';
5646: if g_fresh_restart then
5647: if EDW_OWB_COLLECTION_UTIL.drop_table(g_ok_rowid_table)=false then
5648: null;

Line 5647: if EDW_OWB_COLLECTION_UTIL.drop_table(g_ok_rowid_table)=false then

5643: if EDW_OWB_COLLECTION_UTIL.check_table(g_ok_rowid_table||'A')=true
5644: and EDW_OWB_COLLECTION_UTIL.check_table(g_ok_rowid_table)=false then
5645: g_ok_rowid_table:=g_ok_rowid_table||'A';
5646: if g_fresh_restart then
5647: if EDW_OWB_COLLECTION_UTIL.drop_table(g_ok_rowid_table)=false then
5648: null;
5649: end if;
5650: end if;
5651: end if;

Line 5675: if EDW_OWB_COLLECTION_UTIL.check_table(p_ok_rowid_table)=false then

5671: Begin
5672: if g_debug then
5673: write_to_log_file_n('In check_ok_table');
5674: end if;
5675: if EDW_OWB_COLLECTION_UTIL.check_table(p_ok_rowid_table)=false then
5676: return true;
5677: end if;
5678: if EDW_OWB_COLLECTION_UTIL.does_table_have_data(p_ok_rowid_table,' status=1 ')=2 then
5679: p_err_rec_flag:=true;

Line 5678: if EDW_OWB_COLLECTION_UTIL.does_table_have_data(p_ok_rowid_table,' status=1 ')=2 then

5674: end if;
5675: if EDW_OWB_COLLECTION_UTIL.check_table(p_ok_rowid_table)=false then
5676: return true;
5677: end if;
5678: if EDW_OWB_COLLECTION_UTIL.does_table_have_data(p_ok_rowid_table,' status=1 ')=2 then
5679: p_err_rec_flag:=true;
5680: l_stmt:='select count(*) from '||p_ok_rowid_table||' where status=1';
5681: if g_debug then
5682: write_to_log_file_n('Going to execute '||l_stmt);

Line 5700: l_ins_instance_name EDW_OWB_COLLECTION_UTIL.varcharTableType;

5696: return false;
5697: End;
5698:
5699: function log_duplicate_records(p_coll_status varchar2, p_dup_number number) return boolean is
5700: l_ins_instance_name EDW_OWB_COLLECTION_UTIL.varcharTableType;
5701: l_ins_request_id_table EDW_OWB_COLLECTION_UTIL.numberTableType;
5702: l_ins_rows_ready EDW_OWB_COLLECTION_UTIL.numberTableType;
5703: l_ins_rows_processed EDW_OWB_COLLECTION_UTIL.numberTableType;
5704: l_ins_rows_collected EDW_OWB_COLLECTION_UTIL.numberTableType;

Line 5701: l_ins_request_id_table EDW_OWB_COLLECTION_UTIL.numberTableType;

5697: End;
5698:
5699: function log_duplicate_records(p_coll_status varchar2, p_dup_number number) return boolean is
5700: l_ins_instance_name EDW_OWB_COLLECTION_UTIL.varcharTableType;
5701: l_ins_request_id_table EDW_OWB_COLLECTION_UTIL.numberTableType;
5702: l_ins_rows_ready EDW_OWB_COLLECTION_UTIL.numberTableType;
5703: l_ins_rows_processed EDW_OWB_COLLECTION_UTIL.numberTableType;
5704: l_ins_rows_collected EDW_OWB_COLLECTION_UTIL.numberTableType;
5705: l_ins_rows_dangling EDW_OWB_COLLECTION_UTIL.numberTableType;

Line 5702: l_ins_rows_ready EDW_OWB_COLLECTION_UTIL.numberTableType;

5698:
5699: function log_duplicate_records(p_coll_status varchar2, p_dup_number number) return boolean is
5700: l_ins_instance_name EDW_OWB_COLLECTION_UTIL.varcharTableType;
5701: l_ins_request_id_table EDW_OWB_COLLECTION_UTIL.numberTableType;
5702: l_ins_rows_ready EDW_OWB_COLLECTION_UTIL.numberTableType;
5703: l_ins_rows_processed EDW_OWB_COLLECTION_UTIL.numberTableType;
5704: l_ins_rows_collected EDW_OWB_COLLECTION_UTIL.numberTableType;
5705: l_ins_rows_dangling EDW_OWB_COLLECTION_UTIL.numberTableType;
5706: l_ins_rows_duplicate EDW_OWB_COLLECTION_UTIL.numberTableType;

Line 5703: l_ins_rows_processed EDW_OWB_COLLECTION_UTIL.numberTableType;

5699: function log_duplicate_records(p_coll_status varchar2, p_dup_number number) return boolean is
5700: l_ins_instance_name EDW_OWB_COLLECTION_UTIL.varcharTableType;
5701: l_ins_request_id_table EDW_OWB_COLLECTION_UTIL.numberTableType;
5702: l_ins_rows_ready EDW_OWB_COLLECTION_UTIL.numberTableType;
5703: l_ins_rows_processed EDW_OWB_COLLECTION_UTIL.numberTableType;
5704: l_ins_rows_collected EDW_OWB_COLLECTION_UTIL.numberTableType;
5705: l_ins_rows_dangling EDW_OWB_COLLECTION_UTIL.numberTableType;
5706: l_ins_rows_duplicate EDW_OWB_COLLECTION_UTIL.numberTableType;
5707: l_ins_rows_error EDW_OWB_COLLECTION_UTIL.numberTableType;

Line 5704: l_ins_rows_collected EDW_OWB_COLLECTION_UTIL.numberTableType;

5700: l_ins_instance_name EDW_OWB_COLLECTION_UTIL.varcharTableType;
5701: l_ins_request_id_table EDW_OWB_COLLECTION_UTIL.numberTableType;
5702: l_ins_rows_ready EDW_OWB_COLLECTION_UTIL.numberTableType;
5703: l_ins_rows_processed EDW_OWB_COLLECTION_UTIL.numberTableType;
5704: l_ins_rows_collected EDW_OWB_COLLECTION_UTIL.numberTableType;
5705: l_ins_rows_dangling EDW_OWB_COLLECTION_UTIL.numberTableType;
5706: l_ins_rows_duplicate EDW_OWB_COLLECTION_UTIL.numberTableType;
5707: l_ins_rows_error EDW_OWB_COLLECTION_UTIL.numberTableType;
5708: l_number_ins_req_coll number;

Line 5705: l_ins_rows_dangling EDW_OWB_COLLECTION_UTIL.numberTableType;

5701: l_ins_request_id_table EDW_OWB_COLLECTION_UTIL.numberTableType;
5702: l_ins_rows_ready EDW_OWB_COLLECTION_UTIL.numberTableType;
5703: l_ins_rows_processed EDW_OWB_COLLECTION_UTIL.numberTableType;
5704: l_ins_rows_collected EDW_OWB_COLLECTION_UTIL.numberTableType;
5705: l_ins_rows_dangling EDW_OWB_COLLECTION_UTIL.numberTableType;
5706: l_ins_rows_duplicate EDW_OWB_COLLECTION_UTIL.numberTableType;
5707: l_ins_rows_error EDW_OWB_COLLECTION_UTIL.numberTableType;
5708: l_number_ins_req_coll number;
5709: l_count EDW_OWB_COLLECTION_UTIL.numberTableType;

Line 5706: l_ins_rows_duplicate EDW_OWB_COLLECTION_UTIL.numberTableType;

5702: l_ins_rows_ready EDW_OWB_COLLECTION_UTIL.numberTableType;
5703: l_ins_rows_processed EDW_OWB_COLLECTION_UTIL.numberTableType;
5704: l_ins_rows_collected EDW_OWB_COLLECTION_UTIL.numberTableType;
5705: l_ins_rows_dangling EDW_OWB_COLLECTION_UTIL.numberTableType;
5706: l_ins_rows_duplicate EDW_OWB_COLLECTION_UTIL.numberTableType;
5707: l_ins_rows_error EDW_OWB_COLLECTION_UTIL.numberTableType;
5708: l_number_ins_req_coll number;
5709: l_count EDW_OWB_COLLECTION_UTIL.numberTableType;
5710: Begin

Line 5707: l_ins_rows_error EDW_OWB_COLLECTION_UTIL.numberTableType;

5703: l_ins_rows_processed EDW_OWB_COLLECTION_UTIL.numberTableType;
5704: l_ins_rows_collected EDW_OWB_COLLECTION_UTIL.numberTableType;
5705: l_ins_rows_dangling EDW_OWB_COLLECTION_UTIL.numberTableType;
5706: l_ins_rows_duplicate EDW_OWB_COLLECTION_UTIL.numberTableType;
5707: l_ins_rows_error EDW_OWB_COLLECTION_UTIL.numberTableType;
5708: l_number_ins_req_coll number;
5709: l_count EDW_OWB_COLLECTION_UTIL.numberTableType;
5710: Begin
5711: if g_debug then

Line 5709: l_count EDW_OWB_COLLECTION_UTIL.numberTableType;

5705: l_ins_rows_dangling EDW_OWB_COLLECTION_UTIL.numberTableType;
5706: l_ins_rows_duplicate EDW_OWB_COLLECTION_UTIL.numberTableType;
5707: l_ins_rows_error EDW_OWB_COLLECTION_UTIL.numberTableType;
5708: l_number_ins_req_coll number;
5709: l_count EDW_OWB_COLLECTION_UTIL.numberTableType;
5710: Begin
5711: if g_debug then
5712: write_to_log_file_n('In log_duplicate_records, p_coll_status is '||p_coll_status||get_time);
5713: end if;

Line 5730: if EDW_OWB_COLLECTION_UTIL.insert_temp_log_table(

5726: l_ins_rows_duplicate(l_number_ins_req_coll):=p_dup_number;
5727: end if;
5728: l_ins_rows_dangling(l_number_ins_req_coll):=0;
5729: l_ins_rows_error(l_number_ins_req_coll):=0;
5730: if EDW_OWB_COLLECTION_UTIL.insert_temp_log_table(
5731: g_object_name,
5732: g_object_type,
5733: g_conc_program_id,
5734: l_ins_instance_name,

Line 5747: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;

5743: g_total_insert,
5744: g_total_update,
5745: g_total_delete,
5746: l_number_ins_req_coll) = false then
5747: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;
5748: g_status:=false;
5749: write_to_log_file_n(g_status_message);
5750: return false;
5751: end if;

Line 5776: EDW_OWB_COLLECTION_UTIL.set_rollback(g_rollback);

5772: end if;
5773: if g_debug then
5774: write_to_log_file_n('Going to execute '||l_stmt||get_time);
5775: end if;
5776: EDW_OWB_COLLECTION_UTIL.set_rollback(g_rollback);
5777: execute immediate l_stmt;
5778: g_number_rows_ready:=sql%rowcount;
5779: if g_debug then
5780: write_to_log_file_n('Updated '||g_number_rows_ready||' records from ''READY'' to ''PROCESSING'' '||get_time);

Line 5812: if EDW_OWB_COLLECTION_UTIL.drop_table(g_ok_rowid_table)=false then

5808: else
5809: l_stmt:=l_stmt||' as select row_id,decode(status,1,2,0,1,2) status from '||
5810: g_ok_rowid_table_prev;
5811: end if;
5812: if EDW_OWB_COLLECTION_UTIL.drop_table(g_ok_rowid_table)=false then
5813: null;
5814: end if;
5815: if g_debug then
5816: write_to_log_file_n('Going to execute '||l_stmt||get_time);

Line 5822: if EDW_OWB_COLLECTION_UTIL.drop_table(g_ok_rowid_table_prev)=false then

5818: execute immediate l_stmt;
5819: if g_debug then
5820: write_to_log_file_n('Created with '||sql%rowcount||' rows '||get_time);
5821: end if;
5822: if EDW_OWB_COLLECTION_UTIL.drop_table(g_ok_rowid_table_prev)=false then
5823: null;
5824: end if;
5825: if EDW_OWB_COLLECTION_UTIL.does_table_have_data(g_ok_rowid_table,' status=1 ')<2 then
5826: g_collections_done:=true;

Line 5825: if EDW_OWB_COLLECTION_UTIL.does_table_have_data(g_ok_rowid_table,' status=1 ')<2 then

5821: end if;
5822: if EDW_OWB_COLLECTION_UTIL.drop_table(g_ok_rowid_table_prev)=false then
5823: null;
5824: end if;
5825: if EDW_OWB_COLLECTION_UTIL.does_table_have_data(g_ok_rowid_table,' status=1 ')<2 then
5826: g_collections_done:=true;
5827: end if;
5828: if g_debug then
5829: write_to_log_file_n('Time'||get_time);

Line 5857: l_last_analyzed:=EDW_OWB_COLLECTION_UTIL.get_last_analyzed_date(g_fstgTableName,g_table_owner);

5853: if g_debug then
5854: write_to_log_file_n('In check_total_records_to_collect'||get_time);
5855: end if;
5856: --if stg never analyzed, analyze it 1%
5857: l_last_analyzed:=EDW_OWB_COLLECTION_UTIL.get_last_analyzed_date(g_fstgTableName,g_table_owner);
5858: write_to_debug_n('Last analyzed date for interface table '||l_last_analyzed);
5859: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(g_fstgTableName,g_table_owner,1);--1%
5860: l_stmt:='create table '||g_reqid_table||' tablespace '||g_op_table_space;
5861: if g_parallel is not null then

Line 5859: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(g_fstgTableName,g_table_owner,1);--1%

5855: end if;
5856: --if stg never analyzed, analyze it 1%
5857: l_last_analyzed:=EDW_OWB_COLLECTION_UTIL.get_last_analyzed_date(g_fstgTableName,g_table_owner);
5858: write_to_debug_n('Last analyzed date for interface table '||l_last_analyzed);
5859: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(g_fstgTableName,g_table_owner,1);--1%
5860: l_stmt:='create table '||g_reqid_table||' tablespace '||g_op_table_space;
5861: if g_parallel is not null then
5862: l_stmt:=l_stmt||' parallel (degree '||g_parallel||') ';
5863: end if;

Line 5873: if EDW_OWB_COLLECTION_UTIL.drop_table(g_reqid_table)=false then

5869: l_stmt:=l_stmt||' rowid row_id from '||g_fstgTableName||' where collection_status in (''READY'',''DANGLING'')';
5870: if g_debug then
5871: write_to_log_file_n('Going to execute '||l_stmt||get_time);
5872: end if;
5873: if EDW_OWB_COLLECTION_UTIL.drop_table(g_reqid_table)=false then
5874: null;
5875: end if;
5876: execute immediate l_stmt;
5877: g_total_records:=sql%rowcount;

Line 5879: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(g_reqid_table,instr(g_reqid_table,'.')+1,

5875: end if;
5876: execute immediate l_stmt;
5877: g_total_records:=sql%rowcount;
5878: write_to_log_file_n('Created '||g_reqid_table||get_time);
5879: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(g_reqid_table,instr(g_reqid_table,'.')+1,
5880: length(g_reqid_table)),substr(g_reqid_table,1,instr(g_reqid_table,'.')-1));
5881: if g_debug then
5882: write_to_log_file('Result '||g_total_records||get_time);
5883: end if;

Line 5902: if EDW_OWB_COLLECTION_UTIL.drop_table(g_dup_rownum)=false then

5898: if g_debug then
5899: write_to_log_file_n('In create_dup_rownum_table '||p_col||get_time);
5900: end if;
5901: --create a table to hold the pk, rowid and rownum
5902: if EDW_OWB_COLLECTION_UTIL.drop_table(g_dup_rownum)=false then
5903: null;
5904: end if;
5905: if g_parallel is null then
5906: l_stmt:='create table '||g_dup_rownum||' tablespace '||g_op_table_space;

Line 5938: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(g_dup_rownum,instr(g_dup_rownum,'.')+1,

5934: g_status:=false;
5935: write_to_log_file_n(g_status_message);
5936: return false;
5937: end;
5938: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(g_dup_rownum,instr(g_dup_rownum,'.')+1,
5939: length(g_dup_rownum)),substr(g_dup_rownum,1,instr(g_dup_rownum,'.')-1));
5940: return true;
5941: Exception when others then
5942: g_status_message:=sqlerrm;

Line 5981: if EDW_OWB_COLLECTION_UTIL.check_table(g_ok_rowid_table)=false then

5977: --we must see if we need to regenerate the table
5978: if regenerate_ok_table(l_ok_rowid_table,l_ok_copy_rowid_table)=false then
5979: return 0;
5980: end if;
5981: if EDW_OWB_COLLECTION_UTIL.check_table(g_ok_rowid_table)=false then
5982: return 2;
5983: end if;
5984: if EDW_OWB_COLLECTION_UTIL.does_table_have_data(g_ok_rowid_table,' status=1 ')=2 then
5985: g_dup_err_rec_flag:=true;

Line 5984: if EDW_OWB_COLLECTION_UTIL.does_table_have_data(g_ok_rowid_table,' status=1 ')=2 then

5980: end if;
5981: if EDW_OWB_COLLECTION_UTIL.check_table(g_ok_rowid_table)=false then
5982: return 2;
5983: end if;
5984: if EDW_OWB_COLLECTION_UTIL.does_table_have_data(g_ok_rowid_table,' status=1 ')=2 then
5985: g_dup_err_rec_flag:=true;
5986: end if;
5987: return 2;
5988: Exception when others then

Line 6019: if EDW_OWB_COLLECTION_UTIL.drop_table(g_ok_rowid_table)=false then

6015: --need to regenerate
6016: if g_debug then
6017: write_to_log_file_n('Need to regenerate the table');
6018: end if;
6019: if EDW_OWB_COLLECTION_UTIL.drop_table(g_ok_rowid_table)=false then
6020: null;
6021: end if;
6022: --first see if the tables exist. if not, start afresh
6023: if EDW_OWB_COLLECTION_UTIL.check_table(p_ok_copy_rowid_table)=true and

Line 6023: if EDW_OWB_COLLECTION_UTIL.check_table(p_ok_copy_rowid_table)=true and

6019: if EDW_OWB_COLLECTION_UTIL.drop_table(g_ok_rowid_table)=false then
6020: null;
6021: end if;
6022: --first see if the tables exist. if not, start afresh
6023: if EDW_OWB_COLLECTION_UTIL.check_table(p_ok_copy_rowid_table)=true and
6024: EDW_OWB_COLLECTION_UTIL.check_table(p_ok_rowid_table)=true then
6025: --analyze the tables just in case
6026: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(p_ok_copy_rowid_table,instr(p_ok_copy_rowid_table,'.')+1,
6027: length(p_ok_copy_rowid_table)),substr(p_ok_copy_rowid_table,1,instr(p_ok_copy_rowid_table,'.')-1));

Line 6024: EDW_OWB_COLLECTION_UTIL.check_table(p_ok_rowid_table)=true then

6020: null;
6021: end if;
6022: --first see if the tables exist. if not, start afresh
6023: if EDW_OWB_COLLECTION_UTIL.check_table(p_ok_copy_rowid_table)=true and
6024: EDW_OWB_COLLECTION_UTIL.check_table(p_ok_rowid_table)=true then
6025: --analyze the tables just in case
6026: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(p_ok_copy_rowid_table,instr(p_ok_copy_rowid_table,'.')+1,
6027: length(p_ok_copy_rowid_table)),substr(p_ok_copy_rowid_table,1,instr(p_ok_copy_rowid_table,'.')-1));
6028: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(p_ok_rowid_table,instr(p_ok_rowid_table,'.')+1,

Line 6026: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(p_ok_copy_rowid_table,instr(p_ok_copy_rowid_table,'.')+1,

6022: --first see if the tables exist. if not, start afresh
6023: if EDW_OWB_COLLECTION_UTIL.check_table(p_ok_copy_rowid_table)=true and
6024: EDW_OWB_COLLECTION_UTIL.check_table(p_ok_rowid_table)=true then
6025: --analyze the tables just in case
6026: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(p_ok_copy_rowid_table,instr(p_ok_copy_rowid_table,'.')+1,
6027: length(p_ok_copy_rowid_table)),substr(p_ok_copy_rowid_table,1,instr(p_ok_copy_rowid_table,'.')-1));
6028: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(p_ok_rowid_table,instr(p_ok_rowid_table,'.')+1,
6029: length(p_ok_rowid_table)),substr(p_ok_rowid_table,1,instr(p_ok_rowid_table,'.')-1));
6030: l_stmt:='create table '||g_ok_rowid_table||' tablespace '||g_op_table_space;

Line 6028: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(p_ok_rowid_table,instr(p_ok_rowid_table,'.')+1,

6024: EDW_OWB_COLLECTION_UTIL.check_table(p_ok_rowid_table)=true then
6025: --analyze the tables just in case
6026: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(p_ok_copy_rowid_table,instr(p_ok_copy_rowid_table,'.')+1,
6027: length(p_ok_copy_rowid_table)),substr(p_ok_copy_rowid_table,1,instr(p_ok_copy_rowid_table,'.')-1));
6028: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(p_ok_rowid_table,instr(p_ok_rowid_table,'.')+1,
6029: length(p_ok_rowid_table)),substr(p_ok_rowid_table,1,instr(p_ok_rowid_table,'.')-1));
6030: l_stmt:='create table '||g_ok_rowid_table||' tablespace '||g_op_table_space;
6031: if g_parallel is not null then
6032: l_stmt:=l_stmt||' parallel (degree '||g_parallel||') ';

Line 6043: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(g_ok_rowid_table,instr(g_ok_rowid_table,'.')+1,

6039: execute immediate l_stmt;
6040: if g_debug then
6041: write_to_log_file_n('Regenerated '||g_ok_rowid_table||' with '||sql%rowcount||' rows'||get_time);
6042: end if;
6043: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(g_ok_rowid_table,instr(g_ok_rowid_table,'.')+1,
6044: length(g_ok_rowid_table)),substr(g_ok_rowid_table,1,instr(g_ok_rowid_table,'.')-1));
6045: if EDW_OWB_COLLECTION_UTIL.drop_table(p_ok_copy_rowid_table)=false then
6046: null;
6047: end if;

Line 6045: if EDW_OWB_COLLECTION_UTIL.drop_table(p_ok_copy_rowid_table)=false then

6041: write_to_log_file_n('Regenerated '||g_ok_rowid_table||' with '||sql%rowcount||' rows'||get_time);
6042: end if;
6043: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(g_ok_rowid_table,instr(g_ok_rowid_table,'.')+1,
6044: length(g_ok_rowid_table)),substr(g_ok_rowid_table,1,instr(g_ok_rowid_table,'.')-1));
6045: if EDW_OWB_COLLECTION_UTIL.drop_table(p_ok_copy_rowid_table)=false then
6046: null;
6047: end if;
6048: if EDW_OWB_COLLECTION_UTIL.drop_table(p_ok_rowid_table)=false then
6049: null;

Line 6048: if EDW_OWB_COLLECTION_UTIL.drop_table(p_ok_rowid_table)=false then

6044: length(g_ok_rowid_table)),substr(g_ok_rowid_table,1,instr(g_ok_rowid_table,'.')-1));
6045: if EDW_OWB_COLLECTION_UTIL.drop_table(p_ok_copy_rowid_table)=false then
6046: null;
6047: end if;
6048: if EDW_OWB_COLLECTION_UTIL.drop_table(p_ok_rowid_table)=false then
6049: null;
6050: end if;
6051: else
6052: if g_debug then

Line 6060: EDW_OWB_COLLECTION_UTIL.set_rollback(g_rollback);

6056: l_stmt:='delete edw_coll_progress_log where object_name=:a and object_type=:b';
6057: if g_debug then
6058: write_to_log_file_n('Going to execute '||l_stmt||get_time);
6059: end if;
6060: EDW_OWB_COLLECTION_UTIL.set_rollback(g_rollback);
6061: execute immediate l_stmt using g_ok_rowid_table,'OK_ROWID';
6062: commit;
6063: else
6064: if g_debug then

Line 6099: if EDW_OWB_COLLECTION_UTIL.drop_table(l_ok_rowid_table)=false then

6095: l_base_count:=0;
6096: l_insert_count:=0;
6097: l_ok_rowid_table:=g_ok_rowid_table||'T';
6098: l_ok_copy_rowid_table:=g_ok_rowid_table||'C';
6099: if EDW_OWB_COLLECTION_UTIL.drop_table(l_ok_rowid_table)=false then
6100: null;
6101: end if;
6102: if EDW_OWB_COLLECTION_UTIL.drop_table(l_ok_copy_rowid_table)=false then
6103: null;

Line 6102: if EDW_OWB_COLLECTION_UTIL.drop_table(l_ok_copy_rowid_table)=false then

6098: l_ok_copy_rowid_table:=g_ok_rowid_table||'C';
6099: if EDW_OWB_COLLECTION_UTIL.drop_table(l_ok_rowid_table)=false then
6100: null;
6101: end if;
6102: if EDW_OWB_COLLECTION_UTIL.drop_table(l_ok_copy_rowid_table)=false then
6103: null;
6104: end if;
6105: if EDW_OWB_COLLECTION_UTIL.check_table(g_ok_rowid_table)=true then
6106: l_found:=true;

Line 6105: if EDW_OWB_COLLECTION_UTIL.check_table(g_ok_rowid_table)=true then

6101: end if;
6102: if EDW_OWB_COLLECTION_UTIL.drop_table(l_ok_copy_rowid_table)=false then
6103: null;
6104: end if;
6105: if EDW_OWB_COLLECTION_UTIL.check_table(g_ok_rowid_table)=true then
6106: l_found:=true;
6107: end if;
6108: if l_found=false then
6109: l_stmt:='create table '||g_ok_rowid_table||' tablespace '||g_op_table_space;

Line 6141: if EDW_OWB_COLLECTION_UTIL.drop_table(l_ok_rowid_table_el)=false then

6137: l_stmt:=l_stmt||' parallel (degree '||g_parallel||') ';
6138: end if;
6139: l_stmt:=l_stmt||' as select A.row_id,A.status from '||g_ok_rowid_table||' A,'||g_reqid_table||' B '||
6140: ' where A.row_id=B.row_id';
6141: if EDW_OWB_COLLECTION_UTIL.drop_table(l_ok_rowid_table_el)=false then
6142: null;
6143: end if;
6144: if g_debug then
6145: write_to_log_file_n('Going to execute '||l_stmt||get_time);

Line 6152: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(l_ok_rowid_table_el,instr(l_ok_rowid_table_el,'.')+1,

6148: l_base_count:=sql%rowcount;
6149: if g_debug then
6150: write_to_log_file_n('Created '||l_ok_rowid_table_el||' with '||l_base_count||' rows'||get_time);
6151: end if;
6152: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(l_ok_rowid_table_el,instr(l_ok_rowid_table_el,'.')+1,
6153: length(l_ok_rowid_table_el)),substr(l_ok_rowid_table_el,1,instr(l_ok_rowid_table_el,'.')-1));
6154: if EDW_OWB_COLLECTION_UTIL.drop_table(g_ok_rowid_table)=false then
6155: null;
6156: end if;

Line 6154: if EDW_OWB_COLLECTION_UTIL.drop_table(g_ok_rowid_table)=false then

6150: write_to_log_file_n('Created '||l_ok_rowid_table_el||' with '||l_base_count||' rows'||get_time);
6151: end if;
6152: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(l_ok_rowid_table_el,instr(l_ok_rowid_table_el,'.')+1,
6153: length(l_ok_rowid_table_el)),substr(l_ok_rowid_table_el,1,instr(l_ok_rowid_table_el,'.')-1));
6154: if EDW_OWB_COLLECTION_UTIL.drop_table(g_ok_rowid_table)=false then
6155: null;
6156: end if;
6157: g_ok_rowid_table:=l_ok_rowid_table_el;
6158: l_stmt:='create table '||l_ok_rowid_table||' tablespace '||g_op_table_space;

Line 6173: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(l_ok_rowid_table,instr(l_ok_rowid_table,'.')+1,

6169: execute immediate l_stmt;
6170: if g_debug then
6171: write_to_log_file_n('Created '||l_ok_rowid_table||' with '||sql%rowcount||' rows'||get_time);
6172: end if;
6173: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(l_ok_rowid_table,instr(l_ok_rowid_table,'.')+1,
6174: length(l_ok_rowid_table)),substr(l_ok_rowid_table,1,instr(l_ok_rowid_table,'.')-1));
6175: if p_status = 1 then --there are no duplicates
6176: l_stmt:='insert into '||g_ok_rowid_table||'(row_id, status) ';
6177: l_stmt:=l_stmt||' select ';

Line 6182: EDW_OWB_COLLECTION_UTIL.set_rollback(g_rollback);

6178: l_stmt:=l_stmt||' row_id,0 from '||l_ok_rowid_table;
6179: if g_debug then
6180: write_to_log_file_n('Going to execute '||l_stmt||get_time);
6181: end if;
6182: EDW_OWB_COLLECTION_UTIL.set_rollback(g_rollback);
6183: execute immediate l_stmt;
6184: l_insert_count:=sql%rowcount;
6185: g_ok_rowid_number:=l_base_count+l_insert_count;
6186: commit;

Line 6191: if EDW_OWB_COLLECTION_UTIL.drop_table(l_ok_rowid_table)=false then

6187: if g_debug then
6188: write_to_log_file_n('Inserted '||l_insert_count||' rows into '||g_ok_rowid_table||get_time);
6189: write_to_log_file('g_ok_rowid_number='||g_ok_rowid_number);
6190: end if;
6191: if EDW_OWB_COLLECTION_UTIL.drop_table(l_ok_rowid_table)=false then
6192: null;
6193: end if;
6194: else --there are duplicates
6195: l_stmt:='create table '||l_ok_copy_rowid_table||' tablespace '||g_op_table_space;

Line 6209: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(l_ok_copy_rowid_table,instr(l_ok_copy_rowid_table,'.')+1,

6205: execute immediate l_stmt;
6206: if g_debug then
6207: write_to_log_file_n('Created '||l_ok_copy_rowid_table||' with '||sql%rowcount||' rows'||get_time);
6208: end if;
6209: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(l_ok_copy_rowid_table,instr(l_ok_copy_rowid_table,'.')+1,
6210: length(l_ok_copy_rowid_table)),substr(l_ok_copy_rowid_table,1,instr(l_ok_copy_rowid_table,'.')-1));
6211: if EDW_OWB_COLLECTION_UTIL.drop_table(l_ok_rowid_table)=false then
6212: null;
6213: end if;

Line 6211: if EDW_OWB_COLLECTION_UTIL.drop_table(l_ok_rowid_table)=false then

6207: write_to_log_file_n('Created '||l_ok_copy_rowid_table||' with '||sql%rowcount||' rows'||get_time);
6208: end if;
6209: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(l_ok_copy_rowid_table,instr(l_ok_copy_rowid_table,'.')+1,
6210: length(l_ok_copy_rowid_table)),substr(l_ok_copy_rowid_table,1,instr(l_ok_copy_rowid_table,'.')-1));
6211: if EDW_OWB_COLLECTION_UTIL.drop_table(l_ok_rowid_table)=false then
6212: null;
6213: end if;
6214: l_stmt:='create table '||l_ok_rowid_table||' tablespace '||g_op_table_space;
6215: if g_parallel is not null then

Line 6228: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(l_ok_rowid_table,instr(l_ok_rowid_table,'.')+1,

6224: execute immediate l_stmt;
6225: if g_debug then
6226: write_to_log_file_n('Created '||l_ok_rowid_table||' with '||sql%rowcount||' rows'||get_time);
6227: end if;
6228: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(l_ok_rowid_table,instr(l_ok_rowid_table,'.')+1,
6229: length(l_ok_rowid_table)),substr(l_ok_rowid_table,1,instr(l_ok_rowid_table,'.')-1));
6230: if EDW_OWB_COLLECTION_UTIL.drop_table(g_ok_rowid_table)=false then
6231: null;
6232: end if;

Line 6230: if EDW_OWB_COLLECTION_UTIL.drop_table(g_ok_rowid_table)=false then

6226: write_to_log_file_n('Created '||l_ok_rowid_table||' with '||sql%rowcount||' rows'||get_time);
6227: end if;
6228: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(l_ok_rowid_table,instr(l_ok_rowid_table,'.')+1,
6229: length(l_ok_rowid_table)),substr(l_ok_rowid_table,1,instr(l_ok_rowid_table,'.')-1));
6230: if EDW_OWB_COLLECTION_UTIL.drop_table(g_ok_rowid_table)=false then
6231: null;
6232: end if;
6233: begin
6234: l_stmt:='create table '||g_ok_rowid_table||' tablespace '||g_op_table_space;

Line 6254: if EDW_OWB_COLLECTION_UTIL.insert_into_coll_progress(g_ok_rowid_table,'OK_ROWID',null,null)=false then

6250: if there is any problem creating the table then we need to log that and be able to re generate the
6251: g_ok_rowid_number for the next run
6252: we must not drop l_ok_rowid_table,l_ok_copy_rowid_table. they will be user for recovery
6253: */
6254: if EDW_OWB_COLLECTION_UTIL.insert_into_coll_progress(g_ok_rowid_table,'OK_ROWID',null,null)=false then
6255: null;
6256: end if;
6257: commit;
6258: g_status_message:=sqlerrm;

Line 6263: if EDW_OWB_COLLECTION_UTIL.drop_table(l_ok_rowid_table)=false then

6259: g_status:=false;
6260: write_to_log_file_n(g_status_message);
6261: return false;
6262: end;
6263: if EDW_OWB_COLLECTION_UTIL.drop_table(l_ok_rowid_table)=false then
6264: null;
6265: end if;
6266: if EDW_OWB_COLLECTION_UTIL.drop_table(l_ok_copy_rowid_table)=false then
6267: null;

Line 6266: if EDW_OWB_COLLECTION_UTIL.drop_table(l_ok_copy_rowid_table)=false then

6262: end;
6263: if EDW_OWB_COLLECTION_UTIL.drop_table(l_ok_rowid_table)=false then
6264: null;
6265: end if;
6266: if EDW_OWB_COLLECTION_UTIL.drop_table(l_ok_copy_rowid_table)=false then
6267: null;
6268: end if;
6269: end if;--if p_status <> 1 then
6270: end if;--l_found=false then

Line 6271: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(g_ok_rowid_table,instr(g_ok_rowid_table,'.')+1,

6267: null;
6268: end if;
6269: end if;--if p_status <> 1 then
6270: end if;--l_found=false then
6271: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(g_ok_rowid_table,instr(g_ok_rowid_table,'.')+1,
6272: length(g_ok_rowid_table)),substr(g_ok_rowid_table,1,instr(g_ok_rowid_table,'.')-1));
6273: return true;
6274: Exception when others then
6275: g_status_message:=sqlerrm;

Line 6291: l_index EDW_OWB_COLLECTION_UTIL.varcharTableType;

6287: function move_dup_rowid_table return number is
6288: l_stmt varchar2(4000);
6289: l_col varchar2(400);--what col to use. last update date or rownum
6290: l_col_use varchar2(80);
6291: l_index EDW_OWB_COLLECTION_UTIL.varcharTableType;
6292: l_ind_col EDW_OWB_COLLECTION_UTIL.varcharTableType;
6293: l_number_index number;
6294: l_fstg_index varchar2(400);
6295: l_index_index number;

Line 6292: l_ind_col EDW_OWB_COLLECTION_UTIL.varcharTableType;

6288: l_stmt varchar2(4000);
6289: l_col varchar2(400);--what col to use. last update date or rownum
6290: l_col_use varchar2(80);
6291: l_index EDW_OWB_COLLECTION_UTIL.varcharTableType;
6292: l_ind_col EDW_OWB_COLLECTION_UTIL.varcharTableType;
6293: l_number_index number;
6294: l_fstg_index varchar2(400);
6295: l_index_index number;
6296: TYPE CurTyp IS REF CURSOR;

Line 6307: if EDW_OWB_COLLECTION_UTIL.drop_table(g_dup_hold_pk_table) = false then

6303: if g_debug then
6304: write_to_log_file_n('In move_dup_rowid_table'||get_time);
6305: end if;
6306: g_dup_hold_table_number:=0;
6307: if EDW_OWB_COLLECTION_UTIL.drop_table(g_dup_hold_pk_table) = false then
6308: null;
6309: end if;
6310: l_stmt:='create table '||g_dup_hold_pk_table||' tablespace '||g_op_table_space;
6311: if g_parallel is not null then

Line 6343: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(g_dup_hold_pk_table,instr(g_dup_hold_pk_table,'.')+1,

6339: g_status:=false;
6340: write_to_log_file_n(g_status_message);
6341: return 0;
6342: end ;
6343: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(g_dup_hold_pk_table,instr(g_dup_hold_pk_table,'.')+1,
6344: length(g_dup_hold_pk_table)),substr(g_dup_hold_pk_table,1,instr(g_dup_hold_pk_table,'.')-1));
6345: if EDW_OWB_COLLECTION_UTIL.drop_table(g_dup_hold_table) = false then
6346: write_to_log_file_n('Table '||g_dup_hold_table||' not found for dropping');
6347: end if;

Line 6345: if EDW_OWB_COLLECTION_UTIL.drop_table(g_dup_hold_table) = false then

6341: return 0;
6342: end ;
6343: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(g_dup_hold_pk_table,instr(g_dup_hold_pk_table,'.')+1,
6344: length(g_dup_hold_pk_table)),substr(g_dup_hold_pk_table,1,instr(g_dup_hold_pk_table,'.')-1));
6345: if EDW_OWB_COLLECTION_UTIL.drop_table(g_dup_hold_table) = false then
6346: write_to_log_file_n('Table '||g_dup_hold_table||' not found for dropping');
6347: end if;
6348: if g_duplicate_collect then
6349: if EDW_OWB_COLLECTION_UTIL.does_table_have_data(g_fstgTableName,'LAST_UPDATE_DATE IS NOT NULL')=2 then

Line 6349: if EDW_OWB_COLLECTION_UTIL.does_table_have_data(g_fstgTableName,'LAST_UPDATE_DATE IS NOT NULL')=2 then

6345: if EDW_OWB_COLLECTION_UTIL.drop_table(g_dup_hold_table) = false then
6346: write_to_log_file_n('Table '||g_dup_hold_table||' not found for dropping');
6347: end if;
6348: if g_duplicate_collect then
6349: if EDW_OWB_COLLECTION_UTIL.does_table_have_data(g_fstgTableName,'LAST_UPDATE_DATE IS NOT NULL')=2 then
6350: l_col:='LAST_UPDATE_DATE';
6351: l_col_use:='COL_LAST_UPDATE_DATE';
6352: l_use_rownum_flag:=false;
6353: else

Line 6387: if EDW_OWB_COLLECTION_UTIL.drop_table(g_dup_rownum_rowid)=false then

6383: if l_use_rownum_flag then
6384: l_col_use:='COL_ROWNUM';
6385: end if;
6386: end if;
6387: if EDW_OWB_COLLECTION_UTIL.drop_table(g_dup_rownum_rowid)=false then
6388: null;
6389: end if;
6390: l_stmt:='create table '||g_dup_rownum_rowid||' tablespace '||g_op_table_space;
6391: if g_parallel is not null then

Line 6410: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(g_dup_rownum_rowid,instr(g_dup_rownum_rowid,'.')+1,

6406: g_status:=false;
6407: write_to_log_file_n(g_status_message);
6408: return 0;
6409: end;
6410: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(g_dup_rownum_rowid,instr(g_dup_rownum_rowid,'.')+1,
6411: length(g_dup_rownum_rowid)),substr(g_dup_rownum_rowid,1,instr(g_dup_rownum_rowid,'.')-1));
6412: end if;--if g_duplicate_collect
6413: if EDW_OWB_COLLECTION_UTIL.drop_table(g_dup_hold_table)=false then
6414: null;

Line 6413: if EDW_OWB_COLLECTION_UTIL.drop_table(g_dup_hold_table)=false then

6409: end;
6410: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(g_dup_rownum_rowid,instr(g_dup_rownum_rowid,'.')+1,
6411: length(g_dup_rownum_rowid)),substr(g_dup_rownum_rowid,1,instr(g_dup_rownum_rowid,'.')-1));
6412: end if;--if g_duplicate_collect
6413: if EDW_OWB_COLLECTION_UTIL.drop_table(g_dup_hold_table)=false then
6414: null;
6415: end if;
6416: --need to multi thread this section
6417: --first see if multi threading is reqd

Line 6418: l_dup_rownum_rowid_count:=EDW_OWB_COLLECTION_UTIL.get_table_count_stats(g_dup_rownum_rowid,g_bis_owner);

6414: null;
6415: end if;
6416: --need to multi thread this section
6417: --first see if multi threading is reqd
6418: l_dup_rownum_rowid_count:=EDW_OWB_COLLECTION_UTIL.get_table_count_stats(g_dup_rownum_rowid,g_bis_owner);
6419: l_dup_rownum_count:=EDW_OWB_COLLECTION_UTIL.get_table_count_stats(g_dup_rownum,g_bis_owner);
6420: if g_debug then
6421: write_to_log_file_n('l_dup_rownum_count='||l_dup_rownum_count||',l_dup_rownum_rowid_count='||
6422: l_dup_rownum_rowid_count||',g_min_job_load_size='||g_min_job_load_size);

Line 6419: l_dup_rownum_count:=EDW_OWB_COLLECTION_UTIL.get_table_count_stats(g_dup_rownum,g_bis_owner);

6415: end if;
6416: --need to multi thread this section
6417: --first see if multi threading is reqd
6418: l_dup_rownum_rowid_count:=EDW_OWB_COLLECTION_UTIL.get_table_count_stats(g_dup_rownum_rowid,g_bis_owner);
6419: l_dup_rownum_count:=EDW_OWB_COLLECTION_UTIL.get_table_count_stats(g_dup_rownum,g_bis_owner);
6420: if g_debug then
6421: write_to_log_file_n('l_dup_rownum_count='||l_dup_rownum_count||',l_dup_rownum_rowid_count='||
6422: l_dup_rownum_rowid_count||',g_min_job_load_size='||g_min_job_load_size);
6423: end if;

Line 6471: EDW_OWB_COLLECTION_UTIL.create_iot_index(g_dup_hold_table,'row_id',g_op_table_space,g_parallel);

6467: return 0;
6468: end ;
6469: --4161164 : remove IOT , replace with ordinary table and index
6470: if g_dup_multi_thread_flag=false then
6471: EDW_OWB_COLLECTION_UTIL.create_iot_index(g_dup_hold_table,'row_id',g_op_table_space,g_parallel);
6472: end if;
6473: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(g_dup_hold_table,instr(g_dup_hold_table,'.')+1,
6474: length(g_dup_hold_table)),substr(g_dup_hold_table,1,instr(g_dup_hold_table,'.')-1));
6475: if g_dup_hold_table_number=0 then

Line 6473: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(g_dup_hold_table,instr(g_dup_hold_table,'.')+1,

6469: --4161164 : remove IOT , replace with ordinary table and index
6470: if g_dup_multi_thread_flag=false then
6471: EDW_OWB_COLLECTION_UTIL.create_iot_index(g_dup_hold_table,'row_id',g_op_table_space,g_parallel);
6472: end if;
6473: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(g_dup_hold_table,instr(g_dup_hold_table,'.')+1,
6474: length(g_dup_hold_table)),substr(g_dup_hold_table,1,instr(g_dup_hold_table,'.')-1));
6475: if g_dup_hold_table_number=0 then
6476: l_stmt:='select count(*) from '||g_dup_hold_table;
6477: if g_debug then

Line 6500: l_index EDW_OWB_COLLECTION_UTIL.varcharTableType;

6496: l_stmt varchar2(10000);
6497: l_opcode_table varchar2(400);
6498: l_table varchar2(400);
6499: l_index_found boolean;
6500: l_index EDW_OWB_COLLECTION_UTIL.varcharTableType;
6501: l_ind_col EDW_OWB_COLLECTION_UTIL.varcharTableType;
6502: l_ind_col_pos EDW_OWB_COLLECTION_UTIL.numberTableType;
6503: l_number_index number;
6504: l_table1 varchar2(400);

Line 6501: l_ind_col EDW_OWB_COLLECTION_UTIL.varcharTableType;

6497: l_opcode_table varchar2(400);
6498: l_table varchar2(400);
6499: l_index_found boolean;
6500: l_index EDW_OWB_COLLECTION_UTIL.varcharTableType;
6501: l_ind_col EDW_OWB_COLLECTION_UTIL.varcharTableType;
6502: l_ind_col_pos EDW_OWB_COLLECTION_UTIL.numberTableType;
6503: l_number_index number;
6504: l_table1 varchar2(400);
6505: l_table2 varchar2(400);

Line 6502: l_ind_col_pos EDW_OWB_COLLECTION_UTIL.numberTableType;

6498: l_table varchar2(400);
6499: l_index_found boolean;
6500: l_index EDW_OWB_COLLECTION_UTIL.varcharTableType;
6501: l_ind_col EDW_OWB_COLLECTION_UTIL.varcharTableType;
6502: l_ind_col_pos EDW_OWB_COLLECTION_UTIL.numberTableType;
6503: l_number_index number;
6504: l_table1 varchar2(400);
6505: l_table2 varchar2(400);
6506: l_max_pkkey_value number;

Line 6515: g_fact_count:=EDW_OWB_COLLECTION_UTIL.get_table_count_stats(g_FactTableName,g_table_owner);

6511: l_opcode_table:=g_opcode_table||'T';
6512: l_table:=g_opcode_table||'TA';
6513: l_table1:=l_opcode_table||'1';
6514: l_table2:=l_opcode_table||'2';
6515: g_fact_count:=EDW_OWB_COLLECTION_UTIL.get_table_count_stats(g_FactTableName,g_table_owner);
6516: if g_stg_copy_table_flag=false and g_use_mti=false then
6517: l_stmt:='create table '||l_table||' tablespace '||g_op_table_space;
6518: if g_parallel is not null then
6519: l_stmt:=l_stmt||' parallel (degree '||g_parallel||') ';

Line 6522: if EDW_OWB_COLLECTION_UTIL.drop_table(l_table)=false then

6518: if g_parallel is not null then
6519: l_stmt:=l_stmt||' parallel (degree '||g_parallel||') ';
6520: end if;
6521: l_stmt:=l_stmt||' as select row_id from '||g_ok_rowid_table||' where status=1';
6522: if EDW_OWB_COLLECTION_UTIL.drop_table(l_table)=false then
6523: null;
6524: end if;
6525: if g_debug then
6526: write_to_log_file_n('Going to execute '||l_stmt||get_time);

Line 6535: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(l_table,instr(l_table,'.')+1,

6531: end if;
6532: if g_debug then
6533: write_to_log_file_n('Created with '||sql%rowcount||' rows '||get_time);
6534: end if;
6535: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(l_table,instr(l_table,'.')+1,
6536: length(l_table)),substr(l_table,1,instr(l_table,'.')-1));
6537: end if;
6538: g_fact_use_nl:=EDW_OWB_COLLECTION_UTIL.get_join_nl(g_number_rows_ready,g_fact_count,g_stg_join_nl_percentage);
6539: l_stmt:='create table '||l_opcode_table||' tablespace '||g_op_table_space;

Line 6538: g_fact_use_nl:=EDW_OWB_COLLECTION_UTIL.get_join_nl(g_number_rows_ready,g_fact_count,g_stg_join_nl_percentage);

6534: end if;
6535: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(l_table,instr(l_table,'.')+1,
6536: length(l_table)),substr(l_table,1,instr(l_table,'.')-1));
6537: end if;
6538: g_fact_use_nl:=EDW_OWB_COLLECTION_UTIL.get_join_nl(g_number_rows_ready,g_fact_count,g_stg_join_nl_percentage);
6539: l_stmt:='create table '||l_opcode_table||' tablespace '||g_op_table_space;
6540: if g_parallel is not null then
6541: l_stmt:=l_stmt||' parallel (degree '||g_parallel||') ';
6542: end if;

Line 6576: if EDW_OWB_COLLECTION_UTIL.drop_table(l_opcode_table)=false then

6572: else
6573: l_stmt:=l_stmt||' from '||l_table||','||g_fstgTableName;
6574: l_stmt:=l_stmt||' where '||l_table||'.row_id='||g_fstgTableName||'.rowid';
6575: end if;
6576: if EDW_OWB_COLLECTION_UTIL.drop_table(l_opcode_table)=false then
6577: null;
6578: end if;
6579: if g_debug then
6580: write_to_log_file_n('Going to execute '||l_stmt||get_time);

Line 6586: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(l_opcode_table,instr(l_opcode_table,'.')+1,

6582: execute immediate l_stmt;
6583: if g_debug then
6584: write_to_log_file_n('Created '||l_opcode_table||' with '||sql%rowcount||' rows '||get_time);
6585: end if;
6586: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(l_opcode_table,instr(l_opcode_table,'.')+1,
6587: length(l_opcode_table)),substr(l_opcode_table,1,instr(l_opcode_table,'.')-1));
6588: if EDW_OWB_COLLECTION_UTIL.drop_table(l_table)=false then
6589: null;
6590: end if;

Line 6588: if EDW_OWB_COLLECTION_UTIL.drop_table(l_table)=false then

6584: write_to_log_file_n('Created '||l_opcode_table||' with '||sql%rowcount||' rows '||get_time);
6585: end if;
6586: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(l_opcode_table,instr(l_opcode_table,'.')+1,
6587: length(l_opcode_table)),substr(l_opcode_table,1,instr(l_opcode_table,'.')-1));
6588: if EDW_OWB_COLLECTION_UTIL.drop_table(l_table)=false then
6589: null;
6590: end if;
6591: l_index_found:=false;
6592: if EDW_OWB_COLLECTION_UTIL.get_table_index_col(g_FactTableName,g_table_owner,l_index,l_ind_col,

Line 6592: if EDW_OWB_COLLECTION_UTIL.get_table_index_col(g_FactTableName,g_table_owner,l_index,l_ind_col,

6588: if EDW_OWB_COLLECTION_UTIL.drop_table(l_table)=false then
6589: null;
6590: end if;
6591: l_index_found:=false;
6592: if EDW_OWB_COLLECTION_UTIL.get_table_index_col(g_FactTableName,g_table_owner,l_index,l_ind_col,
6593: l_ind_col_pos,l_number_index)=true then
6594: for i in 1..l_number_index loop
6595: if l_ind_col(i)=g_factPKName then
6596: if l_ind_col_pos(i)=1 then

Line 6630: if EDW_OWB_COLLECTION_UTIL.drop_table(l_table1)=false then

6626: l_stmt:=l_stmt||','||g_FactTableName||'.CREATION_DATE CREATION_DATE';
6627: end if;
6628: l_stmt:=l_stmt||' from '||l_opcode_table||','||g_FactTableName||' where '||
6629: g_FactTableName||'.'||g_factPKName||'(+)='||l_opcode_table||'.'||g_fstgPKName;
6630: if EDW_OWB_COLLECTION_UTIL.drop_table(l_table1)=false then
6631: null;
6632: end if;
6633: if g_debug then
6634: write_to_log_file_n('Going to execute '||l_stmt||get_time);

Line 6654: if EDW_OWB_COLLECTION_UTIL.drop_table(l_table2)=false then

6650: if g_update_type='DELETE-INSERT' then
6651: l_stmt:=l_stmt||','||g_fstgPKName||',CREATION_DATE';
6652: end if;
6653: l_stmt:=l_stmt||' from '||l_table1;
6654: if EDW_OWB_COLLECTION_UTIL.drop_table(l_table2)=false then
6655: null;
6656: end if;
6657: if g_debug then
6658: write_to_log_file_n('Going to execute '||l_stmt||get_time);

Line 6671: if EDW_OWB_COLLECTION_UTIL.drop_table(l_table1)=false then

6667: write_to_log_file_n('Going to execute '||l_stmt||get_time);
6668: end if;
6669: execute immediate l_stmt;
6670: end if;
6671: if EDW_OWB_COLLECTION_UTIL.drop_table(l_table1)=false then
6672: null;
6673: end if;
6674: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(l_table2,instr(l_table2,'.')+1,
6675: length(l_table2)),substr(l_table2,1,instr(l_table2,'.')-1));

Line 6674: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(l_table2,instr(l_table2,'.')+1,

6670: end if;
6671: if EDW_OWB_COLLECTION_UTIL.drop_table(l_table1)=false then
6672: null;
6673: end if;
6674: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(l_table2,instr(l_table2,'.')+1,
6675: length(l_table2)),substr(l_table2,1,instr(l_table2,'.')-1));
6676: --may need to update the main seq
6677: --g_rownum_for_seq_num is passed for multi threading case
6678: --for single thread this may be null

Line 6680: l_max_pkkey_value:=EDW_OWB_COLLECTION_UTIL.get_max_value(l_table2,g_fstgPKNameKey);

6676: --may need to update the main seq
6677: --g_rownum_for_seq_num is passed for multi threading case
6678: --for single thread this may be null
6679: if g_rownum_for_seq_num is not null then
6680: l_max_pkkey_value:=EDW_OWB_COLLECTION_UTIL.get_max_value(l_table2,g_fstgPKNameKey);
6681: if l_max_pkkey_value>g_rownum_for_seq_num then
6682: g_rownum_for_seq_num:=l_max_pkkey_value;
6683: end if;
6684: end if;

Line 6757: if EDW_OWB_COLLECTION_UTIL.drop_table(g_opcode_table)=false then

6753: g_opcode_stmt:=g_opcode_stmt||' from '||l_opcode_table||','||l_table2||' '||g_FactTableName||' where '||
6754: g_FactTableName||'.row_id='||l_opcode_table||'.rowid';
6755: end if;
6756: end if;--load type
6757: if EDW_OWB_COLLECTION_UTIL.drop_table(g_opcode_table)=false then
6758: null;
6759: end if;
6760: if g_debug then
6761: write_to_log_file_n('Going to execute '||g_opcode_stmt||get_time);

Line 6770: l_max_pkkey_value:=EDW_OWB_COLLECTION_UTIL.get_max_value(g_opcode_table,g_fstgPKNameKey);

6766: write_to_log_file_n('Created '||g_opcode_table||' with '||g_opcode_table_count||' rows '||get_time);
6767: end if;
6768: if g_rownum_for_seq_num is not null then
6769: if l_max_pkkey_value is null then
6770: l_max_pkkey_value:=EDW_OWB_COLLECTION_UTIL.get_max_value(g_opcode_table,g_fstgPKNameKey);
6771: if l_max_pkkey_value>g_rownum_for_seq_num then
6772: g_rownum_for_seq_num:=l_max_pkkey_value;
6773: end if;
6774: end if;

Line 6784: if EDW_OWB_COLLECTION_UTIL.create_sequence(g_pk_key_seq,null,l_max_pkkey_value,'NO FORCE')=false then

6780: end if;
6781: execute immediate l_stmt;
6782: end if;
6783: if l_max_pkkey_value is not null and g_pk_key_seq is not null then
6784: if EDW_OWB_COLLECTION_UTIL.create_sequence(g_pk_key_seq,null,l_max_pkkey_value,'NO FORCE')=false then
6785: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;
6786: return false;
6787: end if;
6788: end if;

Line 6785: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;

6781: execute immediate l_stmt;
6782: end if;
6783: if l_max_pkkey_value is not null and g_pk_key_seq is not null then
6784: if EDW_OWB_COLLECTION_UTIL.create_sequence(g_pk_key_seq,null,l_max_pkkey_value,'NO FORCE')=false then
6785: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;
6786: return false;
6787: end if;
6788: end if;
6789: if EDW_OWB_COLLECTION_UTIL.drop_table(l_table2)=false then

Line 6789: if EDW_OWB_COLLECTION_UTIL.drop_table(l_table2)=false then

6785: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;
6786: return false;
6787: end if;
6788: end if;
6789: if EDW_OWB_COLLECTION_UTIL.drop_table(l_table2)=false then
6790: null;
6791: end if;
6792: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(g_opcode_table,instr(g_opcode_table,'.')+1,
6793: length(g_opcode_table)),substr(g_opcode_table,1,instr(g_opcode_table,'.')-1));

Line 6792: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(g_opcode_table,instr(g_opcode_table,'.')+1,

6788: end if;
6789: if EDW_OWB_COLLECTION_UTIL.drop_table(l_table2)=false then
6790: null;
6791: end if;
6792: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(g_opcode_table,instr(g_opcode_table,'.')+1,
6793: length(g_opcode_table)),substr(g_opcode_table,1,instr(g_opcode_table,'.')-1));
6794: if EDW_OWB_COLLECTION_UTIL.drop_table(l_opcode_table)=false then
6795: null;
6796: end if;

Line 6794: if EDW_OWB_COLLECTION_UTIL.drop_table(l_opcode_table)=false then

6790: null;
6791: end if;
6792: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(g_opcode_table,instr(g_opcode_table,'.')+1,
6793: length(g_opcode_table)),substr(g_opcode_table,1,instr(g_opcode_table,'.')-1));
6794: if EDW_OWB_COLLECTION_UTIL.drop_table(l_opcode_table)=false then
6795: null;
6796: end if;
6797: return true;
6798: Exception when others then

Line 6808: function create_opcode_table(p_cols EDW_OWB_COLLECTION_UTIL.varcharTableType,p_number_cols number)

6804:
6805: /*
6806: for data alignment
6807: */
6808: function create_opcode_table(p_cols EDW_OWB_COLLECTION_UTIL.varcharTableType,p_number_cols number)
6809: return boolean is
6810: l_stmt varchar2(30000);
6811: l_opcode_table varchar2(400);
6812: l_opcode_pk_table varchar2(400);

Line 6814: l_stg_cols EDW_OWB_COLLECTION_UTIL.varcharTableType;

6810: l_stmt varchar2(30000);
6811: l_opcode_table varchar2(400);
6812: l_opcode_pk_table varchar2(400);
6813: l_next_pk varchar2(400);
6814: l_stg_cols EDW_OWB_COLLECTION_UTIL.varcharTableType;
6815: l_index_found boolean;
6816: l_index EDW_OWB_COLLECTION_UTIL.varcharTableType;
6817: l_ind_col EDW_OWB_COLLECTION_UTIL.varcharTableType;
6818: l_ind_col_pos EDW_OWB_COLLECTION_UTIL.numberTableType;

Line 6816: l_index EDW_OWB_COLLECTION_UTIL.varcharTableType;

6812: l_opcode_pk_table varchar2(400);
6813: l_next_pk varchar2(400);
6814: l_stg_cols EDW_OWB_COLLECTION_UTIL.varcharTableType;
6815: l_index_found boolean;
6816: l_index EDW_OWB_COLLECTION_UTIL.varcharTableType;
6817: l_ind_col EDW_OWB_COLLECTION_UTIL.varcharTableType;
6818: l_ind_col_pos EDW_OWB_COLLECTION_UTIL.numberTableType;
6819: l_number_index number;
6820: l_table varchar2(400);

Line 6817: l_ind_col EDW_OWB_COLLECTION_UTIL.varcharTableType;

6813: l_next_pk varchar2(400);
6814: l_stg_cols EDW_OWB_COLLECTION_UTIL.varcharTableType;
6815: l_index_found boolean;
6816: l_index EDW_OWB_COLLECTION_UTIL.varcharTableType;
6817: l_ind_col EDW_OWB_COLLECTION_UTIL.varcharTableType;
6818: l_ind_col_pos EDW_OWB_COLLECTION_UTIL.numberTableType;
6819: l_number_index number;
6820: l_table varchar2(400);
6821: l_table1 varchar2(400);

Line 6818: l_ind_col_pos EDW_OWB_COLLECTION_UTIL.numberTableType;

6814: l_stg_cols EDW_OWB_COLLECTION_UTIL.varcharTableType;
6815: l_index_found boolean;
6816: l_index EDW_OWB_COLLECTION_UTIL.varcharTableType;
6817: l_ind_col EDW_OWB_COLLECTION_UTIL.varcharTableType;
6818: l_ind_col_pos EDW_OWB_COLLECTION_UTIL.numberTableType;
6819: l_number_index number;
6820: l_table varchar2(400);
6821: l_table1 varchar2(400);
6822: l_table11 varchar2(400);

Line 6837: g_fact_count:=EDW_OWB_COLLECTION_UTIL.get_table_count_stats(g_FactTableName,g_table_owner);

6833: l_table1:=l_opcode_table||'1';
6834: l_table11:=l_opcode_table||'11';
6835: l_table_pp:=l_opcode_table||'PP';
6836: l_table2:=l_opcode_table||'2';
6837: g_fact_count:=EDW_OWB_COLLECTION_UTIL.get_table_count_stats(g_FactTableName,g_table_owner);
6838: for i in 1..p_number_cols loop
6839: l_stg_cols(i):=p_cols(i);
6840: for j in 1..g_number_da_cols loop
6841: if p_cols(i)=g_da_cols(j) then

Line 6853: if EDW_OWB_COLLECTION_UTIL.drop_table(l_table)=false then

6849: if g_parallel is not null then
6850: l_stmt:=l_stmt||' parallel (degree '||g_parallel||') ';
6851: end if;
6852: l_stmt:=l_stmt||' as select row_id from '||g_ok_rowid_table||' where status=1';
6853: if EDW_OWB_COLLECTION_UTIL.drop_table(l_table)=false then
6854: null;
6855: end if;
6856: if g_debug then
6857: write_to_log_file_n('Going to execute '||l_stmt||get_time);

Line 6866: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(l_table,instr(l_table,'.')+1,

6862: end if;
6863: if g_debug then
6864: write_to_log_file_n('Created with '||sql%rowcount||' rows '||get_time);
6865: end if;
6866: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(l_table,instr(l_table,'.')+1,
6867: length(l_table)),substr(l_table,1,instr(l_table,'.')-1));
6868: end if;
6869: g_fact_use_nl:=EDW_OWB_COLLECTION_UTIL.get_join_nl(g_number_rows_ready,g_fact_count,g_stg_join_nl_percentage);
6870: l_stmt:='create table '||l_opcode_table||' tablespace '||g_op_table_space;

Line 6869: g_fact_use_nl:=EDW_OWB_COLLECTION_UTIL.get_join_nl(g_number_rows_ready,g_fact_count,g_stg_join_nl_percentage);

6865: end if;
6866: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(l_table,instr(l_table,'.')+1,
6867: length(l_table)),substr(l_table,1,instr(l_table,'.')-1));
6868: end if;
6869: g_fact_use_nl:=EDW_OWB_COLLECTION_UTIL.get_join_nl(g_number_rows_ready,g_fact_count,g_stg_join_nl_percentage);
6870: l_stmt:='create table '||l_opcode_table||' tablespace '||g_op_table_space;
6871: if g_parallel is not null then
6872: l_stmt:=l_stmt||' parallel (degree '||g_parallel||') ';
6873: end if;

Line 6911: if EDW_OWB_COLLECTION_UTIL.drop_table(l_opcode_table)=false then

6907: else
6908: l_stmt:=l_stmt||' from '||l_table||','||g_fstgTableName;
6909: l_stmt:=l_stmt||' where '||l_table||'.row_id='||g_fstgTableName||'.rowid';
6910: end if;
6911: if EDW_OWB_COLLECTION_UTIL.drop_table(l_opcode_table)=false then
6912: null;
6913: end if;
6914: if g_debug then
6915: write_to_log_file_n('Going to execute '||l_stmt||get_time);

Line 6921: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(l_opcode_table,instr(l_opcode_table,'.')+1,

6917: execute immediate l_stmt;
6918: if g_debug then
6919: write_to_log_file_n('Created '||l_opcode_table||' with '||sql%rowcount||' rows '||get_time);
6920: end if;
6921: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(l_opcode_table,instr(l_opcode_table,'.')+1,
6922: length(l_opcode_table)),substr(l_opcode_table,1,instr(l_opcode_table,'.')-1));
6923: if EDW_OWB_COLLECTION_UTIL.drop_table(l_table)=false then
6924: null;
6925: end if;

Line 6923: if EDW_OWB_COLLECTION_UTIL.drop_table(l_table)=false then

6919: write_to_log_file_n('Created '||l_opcode_table||' with '||sql%rowcount||' rows '||get_time);
6920: end if;
6921: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(l_opcode_table,instr(l_opcode_table,'.')+1,
6922: length(l_opcode_table)),substr(l_opcode_table,1,instr(l_opcode_table,'.')-1));
6923: if EDW_OWB_COLLECTION_UTIL.drop_table(l_table)=false then
6924: null;
6925: end if;
6926: if g_pk_key_seq is null then
6927: l_next_pk:=l_opcode_table||'.'||g_fstgPKNameKey;

Line 6957: if EDW_OWB_COLLECTION_UTIL.drop_table(l_table11)=false then

6953: for i in 1..p_number_cols loop
6954: l_stmt:=l_stmt||l_opcode_table||'.'||p_cols(i)||'='||l_table||'.'||p_cols(i)||'(+) and ';
6955: end loop;
6956: l_stmt:=substr(l_stmt,1,length(l_stmt)-4);
6957: if EDW_OWB_COLLECTION_UTIL.drop_table(l_table11)=false then
6958: null;
6959: end if;
6960: if g_debug then
6961: write_to_log_file_n('Going to execute '||l_stmt||get_time);

Line 6978: if EDW_OWB_COLLECTION_UTIL.drop_table(l_table_pp)=false then

6974: l_stmt:=l_stmt||' /*+PARALLEL(PP,'||g_parallel||')*/ ';
6975: end if;
6976: l_stmt:=l_stmt||'A.rowid row_id,A.'||g_fstgPKName||' pk,B.pk_key from '||l_opcode_table||' A,'||
6977: g_pp_table||' B where A.'||g_fstgPKName||'=B.pk';
6978: if EDW_OWB_COLLECTION_UTIL.drop_table(l_table_pp)=false then
6979: null;
6980: end if;
6981: if g_debug then
6982: write_to_log_file_n('Going to execute '||l_stmt||get_time);

Line 6995: if EDW_OWB_COLLECTION_UTIL.drop_table(l_table1)=false then

6991: end if;
6992: l_stmt:=l_stmt||' as select A.row_id,A.'||g_factPKName||' '||g_factPKName||'1, '||
6993: 'decode(A.'||g_factPKNameKey||',null,B.pk_key,A.'||g_factPKNameKey||') '||g_factPKNameKey||' ,'||
6994: 'A.row_id2 from '||l_table11||' A,'||l_table_pp||' B where A.row_id=B.row_id(+)';
6995: if EDW_OWB_COLLECTION_UTIL.drop_table(l_table1)=false then
6996: null;
6997: end if;
6998: if g_debug then
6999: write_to_log_file_n('Going to execute '||l_stmt||get_time);

Line 7005: if EDW_OWB_COLLECTION_UTIL.drop_table(l_table11)=false then

7001: execute immediate l_stmt;
7002: if g_debug then
7003: write_to_log_file_n('Created with '||sql%rowcount||' rows '||get_time);
7004: end if;
7005: if EDW_OWB_COLLECTION_UTIL.drop_table(l_table11)=false then
7006: null;
7007: end if;
7008: if EDW_OWB_COLLECTION_UTIL.drop_table(l_table_pp)=false then
7009: null;

Line 7008: if EDW_OWB_COLLECTION_UTIL.drop_table(l_table_pp)=false then

7004: end if;
7005: if EDW_OWB_COLLECTION_UTIL.drop_table(l_table11)=false then
7006: null;
7007: end if;
7008: if EDW_OWB_COLLECTION_UTIL.drop_table(l_table_pp)=false then
7009: null;
7010: end if;
7011: l_stmt:='create table '||l_table2||' tablespace '||g_op_table_space;
7012: if g_rownum_for_seq_num is not null and g_parallel is not null then

Line 7018: if EDW_OWB_COLLECTION_UTIL.drop_table(l_table2)=false then

7014: end if;
7015: l_stmt:=l_stmt||' as select row_id,'||g_factPKName||'1,'||
7016: 'decode('||g_factPKNameKey||',null,'||l_next_pk||','||g_factPKNameKey||') '||g_factPKNameKey||
7017: ',row_id2 from '||l_table1;
7018: if EDW_OWB_COLLECTION_UTIL.drop_table(l_table2)=false then
7019: null;
7020: end if;
7021: if g_debug then
7022: write_to_log_file_n('Going to execute '||l_stmt||get_time);

Line 7035: if EDW_OWB_COLLECTION_UTIL.drop_table(l_table1)=false then

7031: write_to_log_file_n('Going to execute '||l_stmt||get_time);
7032: end if;
7033: execute immediate l_stmt;
7034: end if;
7035: if EDW_OWB_COLLECTION_UTIL.drop_table(l_table1)=false then
7036: null;
7037: end if;
7038: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(l_table2,instr(l_table2,'.')+1,
7039: length(l_table2)),substr(l_table2,1,instr(l_table2,'.')-1));

Line 7038: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(l_table2,instr(l_table2,'.')+1,

7034: end if;
7035: if EDW_OWB_COLLECTION_UTIL.drop_table(l_table1)=false then
7036: null;
7037: end if;
7038: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(l_table2,instr(l_table2,'.')+1,
7039: length(l_table2)),substr(l_table2,1,instr(l_table2,'.')-1));
7040: if g_rownum_for_seq_num is not null then
7041: l_max_pkkey_value:=EDW_OWB_COLLECTION_UTIL.get_max_value(l_table2,g_factPKNameKey);
7042: if l_max_pkkey_value>g_rownum_for_seq_num then

Line 7041: l_max_pkkey_value:=EDW_OWB_COLLECTION_UTIL.get_max_value(l_table2,g_factPKNameKey);

7037: end if;
7038: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(l_table2,instr(l_table2,'.')+1,
7039: length(l_table2)),substr(l_table2,1,instr(l_table2,'.')-1));
7040: if g_rownum_for_seq_num is not null then
7041: l_max_pkkey_value:=EDW_OWB_COLLECTION_UTIL.get_max_value(l_table2,g_factPKNameKey);
7042: if l_max_pkkey_value>g_rownum_for_seq_num then
7043: g_rownum_for_seq_num:=l_max_pkkey_value;
7044: end if;
7045: if l_max_pkkey_value is not null and g_pk_key_seq is not null then

Line 7046: if EDW_OWB_COLLECTION_UTIL.create_sequence(g_pk_key_seq,null,l_max_pkkey_value,'NO FORCE')=false then

7042: if l_max_pkkey_value>g_rownum_for_seq_num then
7043: g_rownum_for_seq_num:=l_max_pkkey_value;
7044: end if;
7045: if l_max_pkkey_value is not null and g_pk_key_seq is not null then
7046: if EDW_OWB_COLLECTION_UTIL.create_sequence(g_pk_key_seq,null,l_max_pkkey_value,'NO FORCE')=false then
7047: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;
7048: return false;
7049: end if;
7050: end if;

Line 7047: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;

7043: g_rownum_for_seq_num:=l_max_pkkey_value;
7044: end if;
7045: if l_max_pkkey_value is not null and g_pk_key_seq is not null then
7046: if EDW_OWB_COLLECTION_UTIL.create_sequence(g_pk_key_seq,null,l_max_pkkey_value,'NO FORCE')=false then
7047: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;
7048: return false;
7049: end if;
7050: end if;
7051: end if;

Line 7078: if EDW_OWB_COLLECTION_UTIL.drop_table(l_opcode_pk_table)=false then

7074: l_stmt:=l_stmt||'decode('||l_table||'.row_id2,null,'||l_opcode_table||'.'||g_fstgPKName||','||
7075: l_table||'.'||g_factPKName||'1) '||g_factPKName||'1,'||l_table||'.'||g_factPKNameKey||' '||g_factPKNameKey||
7076: ','||l_table||'.row_id2 row_id2 from '||l_opcode_table||','||l_table2||' '||l_table||' where ';
7077: l_stmt:=l_stmt||l_table||'.row_id='||l_opcode_table||'.rowid';
7078: if EDW_OWB_COLLECTION_UTIL.drop_table(l_opcode_pk_table)=false then
7079: null;
7080: end if;
7081: if g_debug then
7082: write_to_log_file_n('Going to execute '||l_stmt||get_time);

Line 7088: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(l_opcode_pk_table,instr(l_opcode_pk_table,'.')+1,

7084: execute immediate l_stmt;
7085: if g_debug then
7086: write_to_log_file_n('Created '||l_opcode_pk_table||get_time);
7087: end if;
7088: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(l_opcode_pk_table,instr(l_opcode_pk_table,'.')+1,
7089: length(l_opcode_pk_table)),substr(l_opcode_pk_table,1,instr(l_opcode_pk_table,'.')-1));
7090: if EDW_OWB_COLLECTION_UTIL.drop_table(l_table2)=false then
7091: null;
7092: end if;

Line 7090: if EDW_OWB_COLLECTION_UTIL.drop_table(l_table2)=false then

7086: write_to_log_file_n('Created '||l_opcode_pk_table||get_time);
7087: end if;
7088: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(l_opcode_pk_table,instr(l_opcode_pk_table,'.')+1,
7089: length(l_opcode_pk_table)),substr(l_opcode_pk_table,1,instr(l_opcode_pk_table,'.')-1));
7090: if EDW_OWB_COLLECTION_UTIL.drop_table(l_table2)=false then
7091: null;
7092: end if;
7093: --the pk_key is decided by joining to the da table and not target table
7094: --but op code needs to look at the target table

Line 7096: if EDW_OWB_COLLECTION_UTIL.get_table_index_col(g_FactTableName,g_table_owner,l_index,l_ind_col,

7092: end if;
7093: --the pk_key is decided by joining to the da table and not target table
7094: --but op code needs to look at the target table
7095: l_index_found:=false;
7096: if EDW_OWB_COLLECTION_UTIL.get_table_index_col(g_FactTableName,g_table_owner,l_index,l_ind_col,
7097: l_ind_col_pos,l_number_index)=true then
7098: for i in 1..l_number_index loop
7099: if l_ind_col(i)=g_factPKName then
7100: if l_ind_col_pos(i)=1 then

Line 7133: if EDW_OWB_COLLECTION_UTIL.drop_table(g_opcode_table)=false then

7129: l_stmt:=l_stmt||','||g_FactTableName||'.CREATION_DATE CREATION_DATE';
7130: end if;
7131: l_stmt:=l_stmt||' from '||l_opcode_pk_table||','||g_FactTableName||' where '||
7132: g_FactTableName||'.'||g_factPKNameKey||'(+)='||l_opcode_pk_table||'.'||g_factPKNameKey;
7133: if EDW_OWB_COLLECTION_UTIL.drop_table(g_opcode_table)=false then
7134: null;
7135: end if;
7136: if g_debug then
7137: write_to_log_file_n('Going to execute '||l_stmt||get_time);

Line 7144: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(g_opcode_table,instr(g_opcode_table,'.')+1,

7140: g_opcode_table_count:=sql%rowcount;
7141: if g_debug then
7142: write_to_log_file_n('Created '||g_opcode_table||' with '||g_opcode_table_count||' rows '||get_time);
7143: end if;
7144: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(g_opcode_table,instr(g_opcode_table,'.')+1,
7145: length(g_opcode_table)),substr(g_opcode_table,1,instr(g_opcode_table,'.')-1));
7146: if sync_da_pp_tables(l_opcode_pk_table)=false then
7147: return false;
7148: end if;

Line 7149: if EDW_OWB_COLLECTION_UTIL.drop_table(l_opcode_table)=false then

7145: length(g_opcode_table)),substr(g_opcode_table,1,instr(g_opcode_table,'.')-1));
7146: if sync_da_pp_tables(l_opcode_pk_table)=false then
7147: return false;
7148: end if;
7149: if EDW_OWB_COLLECTION_UTIL.drop_table(l_opcode_table)=false then
7150: null;
7151: end if;
7152: if EDW_OWB_COLLECTION_UTIL.drop_table(l_opcode_pk_table)=false then
7153: null;

Line 7152: if EDW_OWB_COLLECTION_UTIL.drop_table(l_opcode_pk_table)=false then

7148: end if;
7149: if EDW_OWB_COLLECTION_UTIL.drop_table(l_opcode_table)=false then
7150: null;
7151: end if;
7152: if EDW_OWB_COLLECTION_UTIL.drop_table(l_opcode_pk_table)=false then
7153: null;
7154: end if;
7155: return true;
7156: Exception when others then

Line 7189: EDW_OWB_COLLECTION_UTIL.set_rollback(g_rollback);

7185: l_stmt:='update '||g_ok_rowid_table||' set status=2 where status=1';
7186: if g_debug then
7187: write_to_log_file_n('Going to execute '||l_stmt||get_time);
7188: end if;
7189: EDW_OWB_COLLECTION_UTIL.set_rollback(g_rollback);
7190: execute immediate l_stmt;
7191: if g_debug then
7192: write_to_log_file_n('Updated '||sql%rowcount||' rows from status 1 to 2'||get_time);
7193: end if;

Line 7250: if EDW_OWB_COLLECTION_UTIL.drop_table(g_plan_table)=false then

7246: Begin
7247: if g_debug then
7248: write_to_log_file_n('In generate_explain_plan'||get_time);
7249: end if;
7250: if EDW_OWB_COLLECTION_UTIL.drop_table(g_plan_table)=false then
7251: null;
7252: end if;
7253: if create_plan_table = false then
7254: write_to_log_file_n('could not create '||g_plan_table);

Line 7300: if EDW_OWB_COLLECTION_UTIL.value_in_table(g_slow_change_tables,

7296: g_number_fts_tables:=0;
7297: for i in 1..g_number_exp_plan loop
7298: if g_exp_object_name(i) <> g_fstgTableName then
7299: if g_exp_operation(i)='TABLE ACCESS' and g_exp_options(i)='FULL' and g_exp_cardinality(i) > 1000 then
7300: if EDW_OWB_COLLECTION_UTIL.value_in_table(g_slow_change_tables,
7301: g_num_slow_change_tables,g_exp_object_name(i))=false then
7302: if EDW_OWB_COLLECTION_UTIL.value_in_table(g_fts_tables,
7303: g_number_fts_tables,g_exp_object_name(i))=false then
7304: g_number_fts_tables:=g_number_fts_tables+1;

Line 7302: if EDW_OWB_COLLECTION_UTIL.value_in_table(g_fts_tables,

7298: if g_exp_object_name(i) <> g_fstgTableName then
7299: if g_exp_operation(i)='TABLE ACCESS' and g_exp_options(i)='FULL' and g_exp_cardinality(i) > 1000 then
7300: if EDW_OWB_COLLECTION_UTIL.value_in_table(g_slow_change_tables,
7301: g_num_slow_change_tables,g_exp_object_name(i))=false then
7302: if EDW_OWB_COLLECTION_UTIL.value_in_table(g_fts_tables,
7303: g_number_fts_tables,g_exp_object_name(i))=false then
7304: g_number_fts_tables:=g_number_fts_tables+1;
7305: g_fts_tables(g_number_fts_tables):=g_exp_object_name(i);
7306: end if;

Line 7334: l_kl_list_name EDW_OWB_COLLECTION_UTIL.varcharTableType;

7330: contains only the keys that are to be looked up
7331: */
7332: function generate_fts_lookups return boolean is
7333: l_stmt varchar2(20000);
7334: l_kl_list_name EDW_OWB_COLLECTION_UTIL.varcharTableType;
7335: l_i_index EDW_OWB_COLLECTION_UTIL.numberTableType;
7336: l_ok EDW_OWB_COLLECTION_UTIL.booleanTableType;
7337: Begin
7338: for i in 1..g_number_fts_tables loop

Line 7335: l_i_index EDW_OWB_COLLECTION_UTIL.numberTableType;

7331: */
7332: function generate_fts_lookups return boolean is
7333: l_stmt varchar2(20000);
7334: l_kl_list_name EDW_OWB_COLLECTION_UTIL.varcharTableType;
7335: l_i_index EDW_OWB_COLLECTION_UTIL.numberTableType;
7336: l_ok EDW_OWB_COLLECTION_UTIL.booleanTableType;
7337: Begin
7338: for i in 1..g_number_fts_tables loop
7339: l_kl_list_name(i):=g_bis_owner||'.FTS_'||g_primary_target||'_'||g_job_id||'_DL'||i;

Line 7336: l_ok EDW_OWB_COLLECTION_UTIL.booleanTableType;

7332: function generate_fts_lookups return boolean is
7333: l_stmt varchar2(20000);
7334: l_kl_list_name EDW_OWB_COLLECTION_UTIL.varcharTableType;
7335: l_i_index EDW_OWB_COLLECTION_UTIL.numberTableType;
7336: l_ok EDW_OWB_COLLECTION_UTIL.booleanTableType;
7337: Begin
7338: for i in 1..g_number_fts_tables loop
7339: l_kl_list_name(i):=g_bis_owner||'.FTS_'||g_primary_target||'_'||g_job_id||'_DL'||i;
7340: end loop;

Line 7357: if EDW_OWB_COLLECTION_UTIL.create_dim_key_lookup(g_fts_tables(i),g_dimUserPKName(l_i_index(i)),

7353: g_dimUserPKName(l_i_index(i))||'('||g_dimActualPKName(l_i_index(i))||')');
7354: end loop;
7355: end if;
7356: for i in 1..g_number_fts_tables loop
7357: if EDW_OWB_COLLECTION_UTIL.create_dim_key_lookup(g_fts_tables(i),g_dimUserPKName(l_i_index(i)),
7358: g_dimActualPKName(l_i_index(i)),l_kl_list_name(i),g_parallel,null,g_op_table_space) = false then
7359: write_to_log_file_n('EDW_OWB_COLLECTION_UTIL.create_dim_key_lookup failed for '||g_fts_tables(i));
7360: l_ok(i):=false;
7361: else

Line 7359: write_to_log_file_n('EDW_OWB_COLLECTION_UTIL.create_dim_key_lookup failed for '||g_fts_tables(i));

7355: end if;
7356: for i in 1..g_number_fts_tables loop
7357: if EDW_OWB_COLLECTION_UTIL.create_dim_key_lookup(g_fts_tables(i),g_dimUserPKName(l_i_index(i)),
7358: g_dimActualPKName(l_i_index(i)),l_kl_list_name(i),g_parallel,null,g_op_table_space) = false then
7359: write_to_log_file_n('EDW_OWB_COLLECTION_UTIL.create_dim_key_lookup failed for '||g_fts_tables(i));
7360: l_ok(i):=false;
7361: else
7362: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(l_kl_list_name(i),instr(l_kl_list_name(i),'.')+1,
7363: length(l_kl_list_name(i))),substr(l_kl_list_name(i),1,instr(l_kl_list_name(i),'.')-1));

Line 7362: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(l_kl_list_name(i),instr(l_kl_list_name(i),'.')+1,

7358: g_dimActualPKName(l_i_index(i)),l_kl_list_name(i),g_parallel,null,g_op_table_space) = false then
7359: write_to_log_file_n('EDW_OWB_COLLECTION_UTIL.create_dim_key_lookup failed for '||g_fts_tables(i));
7360: l_ok(i):=false;
7361: else
7362: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(l_kl_list_name(i),instr(l_kl_list_name(i),'.')+1,
7363: length(l_kl_list_name(i))),substr(l_kl_list_name(i),1,instr(l_kl_list_name(i),'.')-1));
7364: l_ok(i):=true;
7365: write_to_log_file_n('Lookup '||l_kl_list_name(i)||' generated for '||g_fts_tables(i));
7366: end if;

Line 7394: l_alias EDW_OWB_COLLECTION_UTIL.varcharTableType;

7390: l_end number;
7391: l_found boolean;
7392: l_user_fk_table varchar2(400);--to improve perf
7393: l_user_fk_table_flag boolean;
7394: l_alias EDW_OWB_COLLECTION_UTIL.varcharTableType;
7395: l_pk EDW_OWB_COLLECTION_UTIL.varcharTableType;
7396: l_pk_key EDW_OWB_COLLECTION_UTIL.varcharTableType;
7397: l_owner varchar2(200);
7398: l_index_found boolean:=false;

Line 7395: l_pk EDW_OWB_COLLECTION_UTIL.varcharTableType;

7391: l_found boolean;
7392: l_user_fk_table varchar2(400);--to improve perf
7393: l_user_fk_table_flag boolean;
7394: l_alias EDW_OWB_COLLECTION_UTIL.varcharTableType;
7395: l_pk EDW_OWB_COLLECTION_UTIL.varcharTableType;
7396: l_pk_key EDW_OWB_COLLECTION_UTIL.varcharTableType;
7397: l_owner varchar2(200);
7398: l_index_found boolean:=false;
7399: l_index number;

Line 7396: l_pk_key EDW_OWB_COLLECTION_UTIL.varcharTableType;

7392: l_user_fk_table varchar2(400);--to improve perf
7393: l_user_fk_table_flag boolean;
7394: l_alias EDW_OWB_COLLECTION_UTIL.varcharTableType;
7395: l_pk EDW_OWB_COLLECTION_UTIL.varcharTableType;
7396: l_pk_key EDW_OWB_COLLECTION_UTIL.varcharTableType;
7397: l_owner varchar2(200);
7398: l_index_found boolean:=false;
7399: l_index number;
7400: l_ind_col EDW_OWB_COLLECTION_UTIL.varcharTableType;

Line 7400: l_ind_col EDW_OWB_COLLECTION_UTIL.varcharTableType;

7396: l_pk_key EDW_OWB_COLLECTION_UTIL.varcharTableType;
7397: l_owner varchar2(200);
7398: l_index_found boolean:=false;
7399: l_index number;
7400: l_ind_col EDW_OWB_COLLECTION_UTIL.varcharTableType;
7401: l_ind_col_pos EDW_OWB_COLLECTION_UTIL.numberTableType;
7402: l_number_index number;
7403: l_nl EDW_OWB_COLLECTION_UTIL.booleanTableType;
7404: l_in_stmt varchar2(20000);

Line 7401: l_ind_col_pos EDW_OWB_COLLECTION_UTIL.numberTableType;

7397: l_owner varchar2(200);
7398: l_index_found boolean:=false;
7399: l_index number;
7400: l_ind_col EDW_OWB_COLLECTION_UTIL.varcharTableType;
7401: l_ind_col_pos EDW_OWB_COLLECTION_UTIL.numberTableType;
7402: l_number_index number;
7403: l_nl EDW_OWB_COLLECTION_UTIL.booleanTableType;
7404: l_in_stmt varchar2(20000);
7405: TYPE CurTyp IS REF CURSOR;

Line 7403: l_nl EDW_OWB_COLLECTION_UTIL.booleanTableType;

7399: l_index number;
7400: l_ind_col EDW_OWB_COLLECTION_UTIL.varcharTableType;
7401: l_ind_col_pos EDW_OWB_COLLECTION_UTIL.numberTableType;
7402: l_number_index number;
7403: l_nl EDW_OWB_COLLECTION_UTIL.booleanTableType;
7404: l_in_stmt varchar2(20000);
7405: TYPE CurTyp IS REF CURSOR;
7406: cv CurTyp;
7407: l_number number;

Line 7408: l_test_mode_fk EDW_OWB_COLLECTION_UTIL.booleanTableType;

7404: l_in_stmt varchar2(20000);
7405: TYPE CurTyp IS REF CURSOR;
7406: cv CurTyp;
7407: l_number number;
7408: l_test_mode_fk EDW_OWB_COLLECTION_UTIL.booleanTableType;
7409: l_pk1 varchar2(200);
7410: l_pk2 varchar2(200);
7411: l_table varchar2(200);
7412: l_auto_dang_flag EDW_OWB_COLLECTION_UTIL.booleanTableType;

Line 7412: l_auto_dang_flag EDW_OWB_COLLECTION_UTIL.booleanTableType;

7408: l_test_mode_fk EDW_OWB_COLLECTION_UTIL.booleanTableType;
7409: l_pk1 varchar2(200);
7410: l_pk2 varchar2(200);
7411: l_table varchar2(200);
7412: l_auto_dang_flag EDW_OWB_COLLECTION_UTIL.booleanTableType;
7413: l_dang_instance EDW_OWB_COLLECTION_UTIL.varcharTableType;
7414: l_number_dang_instance number;
7415: l_dang_table varchar2(200);
7416: l_new_surr_table varchar2(200);

Line 7413: l_dang_instance EDW_OWB_COLLECTION_UTIL.varcharTableType;

7409: l_pk1 varchar2(200);
7410: l_pk2 varchar2(200);
7411: l_table varchar2(200);
7412: l_auto_dang_flag EDW_OWB_COLLECTION_UTIL.booleanTableType;
7413: l_dang_instance EDW_OWB_COLLECTION_UTIL.varcharTableType;
7414: l_number_dang_instance number;
7415: l_dang_table varchar2(200);
7416: l_new_surr_table varchar2(200);
7417: l_opcode_update_table varchar2(200);

Line 7420: l_dim_pk_pkkey_index EDW_OWB_COLLECTION_UTIL.booleanTableType;

7416: l_new_surr_table varchar2(200);
7417: l_opcode_update_table varchar2(200);
7418: l_slow_check_flag boolean;
7419: l_surr_table_name varchar2(80);
7420: l_dim_pk_pkkey_index EDW_OWB_COLLECTION_UTIL.booleanTableType;
7421: --------------------------------------------------------------------------------
7422: l_dim_looked_at EDW_OWB_COLLECTION_UTIL.varcharTableType;
7423: l_dim_looked_at_nl EDW_OWB_COLLECTION_UTIL.booleanTableType;
7424: l_dim_looked_at_auto EDW_OWB_COLLECTION_UTIL.booleanTableType;

Line 7422: l_dim_looked_at EDW_OWB_COLLECTION_UTIL.varcharTableType;

7418: l_slow_check_flag boolean;
7419: l_surr_table_name varchar2(80);
7420: l_dim_pk_pkkey_index EDW_OWB_COLLECTION_UTIL.booleanTableType;
7421: --------------------------------------------------------------------------------
7422: l_dim_looked_at EDW_OWB_COLLECTION_UTIL.varcharTableType;
7423: l_dim_looked_at_nl EDW_OWB_COLLECTION_UTIL.booleanTableType;
7424: l_dim_looked_at_auto EDW_OWB_COLLECTION_UTIL.booleanTableType;
7425: l_number_dim_looked_at number;
7426: l_in_nl boolean;

Line 7423: l_dim_looked_at_nl EDW_OWB_COLLECTION_UTIL.booleanTableType;

7419: l_surr_table_name varchar2(80);
7420: l_dim_pk_pkkey_index EDW_OWB_COLLECTION_UTIL.booleanTableType;
7421: --------------------------------------------------------------------------------
7422: l_dim_looked_at EDW_OWB_COLLECTION_UTIL.varcharTableType;
7423: l_dim_looked_at_nl EDW_OWB_COLLECTION_UTIL.booleanTableType;
7424: l_dim_looked_at_auto EDW_OWB_COLLECTION_UTIL.booleanTableType;
7425: l_number_dim_looked_at number;
7426: l_in_nl boolean;
7427: l_in_hash boolean;

Line 7424: l_dim_looked_at_auto EDW_OWB_COLLECTION_UTIL.booleanTableType;

7420: l_dim_pk_pkkey_index EDW_OWB_COLLECTION_UTIL.booleanTableType;
7421: --------------------------------------------------------------------------------
7422: l_dim_looked_at EDW_OWB_COLLECTION_UTIL.varcharTableType;
7423: l_dim_looked_at_nl EDW_OWB_COLLECTION_UTIL.booleanTableType;
7424: l_dim_looked_at_auto EDW_OWB_COLLECTION_UTIL.booleanTableType;
7425: l_number_dim_looked_at number;
7426: l_in_nl boolean;
7427: l_in_hash boolean;
7428: l_prev number;

Line 7433: l_dim_row_count EDW_OWB_COLLECTION_UTIL.numberTableType;

7429: l_this number;
7430: l_next number;
7431: --------------------------------------------------------------------------------
7432: l_number_dim_row_count number;
7433: l_dim_row_count EDW_OWB_COLLECTION_UTIL.numberTableType;
7434: l_fk_dim_table EDW_OWB_COLLECTION_UTIL.varcharTableType;
7435: --------------------------------------------------------------------------------
7436: Begin
7437: if g_debug then

Line 7434: l_fk_dim_table EDW_OWB_COLLECTION_UTIL.varcharTableType;

7430: l_next number;
7431: --------------------------------------------------------------------------------
7432: l_number_dim_row_count number;
7433: l_dim_row_count EDW_OWB_COLLECTION_UTIL.numberTableType;
7434: l_fk_dim_table EDW_OWB_COLLECTION_UTIL.varcharTableType;
7435: --------------------------------------------------------------------------------
7436: Begin
7437: if g_debug then
7438: write_to_log_file_n('In create_surr_tables'||get_time);

Line 7447: if EDW_OWB_COLLECTION_UTIL.drop_table(l_opcode_update_table)=false then

7443: if g_parallel is not null then
7444: l_stmt:=l_stmt||' parallel (degree '||g_parallel||') ';
7445: end if;
7446: l_stmt:=l_stmt||' as select row_id, row_id1 from '||g_opcode_table||' where operation_code=1';
7447: if EDW_OWB_COLLECTION_UTIL.drop_table(l_opcode_update_table)=false then
7448: null;
7449: end if;
7450: if g_debug then
7451: write_to_log_file_n(l_stmt||get_time);

Line 7500: if edw_owb_collection_util.value_in_table(l_fk_dim_table,l_number_dim_row_count,

7496: l_number_dim_row_count:=0;
7497: --store the dim counts
7498: --get the dim row count from all_tables
7499: for i in 1..g_numberOfDimTables loop
7500: if edw_owb_collection_util.value_in_table(l_fk_dim_table,l_number_dim_row_count,
7501: g_dimTableName(i))=false then
7502: l_number_dim_row_count:=l_number_dim_row_count+1;
7503: l_dim_row_count(l_number_dim_row_count):=g_dim_row_count(i);
7504: l_fk_dim_table(l_number_dim_row_count):=g_dimTableName(i);

Line 7518: l_dim_out EDW_OWB_COLLECTION_UTIL.varcharTableType;

7514: end loop;
7515: end if;
7516: if g_object_type='FACT' then
7517: declare
7518: l_dim_out EDW_OWB_COLLECTION_UTIL.varcharTableType;
7519: l_level_table EDW_OWB_COLLECTION_UTIL.varcharTableType;
7520: l_level_table_id EDW_OWB_COLLECTION_UTIL.numberTableType;
7521: l_number_dim_out number;
7522: l_index_in_table number;

Line 7519: l_level_table EDW_OWB_COLLECTION_UTIL.varcharTableType;

7515: end if;
7516: if g_object_type='FACT' then
7517: declare
7518: l_dim_out EDW_OWB_COLLECTION_UTIL.varcharTableType;
7519: l_level_table EDW_OWB_COLLECTION_UTIL.varcharTableType;
7520: l_level_table_id EDW_OWB_COLLECTION_UTIL.numberTableType;
7521: l_number_dim_out number;
7522: l_index_in_table number;
7523: begin

Line 7520: l_level_table_id EDW_OWB_COLLECTION_UTIL.numberTableType;

7516: if g_object_type='FACT' then
7517: declare
7518: l_dim_out EDW_OWB_COLLECTION_UTIL.varcharTableType;
7519: l_level_table EDW_OWB_COLLECTION_UTIL.varcharTableType;
7520: l_level_table_id EDW_OWB_COLLECTION_UTIL.numberTableType;
7521: l_number_dim_out number;
7522: l_index_in_table number;
7523: begin
7524: l_in_stmt:=null;

Line 7531: if EDW_OWB_COLLECTION_UTIL.get_all_lowest_level_tables(l_in_stmt,l_dim_out,l_level_table,l_level_table_id,

7527: l_in_stmt:=l_in_stmt||''''||g_dimTableName(i)||''',';
7528: end if;
7529: end loop;
7530: l_in_stmt:=substr(l_in_stmt,1,length(l_in_stmt)-1);
7531: if EDW_OWB_COLLECTION_UTIL.get_all_lowest_level_tables(l_in_stmt,l_dim_out,l_level_table,l_level_table_id,
7532: l_number_dim_out)=false then
7533: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;
7534: g_status:=false;
7535: return false;

Line 7533: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;

7529: end loop;
7530: l_in_stmt:=substr(l_in_stmt,1,length(l_in_stmt)-1);
7531: if EDW_OWB_COLLECTION_UTIL.get_all_lowest_level_tables(l_in_stmt,l_dim_out,l_level_table,l_level_table_id,
7532: l_number_dim_out)=false then
7533: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;
7534: g_status:=false;
7535: return false;
7536: end if;
7537: for i in 1..g_numberOfDimTables loop

Line 7538: l_index_in_table:=EDW_OWB_COLLECTION_UTIL.index_in_table(l_dim_out,l_number_dim_out,g_dimTableName(i));

7534: g_status:=false;
7535: return false;
7536: end if;
7537: for i in 1..g_numberOfDimTables loop
7538: l_index_in_table:=EDW_OWB_COLLECTION_UTIL.index_in_table(l_dim_out,l_number_dim_out,g_dimTableName(i));
7539: if l_index_in_table>0 then
7540: g_dim_lowest_ltc_id(i):=l_level_table_id(l_index_in_table);
7541: g_dim_lowest_ltc(i):=l_level_table(l_index_in_table);
7542: else

Line 7567: if EDW_OWB_COLLECTION_UTIL.value_in_table(g_fks_dang_load,g_number_fks_dang_load,

7563: end if;
7564: for i in 1..g_numberOfDimTables loop
7565: l_test_mode_fk(i):=false;
7566: if g_fstg_fk_direct_load(i)=false and g_fstg_fk_value_load(i)=false then
7567: if EDW_OWB_COLLECTION_UTIL.value_in_table(g_fks_dang_load,g_number_fks_dang_load,
7568: g_factFKName(i)) then
7569: l_test_mode_fk(i):=true;
7570: end if;
7571: end if;

Line 7581: l_index:=EDW_OWB_COLLECTION_UTIL.index_in_table(l_dim_looked_at,l_number_dim_looked_at,g_dimTableName(i));

7577: for i in 1..g_numberOfDimTables loop
7578: l_nl(i):=false;
7579: l_auto_dang_flag(i):=false;
7580: if g_fstg_fk_direct_load(i)=false and g_fstg_fk_value_load(i)=false then
7581: l_index:=EDW_OWB_COLLECTION_UTIL.index_in_table(l_dim_looked_at,l_number_dim_looked_at,g_dimTableName(i));
7582: if l_index>0 then
7583: --l_index:=EDW_OWB_COLLECTION_UTIL.index_in_table(g_dimTableName,g_numberOfDimTables,g_dimTableName(i));
7584: l_nl(i):=l_dim_looked_at_nl(l_index);
7585: l_auto_dang_flag(i):=l_dim_looked_at_auto(l_index);

Line 7583: --l_index:=EDW_OWB_COLLECTION_UTIL.index_in_table(g_dimTableName,g_numberOfDimTables,g_dimTableName(i));

7579: l_auto_dang_flag(i):=false;
7580: if g_fstg_fk_direct_load(i)=false and g_fstg_fk_value_load(i)=false then
7581: l_index:=EDW_OWB_COLLECTION_UTIL.index_in_table(l_dim_looked_at,l_number_dim_looked_at,g_dimTableName(i));
7582: if l_index>0 then
7583: --l_index:=EDW_OWB_COLLECTION_UTIL.index_in_table(g_dimTableName,g_numberOfDimTables,g_dimTableName(i));
7584: l_nl(i):=l_dim_looked_at_nl(l_index);
7585: l_auto_dang_flag(i):=l_dim_looked_at_auto(l_index);
7586: else
7587: if g_debug then

Line 7600: l_number:=EDW_OWB_COLLECTION_UTIL.index_in_table(l_fk_dim_table,l_number_dim_row_count,

7596: else
7597: l_pk1:=g_dimUserPKName(i);
7598: l_pk2:=g_dimActualPKName(i);
7599: end if;
7600: l_number:=EDW_OWB_COLLECTION_UTIL.index_in_table(l_fk_dim_table,l_number_dim_row_count,
7601: l_table);
7602: --l_index_found:=true;
7603: l_index_found:=false;
7604: if l_number>0 then

Line 7606: l_index_found:=EDW_OWB_COLLECTION_UTIL.get_join_nl(g_user_fk_table_count,l_dim_row_count(l_number),

7602: --l_index_found:=true;
7603: l_index_found:=false;
7604: if l_number>0 then
7605: if l_dim_row_count(l_number)>0 then --and l_dim_row_count(l_number) 7606: l_index_found:=EDW_OWB_COLLECTION_UTIL.get_join_nl(g_user_fk_table_count,l_dim_row_count(l_number),
7607: g_stg_join_nl_percentage);
7608: end if;
7609: end if;
7610: if l_index_found then

Line 7614: l_dim_pk_pkkey_index(l_number):=EDW_OWB_COLLECTION_UTIL.check_pk_pkkey_index(l_table,

7610: if l_index_found then
7611: l_number_index:=0;
7612: l_index_found:=false;
7613: if l_dim_pk_pkkey_index(l_number) is null then
7614: l_dim_pk_pkkey_index(l_number):=EDW_OWB_COLLECTION_UTIL.check_pk_pkkey_index(l_table,
7615: null,l_pk1,l_pk2);
7616: end if;
7617: if l_dim_pk_pkkey_index(l_number)=true then
7618: l_index_found:=true;

Line 7629: l_auto_dang_flag(i):=EDW_OWB_COLLECTION_UTIL.is_auto_dang_implemented(g_dimTableName(i));

7625: end if;
7626: end if;
7627: --check for auto dang recovery
7628: if g_object_type='FACT' then
7629: l_auto_dang_flag(i):=EDW_OWB_COLLECTION_UTIL.is_auto_dang_implemented(g_dimTableName(i));
7630: end if;
7631: l_dim_looked_at_nl(l_number_dim_looked_at):=l_nl(i);
7632: l_dim_looked_at_auto(l_number_dim_looked_at):=l_auto_dang_flag(i);
7633: end if;

Line 7698: if EDW_OWB_COLLECTION_UTIL.drop_table(g_surr_tables(g_number_surr_tables))=false then

7694: end loop;
7695: if l_found then
7696: g_number_surr_tables :=g_number_surr_tables+1;
7697: g_surr_tables(g_number_surr_tables):=g_surr_table||g_number_surr_tables;
7698: if EDW_OWB_COLLECTION_UTIL.drop_table(g_surr_tables(g_number_surr_tables))=false then
7699: null;
7700: end if;
7701: --create l_user_fk_table for data alignment with slowly changing dimension
7702: --this table is created because when there is slow change, the dim pk_key are

Line 7718: if EDW_OWB_COLLECTION_UTIL.drop_table(l_user_fk_table)=false then

7714: if l_user_fk_table_flag then
7715: if g_debug then
7716: write_to_log_file_n('Found fk with data alignment and slow change');
7717: end if;
7718: if EDW_OWB_COLLECTION_UTIL.drop_table(l_user_fk_table)=false then
7719: null;
7720: end if;
7721: /*
7722: we need to create l_user_fk_table because PK_KEY in PP table will not contain the

Line 7794: if EDW_OWB_COLLECTION_UTIL.drop_table(l_user_fk_table)=false then

7790: end if;
7791: end if;
7792: end loop;
7793: l_stmt:=substr(l_stmt,1,length(l_stmt)-4);
7794: if EDW_OWB_COLLECTION_UTIL.drop_table(l_user_fk_table)=false then
7795: null;
7796: end if;
7797: if g_debug then
7798: write_to_log_file_n('Going to execute '||l_stmt||get_time);

Line 7811: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(l_user_fk_table,instr(l_user_fk_table,'.')+1,

7807: end;
7808: if g_debug then
7809: write_to_log_file_n('Created '||l_user_fk_table||' with '||sql%rowcount||' rows '||get_time);
7810: end if;
7811: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(l_user_fk_table,instr(l_user_fk_table,'.')+1,
7812: length(l_user_fk_table)),substr(l_user_fk_table,1,instr(l_user_fk_table,'.')-1));
7813: end if;--if l_user_fk_table_flag then
7814: end if;--if l_user_fk_table is not null then
7815: l_slow_check_flag:=false;

Line 7827: if EDW_OWB_COLLECTION_UTIL.drop_table(l_surr_table_name)=false then

7823: l_surr_table_name:=g_surr_tables(g_number_surr_tables)||'S';
7824: else
7825: l_surr_table_name:=g_surr_tables(g_number_surr_tables);
7826: end if;
7827: if EDW_OWB_COLLECTION_UTIL.drop_table(l_surr_table_name)=false then
7828: null;
7829: end if;
7830: l_stmt:='create table '||l_surr_table_name||' tablespace '||g_op_table_space;
7831: if g_parallel is not null then

Line 7947: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(l_table,instr(l_table,'.')+1,length(l_table)),

7943: then we have joined to the dim table. when joining to dim table, we can get duplicates
7944: due to slow change. so we need MAX
7945: */
7946: l_table:=l_surr_table_name;
7947: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(l_table,instr(l_table,'.')+1,length(l_table)),
7948: substr(l_table,1,instr(l_table,'.')-1));
7949: l_stmt:='create table '||g_surr_tables(g_number_surr_tables)||' tablespace '||g_op_table_space;
7950: if g_parallel is not null then
7951: l_stmt:=l_stmt||' parallel (degree '||g_parallel||') ';

Line 7990: if EDW_OWB_COLLECTION_UTIL.check_table(l_table)=false then

7986: if g_check_fk_change and g_object_type='DIMENSION' then
7987: for i in l_start..l_end loop
7988: l_table:=g_bis_owner||'.LTFC_'||g_primary_target||'_'||g_dimTableId(i);--this is a marker table
7989: l_table1:=l_table||'_'||g_job_id||'_T';
7990: if EDW_OWB_COLLECTION_UTIL.check_table(l_table)=false then
7991: l_stmt:='create table '||l_table1||' tablespace '||g_op_table_space;
7992: if g_parallel is not null then
7993: l_stmt:=l_stmt||' parallel (degree '||g_parallel||') ';
7994: end if;

Line 7997: if EDW_OWB_COLLECTION_UTIL.drop_table(l_table1)=false then

7993: l_stmt:=l_stmt||' parallel (degree '||g_parallel||') ';
7994: end if;
7995: l_stmt:=l_stmt||' as select b.row_id1,a.'||g_fstgActualFKName(i)||' from '||
7996: l_opcode_update_table||' b,'||g_surr_tables(g_number_surr_tables)||' a where a.row_id=b.row_id';
7997: if EDW_OWB_COLLECTION_UTIL.drop_table(l_table1)=false then
7998: null;
7999: end if;
8000: if g_debug then
8001: write_to_log_file_n(l_stmt||get_time);

Line 8007: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(l_table1,instr(l_table1,'.')+1,

8003: execute immediate l_stmt;
8004: if g_debug then
8005: write_to_log_file_n('created with '||sql%rowcount||' rows '||get_time);
8006: end if;
8007: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(l_table1,instr(l_table1,'.')+1,
8008: length(l_table1)),substr(l_table1,1,instr(l_table1,'.')-1));
8009: l_stmt:='select /*+ordered ';
8010: if g_fact_use_nl then
8011: l_stmt:=l_stmt||' use_nl(B) ';

Line 8043: if EDW_OWB_COLLECTION_UTIL.drop_table(l_table1)=false then

8039: end if;
8040: end if;
8041: end;
8042: end if;
8043: if EDW_OWB_COLLECTION_UTIL.drop_table(l_table1)=false then
8044: null;
8045: end if;
8046: end if;
8047: end loop;

Line 8126: if EDW_OWB_COLLECTION_UTIL.drop_table(l_new_surr_table)=false then

8122: if g_debug then
8123: write_to_log_file_n('Inserted '||sql%rowcount||' rows '||get_time);
8124: end if;
8125: commit;
8126: if EDW_OWB_COLLECTION_UTIL.drop_table(l_new_surr_table)=false then
8127: null;
8128: end if;
8129: end if;
8130: exception when others then

Line 8137: if EDW_OWB_COLLECTION_UTIL.drop_table(l_dang_table)=false then

8133: g_status:=false;
8134: return false;
8135: end;
8136: end if;
8137: if EDW_OWB_COLLECTION_UTIL.drop_table(l_dang_table)=false then
8138: null;
8139: end if;
8140: else
8141: if g_debug then

Line 8156: --EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(g_surr_tables(g_number_surr_tables),

8152: end if;
8153: end if;
8154: end loop;
8155: end if;--if g_log_dang_keys then
8156: --EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(g_surr_tables(g_number_surr_tables),
8157: --instr(g_surr_tables(g_number_surr_tables),'.')+1,length(g_surr_tables(g_number_surr_tables))),
8158: --substr(g_surr_tables(g_number_surr_tables),1,instr(g_surr_tables(g_number_surr_tables),'.')-1));
8159: end if;--if l_found then
8160: l_start:=l_end+1;

Line 8165: if EDW_OWB_COLLECTION_UTIL.drop_table(l_user_fk_table)=false then

8161: if l_start>g_numberOfDimTables then
8162: exit;
8163: end if;
8164: end loop;--loop
8165: if EDW_OWB_COLLECTION_UTIL.drop_table(l_user_fk_table)=false then
8166: null;
8167: end if;
8168: if EDW_OWB_COLLECTION_UTIL.drop_table(l_opcode_update_table)=false then
8169: null;

Line 8168: if EDW_OWB_COLLECTION_UTIL.drop_table(l_opcode_update_table)=false then

8164: end loop;--loop
8165: if EDW_OWB_COLLECTION_UTIL.drop_table(l_user_fk_table)=false then
8166: null;
8167: end if;
8168: if EDW_OWB_COLLECTION_UTIL.drop_table(l_opcode_update_table)=false then
8169: null;
8170: end if;
8171: return true;
8172: Exception when others then

Line 8187: if EDW_OWB_COLLECTION_UTIL.drop_table(g_surr_table)=false then

8183: Begin
8184: if g_debug then
8185: write_to_log_file_n('In create_main_surr_table'||get_time);
8186: end if;
8187: if EDW_OWB_COLLECTION_UTIL.drop_table(g_surr_table)=false then
8188: null;
8189: end if;
8190: g_surr_count:=0;
8191: if g_user_fk_table<>g_fstgTableName then

Line 8192: if EDW_OWB_COLLECTION_UTIL.drop_table(g_user_fk_table)=false then

8188: null;
8189: end if;
8190: g_surr_count:=0;
8191: if g_user_fk_table<>g_fstgTableName then
8192: if EDW_OWB_COLLECTION_UTIL.drop_table(g_user_fk_table)=false then
8193: null;
8194: end if;
8195: end if;
8196: l_stmt:='create table '||g_surr_table||' tablespace '||g_op_table_space;

Line 8249: if EDW_OWB_COLLECTION_UTIL.drop_table(g_surr_tables(i))=false then

8245: write_to_log_file_n('Created '||g_surr_table||' with '||g_surr_count||' rows');
8246: write_to_log_file('Time='||get_time);
8247: end if;
8248: for i in 1..g_number_surr_tables loop
8249: if EDW_OWB_COLLECTION_UTIL.drop_table(g_surr_tables(i))=false then
8250: null;
8251: end if;
8252: end loop;
8253: return true;

Line 8267: l_index_table EDW_OWB_COLLECTION_UTIL.varcharTableType;

8263: LHJM stands for low hash join memory
8264: */
8265: function create_main_surr_table_LHJM return boolean is
8266: l_stmt varchar2(32000);
8267: l_index_table EDW_OWB_COLLECTION_UTIL.varcharTableType;
8268: l_number_index_table number;
8269: l_index_table_copy EDW_OWB_COLLECTION_UTIL.varcharTableType;
8270: l_number_index_table_copy number;
8271: l_start number;

Line 8269: l_index_table_copy EDW_OWB_COLLECTION_UTIL.varcharTableType;

8265: function create_main_surr_table_LHJM return boolean is
8266: l_stmt varchar2(32000);
8267: l_index_table EDW_OWB_COLLECTION_UTIL.varcharTableType;
8268: l_number_index_table number;
8269: l_index_table_copy EDW_OWB_COLLECTION_UTIL.varcharTableType;
8270: l_number_index_table_copy number;
8271: l_start number;
8272: l_end number;
8273: l_max_count number;

Line 8275: l_columns EDW_OWB_COLLECTION_UTIL.varcharTableType;

8271: l_start number;
8272: l_end number;
8273: l_max_count number;
8274: l_table varchar2(200);
8275: l_columns EDW_OWB_COLLECTION_UTIL.varcharTableType;
8276: l_number_columns number;
8277: l_tables_at_a_time number;
8278: Begin
8279: l_tables_at_a_time:=g_key_set;

Line 8283: if EDW_OWB_COLLECTION_UTIL.drop_table(g_surr_table)=false then

8279: l_tables_at_a_time:=g_key_set;
8280: if g_debug then
8281: write_to_log_file_n('In create_main_surr_table_LHJM'||get_time);
8282: end if;
8283: if EDW_OWB_COLLECTION_UTIL.drop_table(g_surr_table)=false then
8284: null;
8285: end if;
8286: l_number_index_table:=0;
8287: g_surr_count:=0;

Line 8323: if EDW_OWB_COLLECTION_UTIL.get_db_columns_for_table(substr(l_index_table_copy(i),

8319: end if;
8320: l_stmt:=l_stmt||' ';
8321: l_stmt:=l_stmt||' as select ';
8322: for i in l_start..l_end loop
8323: if EDW_OWB_COLLECTION_UTIL.get_db_columns_for_table(substr(l_index_table_copy(i),
8324: instr(l_index_table_copy(i),'.')+1,length(l_index_table_copy(i))),l_columns,l_number_columns,
8325: g_bis_owner)=false then
8326: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;
8327: write_to_log_file_n(g_status_message);

Line 8326: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;

8322: for i in l_start..l_end loop
8323: if EDW_OWB_COLLECTION_UTIL.get_db_columns_for_table(substr(l_index_table_copy(i),
8324: instr(l_index_table_copy(i),'.')+1,length(l_index_table_copy(i))),l_columns,l_number_columns,
8325: g_bis_owner)=false then
8326: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;
8327: write_to_log_file_n(g_status_message);
8328: g_status:=false;
8329: return false;
8330: end if;

Line 8347: if EDW_OWB_COLLECTION_UTIL.drop_table(l_table)=false then

8343: for i in l_start..(l_end-1) loop
8344: l_stmt:=l_stmt||l_index_table_copy(i)||'.ROW_ID='||l_index_table_copy(i+1)||'.ROW_ID and ';
8345: end loop;
8346: l_stmt:=substr(l_stmt,1,length(l_stmt)-4);
8347: if EDW_OWB_COLLECTION_UTIL.drop_table(l_table)=false then
8348: null;
8349: end if;
8350: if g_debug then
8351: write_to_log_file_n('Going to execute '||l_stmt||get_time);

Line 8366: if EDW_OWB_COLLECTION_UTIL.drop_table(l_index_table_copy(i))=false then

8362: return false;
8363: end ;
8364: --drop the tables
8365: for i in l_start..l_end loop
8366: if EDW_OWB_COLLECTION_UTIL.drop_table(l_index_table_copy(i))=false then
8367: null;
8368: end if;
8369: end loop;
8370: l_start:=l_end+1;

Line 8383: if EDW_OWB_COLLECTION_UTIL.get_db_columns_for_table(substr(l_index_table(i),

8379: end if;
8380: l_stmt:=l_stmt||' ';
8381: l_stmt:=l_stmt||' as select ';
8382: for i in 1..l_number_index_table loop
8383: if EDW_OWB_COLLECTION_UTIL.get_db_columns_for_table(substr(l_index_table(i),
8384: instr(l_index_table(i),'.')+1,length(l_index_table(i))),l_columns,l_number_columns,
8385: g_bis_owner)=false then
8386: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;
8387: write_to_log_file_n(g_status_message);

Line 8386: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;

8382: for i in 1..l_number_index_table loop
8383: if EDW_OWB_COLLECTION_UTIL.get_db_columns_for_table(substr(l_index_table(i),
8384: instr(l_index_table(i),'.')+1,length(l_index_table(i))),l_columns,l_number_columns,
8385: g_bis_owner)=false then
8386: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;
8387: write_to_log_file_n(g_status_message);
8388: g_status:=false;
8389: return false;
8390: end if;

Line 8438: if EDW_OWB_COLLECTION_UTIL.drop_table(l_index_table(i))=false then

8434: if g_debug then
8435: write_to_log_file_n('Created '||g_surr_table||' with '||g_surr_count||' rows'||get_time);
8436: end if;
8437: for i in 1..l_number_index_table loop
8438: if EDW_OWB_COLLECTION_UTIL.drop_table(l_index_table(i))=false then
8439: null;
8440: end if;
8441: end loop;
8442: return true;

Line 8461: if EDW_OWB_COLLECTION_UTIL.drop_table(g_user_fk_table)=false then

8457: --g_user_fk_table
8458: if g_debug then
8459: write_to_log_file_n('In create_user_fk_table'||get_time);
8460: end if;
8461: if EDW_OWB_COLLECTION_UTIL.drop_table(g_user_fk_table)=false then
8462: null;
8463: end if;
8464: if g_fstg_all_fk_direct_load then
8465: l_stmt:='create table '||g_user_fk_table||' tablespace '||g_op_table_space;

Line 8494: if EDW_OWB_COLLECTION_UTIL.value_in_table(g_fstgUserFKName,g_numberOfDimTables,g_instance_column)=false then

8490: l_stmt:=l_stmt||g_fstgTableName||'.'||g_fstgUserFKName(i)||',';
8491: end if;
8492: end loop;
8493: if g_instance_column is not null then
8494: if EDW_OWB_COLLECTION_UTIL.value_in_table(g_fstgUserFKName,g_numberOfDimTables,g_instance_column)=false then
8495: l_stmt:=l_stmt||g_fstgTableName||'.'||g_instance_column||',';
8496: end if;
8497: end if;
8498: if g_stg_copy_table_flag then

Line 8525: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(g_user_fk_table,

8521: if g_debug then
8522: write_to_log_file_n('Created '||g_user_fk_table||' with '||g_user_fk_table_count||' rows');
8523: write_to_log_file('Time='||get_time);
8524: end if;
8525: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(g_user_fk_table,
8526: instr(g_user_fk_table,'.')+1,length(g_user_fk_table)),
8527: substr(g_user_fk_table,1,instr(g_user_fk_table,'.')-1));
8528: return true;
8529: Exception when others then

Line 8588: for performance we donr want to use EDW_OWB_COLLECTION_UTIL.does_table_have_data

8584: return false;
8585: End;
8586:
8587: /*
8588: for performance we donr want to use EDW_OWB_COLLECTION_UTIL.does_table_have_data
8589: */
8590: function check_fk_for_data(p_fk varchar2) return number is
8591: l_stmt varchar2(4000);
8592: l_fk_value number;

Line 8658: g_status_message:=EDW_OWB_COLLECTION_UTIL.get_message('EDW_PK_INDEX_NOT_FOUND');

8654: exit;
8655: end if;
8656: end loop;
8657: if l_pk_index is null then
8658: g_status_message:=EDW_OWB_COLLECTION_UTIL.get_message('EDW_PK_INDEX_NOT_FOUND');
8659: write_to_log_file_n(g_status_message);
8660: g_status:=false;
8661: return false;
8662: end if;

Line 8688: if EDW_OWB_COLLECTION_UTIL.check_table(g_fa_rec_log)=true then

8684: Begin
8685: if g_debug then
8686: write_to_log_file_n('In insert_fa_fact_insert'||get_time);
8687: end if;
8688: if EDW_OWB_COLLECTION_UTIL.check_table(g_fa_rec_log)=true then
8689: write_to_log_file_n(g_fa_rec_log||' table found. No need to execute this procedure');
8690: return true;
8691: end if;
8692: if g_parallel is null then

Line 8732: EDW_OWB_COLLECTION_UTIL.set_rollback(g_rollback);

8728: if g_debug then
8729: write_to_log_file_n('Going to execute '||l_stmt||get_time);
8730: end if;
8731: begin
8732: EDW_OWB_COLLECTION_UTIL.set_rollback(g_rollback);
8733: execute immediate l_stmt;
8734: if g_debug then
8735: write_to_log_file_n('Inserted '||sql%rowcount||' rows into '||g_fact_audit_name||get_time);
8736: end if;

Line 8752: if EDW_OWB_COLLECTION_UTIL.drop_table(g_fa_ilog)=false then

8748: if g_debug then
8749: write_to_log_file_n('Going to execute '||l_stmt1);
8750: end if;
8751: execute immediate l_stmt1;
8752: if EDW_OWB_COLLECTION_UTIL.drop_table(g_fa_ilog)=false then
8753: null;
8754: end if;
8755: return true;
8756: Exception when others then

Line 8777: if EDW_OWB_COLLECTION_UTIL.check_table(g_fa_rec_up_log)=true then

8773: */
8774: if g_debug then
8775: write_to_log_file_n('In insert_fa_fact_update'||get_time);
8776: end if;
8777: if EDW_OWB_COLLECTION_UTIL.check_table(g_fa_rec_up_log)=true then
8778: write_to_log_file_n(g_fa_rec_up_log||' table found. No need to execute this procedure');
8779: return true;
8780: end if;
8781: l_ilog:=g_fa_ilog||'1';

Line 8804: if EDW_OWB_COLLECTION_UTIL.drop_table(l_ilog)=false then

8800: if g_debug then
8801: write_to_log_file_n('Going to execute '||l_stmt||get_time);
8802: end if;
8803: begin
8804: if EDW_OWB_COLLECTION_UTIL.drop_table(l_ilog)=false then
8805: null;
8806: end if;
8807: execute immediate l_stmt;
8808: if g_debug then

Line 8828: if EDW_OWB_COLLECTION_UTIL.drop_table(g_fa_ilog)=false then

8824: if g_debug then
8825: write_to_log_file_n('Going to execute '||l_stmt||get_time);
8826: end if;
8827: begin
8828: if EDW_OWB_COLLECTION_UTIL.drop_table(g_fa_ilog)=false then
8829: null;
8830: end if;
8831: execute immediate l_stmt;
8832: if g_debug then

Line 8841: if EDW_OWB_COLLECTION_UTIL.drop_table(l_ilog)=false then

8837: write_to_log_file_n(g_status_message);
8838: g_status:=false;
8839: return false;
8840: end ;
8841: if EDW_OWB_COLLECTION_UTIL.drop_table(l_ilog)=false then
8842: null;
8843: end if;
8844: if g_parallel is null then
8845: l_stmt:='insert into '||g_fact_audit_name;

Line 8878: EDW_OWB_COLLECTION_UTIL.set_rollback(g_rollback);

8874: if g_debug then
8875: write_to_log_file_n('Going to execute '||l_stmt||get_time);
8876: end if;
8877: begin
8878: EDW_OWB_COLLECTION_UTIL.set_rollback(g_rollback);
8879: execute immediate l_stmt;
8880: if g_debug then
8881: write_to_log_file_n('Inserted '||sql%rowcount||' rows into '||g_fact_audit_name||get_time);
8882: end if;

Line 8898: if EDW_OWB_COLLECTION_UTIL.drop_table(g_fa_ilog)=false then

8894: if g_debug then
8895: write_to_log_file_n('Going to execute '||l_stmt1);
8896: end if;
8897: execute immediate l_stmt1;
8898: if EDW_OWB_COLLECTION_UTIL.drop_table(g_fa_ilog)=false then
8899: null;
8900: end if;
8901: return true;
8902: Exception when others then

Line 8919: if EDW_OWB_COLLECTION_UTIL.check_table(g_nc_rec_log)=true then

8915: Begin
8916: if g_debug then
8917: write_to_log_file_n('In insert_nc_fact_insert'||get_time);
8918: end if;
8919: if EDW_OWB_COLLECTION_UTIL.check_table(g_nc_rec_log)=true then
8920: write_to_log_file_n(g_nc_rec_log||' table found. No need to execute this procedure');
8921: return true;
8922: end if;
8923: if g_parallel is null then

Line 8963: EDW_OWB_COLLECTION_UTIL.set_rollback(g_rollback);

8959: if g_debug then
8960: write_to_log_file_n('Going to execute '||l_stmt||get_time);
8961: end if;
8962: begin
8963: EDW_OWB_COLLECTION_UTIL.set_rollback(g_rollback);
8964: execute immediate l_stmt;
8965: if g_debug then
8966: write_to_log_file_n('Inserted '||sql%rowcount||' rows into '||g_fact_net_change_name||get_time);
8967: end if;

Line 8983: if EDW_OWB_COLLECTION_UTIL.drop_table(g_nc_ilog)=false then

8979: if g_debug then
8980: write_to_log_file_n('Going to execute '||l_stmt1);
8981: end if;
8982: execute immediate l_stmt1;
8983: if EDW_OWB_COLLECTION_UTIL.drop_table(g_nc_ilog)=false then
8984: null;
8985: end if;
8986: return true;
8987: Exception when others then

Line 9008: if EDW_OWB_COLLECTION_UTIL.check_table(g_nc_rec_up_log)=true then

9004: */
9005: if g_debug then
9006: write_to_log_file_n('In insert_nc_fact_update'||get_time);
9007: end if;
9008: if EDW_OWB_COLLECTION_UTIL.check_table(g_nc_rec_up_log)=true then
9009: write_to_log_file_n(g_nc_rec_up_log||' table found. No need to execute this procedure');
9010: return true;
9011: end if;
9012: l_ilog:=g_nc_ilog||'1';

Line 9036: if EDW_OWB_COLLECTION_UTIL.drop_table(l_ilog)=false then

9032: if g_debug then
9033: write_to_log_file_n('Going to execute '||l_stmt||get_time);
9034: end if;
9035: begin
9036: if EDW_OWB_COLLECTION_UTIL.drop_table(l_ilog)=false then
9037: null;
9038: end if;
9039: execute immediate l_stmt;
9040: if g_debug then

Line 9060: if EDW_OWB_COLLECTION_UTIL.drop_table(g_nc_ilog)=false then

9056: if g_debug then
9057: write_to_log_file_n('Going to execute '||l_stmt||get_time);
9058: end if;
9059: begin
9060: if EDW_OWB_COLLECTION_UTIL.drop_table(g_nc_ilog)=false then
9061: null;
9062: end if;
9063: execute immediate l_stmt;
9064: if g_debug then

Line 9073: if EDW_OWB_COLLECTION_UTIL.drop_table(l_ilog)=false then

9069: write_to_log_file_n(g_status_message);
9070: g_status:=false;
9071: return false;
9072: end ;
9073: if EDW_OWB_COLLECTION_UTIL.drop_table(l_ilog)=false then
9074: null;
9075: end if;
9076: if g_parallel is null then
9077: l_stmt:='insert into '||g_fact_net_change_name;

Line 9102: if EDW_OWB_COLLECTION_UTIL.value_in_table(g_factFKName,g_numberOfDimTables,g_item_net_change_all(i)) then

9098: if g_parallel is not null then
9099: l_stmt:=l_stmt||' /*+PARALLEL('||g_factTableName||','||g_parallel||')*/ ';
9100: end if;
9101: for i in 1..g_item_net_change_number_all loop
9102: if EDW_OWB_COLLECTION_UTIL.value_in_table(g_factFKName,g_numberOfDimTables,g_item_net_change_all(i)) then
9103: l_stmt:=l_stmt||g_hold_table||'.'||g_item_net_change_all(i)||',';
9104: else
9105: if g_item_net_change_all(i) <> g_factPKNameKey and g_item_net_change_all(i) <> g_factPKName then
9106: l_stmt:=l_stmt||g_hold_table||'.'||g_item_net_change_all(i)||'-'||

Line 9126: EDW_OWB_COLLECTION_UTIL.set_rollback(g_rollback);

9122: if g_debug then
9123: write_to_log_file_n('Going to execute '||l_stmt||get_time);
9124: end if;
9125: begin
9126: EDW_OWB_COLLECTION_UTIL.set_rollback(g_rollback);
9127: execute immediate l_stmt;
9128: if g_debug then
9129: write_to_log_file_n('Inserted '||sql%rowcount||' rows into '||g_fact_net_change_name||get_time);
9130: end if;

Line 9146: if EDW_OWB_COLLECTION_UTIL.drop_table(g_nc_ilog)=false then

9142: if g_debug then
9143: write_to_log_file_n('Going to execute '||l_stmt1);
9144: end if;
9145: execute immediate l_stmt1;
9146: if EDW_OWB_COLLECTION_UTIL.drop_table(g_nc_ilog)=false then
9147: null;
9148: end if;
9149: return true;
9150: Exception when others then

Line 9160: if EDW_OWB_COLLECTION_UTIL.drop_table(g_fa_rec_log)=false then

9156:
9157: function drop_fa_nc_rec_tables return boolean is
9158: Begin
9159: if g_fact_audit then
9160: if EDW_OWB_COLLECTION_UTIL.drop_table(g_fa_rec_log)=false then
9161: null;
9162: end if;
9163: if EDW_OWB_COLLECTION_UTIL.drop_table(g_fa_rec_up_log)=false then
9164: null;

Line 9163: if EDW_OWB_COLLECTION_UTIL.drop_table(g_fa_rec_up_log)=false then

9159: if g_fact_audit then
9160: if EDW_OWB_COLLECTION_UTIL.drop_table(g_fa_rec_log)=false then
9161: null;
9162: end if;
9163: if EDW_OWB_COLLECTION_UTIL.drop_table(g_fa_rec_up_log)=false then
9164: null;
9165: end if;
9166: end if;
9167: if g_fact_net_change then

Line 9168: if EDW_OWB_COLLECTION_UTIL.drop_table(g_nc_rec_log)=false then

9164: null;
9165: end if;
9166: end if;
9167: if g_fact_net_change then
9168: if EDW_OWB_COLLECTION_UTIL.drop_table(g_nc_rec_log)=false then
9169: null;
9170: end if;
9171: if EDW_OWB_COLLECTION_UTIL.drop_table(g_nc_rec_up_log)=false then
9172: null;

Line 9171: if EDW_OWB_COLLECTION_UTIL.drop_table(g_nc_rec_up_log)=false then

9167: if g_fact_net_change then
9168: if EDW_OWB_COLLECTION_UTIL.drop_table(g_nc_rec_log)=false then
9169: null;
9170: end if;
9171: if EDW_OWB_COLLECTION_UTIL.drop_table(g_nc_rec_up_log)=false then
9172: null;
9173: end if;
9174: end if;
9175: return true;

Line 9201: EDW_OWB_COLLECTION_UTIL.insert_into_load_progress(p_load_fk,p_object_name,g_primary_target,p_load_progress,

9197:
9198: procedure insert_into_load_progress(p_load_fk number,p_object_name varchar2,p_load_progress varchar2,
9199: p_start_date date,p_end_date date,p_category varchar2, p_operation varchar2,p_seq_id varchar2,p_flag varchar2) is
9200: Begin
9201: EDW_OWB_COLLECTION_UTIL.insert_into_load_progress(p_load_fk,p_object_name,g_primary_target,p_load_progress,
9202: p_start_date,p_end_date,p_category,p_operation,p_seq_id,p_flag,g_primary_target);
9203: commit;
9204: Exception when others then
9205: g_status_message:=sqlerrm;

Line 9214: EDW_OWB_COLLECTION_UTIL.insert_into_load_progress(p_load_fk,p_object_name,g_primary_target,p_load_progress,

9210: procedure insert_into_load_progress_d(p_load_fk number,p_object_name varchar2,p_load_progress varchar2,
9211: p_start_date date,p_end_date date,p_category varchar2, p_operation varchar2,p_seq_id varchar2,p_flag varchar2) is
9212: Begin
9213: if g_debug then
9214: EDW_OWB_COLLECTION_UTIL.insert_into_load_progress(p_load_fk,p_object_name,g_primary_target,p_load_progress,
9215: p_start_date,p_end_date,p_category,p_operation,p_seq_id,p_flag,g_primary_target);
9216: commit;
9217: end if;
9218: Exception when others then

Line 9234: l_date:=EDW_OWB_COLLECTION_UTIL.last_analyzed_date(g_primary_target_name,g_table_owner);

9230: l_fact_net_change varchar2(20);
9231: l_job_id number;
9232: ---
9233: Begin
9234: l_date:=EDW_OWB_COLLECTION_UTIL.last_analyzed_date(g_primary_target_name,g_table_owner);
9235: if g_debug then
9236: write_to_log_file_n('Last analyzed date for '||g_primary_target_name||' '||
9237: to_char(l_date,'MM-DD-YYYY HH24:MI:SS'));
9238: end if;

Line 9328: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(p_primary_target_name,p_table_owner,1);

9324: g_primary_target_name:=p_primary_target_name;
9325: g_table_owner:=p_table_owner;
9326: insert_into_load_progress_d(p_load_pk,p_primary_target_name,'Analyze '||p_primary_target_name,sysdate,null,
9327: 'MAPPING','ANALYZE','ANFT','I');
9328: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(p_primary_target_name,p_table_owner,1);
9329: insert_into_load_progress_d(p_load_pk,null,null,null,sysdate,null,null,'ANFT','U');
9330: if p_fact_audit='Y' then
9331: insert_into_load_progress_d(p_load_pk,p_primary_target_name,'Analyze '||p_fact_audit_name,sysdate,null,
9332: 'MAPPING','ANALYZE','ANFA','I');

Line 9333: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(p_fact_audit_name, p_table_owner,1);

9329: insert_into_load_progress_d(p_load_pk,null,null,null,sysdate,null,null,'ANFT','U');
9330: if p_fact_audit='Y' then
9331: insert_into_load_progress_d(p_load_pk,p_primary_target_name,'Analyze '||p_fact_audit_name,sysdate,null,
9332: 'MAPPING','ANALYZE','ANFA','I');
9333: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(p_fact_audit_name, p_table_owner,1);
9334: insert_into_load_progress_d(p_load_pk,null,null,null,sysdate,null,null,'ANFA','U');
9335: end if;
9336: if p_fact_net_change='Y' then
9337: insert_into_load_progress_d(p_load_pk,p_primary_target_name,'Analyze '||p_fact_net_change_name,sysdate,null,

Line 9339: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(p_fact_net_change_name,p_table_owner,1);

9335: end if;
9336: if p_fact_net_change='Y' then
9337: insert_into_load_progress_d(p_load_pk,p_primary_target_name,'Analyze '||p_fact_net_change_name,sysdate,null,
9338: 'MAPPING','ANALYZE','ANFN','I');
9339: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(p_fact_net_change_name,p_table_owner,1);
9340: insert_into_load_progress_d(p_load_pk,null,null,null,sysdate,null,null,'ANFN','U');
9341: end if;
9342: if p_number_da_cols > 0 then
9343: declare

Line 9346: l_owner:=EDW_OWB_COLLECTION_UTIL.get_table_owner(p_da_table);

9342: if p_number_da_cols > 0 then
9343: declare
9344: l_owner varchar2(400);
9345: begin
9346: l_owner:=EDW_OWB_COLLECTION_UTIL.get_table_owner(p_da_table);
9347: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(p_da_table,instr(p_da_table,'.')+1,
9348: length(p_da_table)),l_owner,1);
9349: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(p_pp_table,instr(p_pp_table,'.')+1,
9350: length(p_pp_table)),l_owner,1);

Line 9347: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(p_da_table,instr(p_da_table,'.')+1,

9343: declare
9344: l_owner varchar2(400);
9345: begin
9346: l_owner:=EDW_OWB_COLLECTION_UTIL.get_table_owner(p_da_table);
9347: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(p_da_table,instr(p_da_table,'.')+1,
9348: length(p_da_table)),l_owner,1);
9349: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(p_pp_table,instr(p_pp_table,'.')+1,
9350: length(p_pp_table)),l_owner,1);
9351: end;

Line 9349: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(p_pp_table,instr(p_pp_table,'.')+1,

9345: begin
9346: l_owner:=EDW_OWB_COLLECTION_UTIL.get_table_owner(p_da_table);
9347: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(p_da_table,instr(p_da_table,'.')+1,
9348: length(p_da_table)),l_owner,1);
9349: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(p_pp_table,instr(p_pp_table,'.')+1,
9350: length(p_pp_table)),l_owner,1);
9351: end;
9352: end if;
9353: Exception when others then

Line 9376: l_da_table_found:=EDW_OWB_COLLECTION_UTIL.check_table(g_da_table);

9372: Begin
9373: if g_debug then
9374: write_to_log_file_n('In create_da_pp_tables');
9375: end if;
9376: l_da_table_found:=EDW_OWB_COLLECTION_UTIL.check_table(g_da_table);
9377: l_pp_table_found:=EDW_OWB_COLLECTION_UTIL.check_table(g_pp_table);
9378: if l_da_table_found and l_pp_table_found then
9379: return true;
9380: end if;

Line 9377: l_pp_table_found:=EDW_OWB_COLLECTION_UTIL.check_table(g_pp_table);

9373: if g_debug then
9374: write_to_log_file_n('In create_da_pp_tables');
9375: end if;
9376: l_da_table_found:=EDW_OWB_COLLECTION_UTIL.check_table(g_da_table);
9377: l_pp_table_found:=EDW_OWB_COLLECTION_UTIL.check_table(g_pp_table);
9378: if l_da_table_found and l_pp_table_found then
9379: return true;
9380: end if;
9381: if EDW_OWB_COLLECTION_UTIL.get_table_storage(g_primary_target_name,g_table_owner,l_table_space,

Line 9381: if EDW_OWB_COLLECTION_UTIL.get_table_storage(g_primary_target_name,g_table_owner,l_table_space,

9377: l_pp_table_found:=EDW_OWB_COLLECTION_UTIL.check_table(g_pp_table);
9378: if l_da_table_found and l_pp_table_found then
9379: return true;
9380: end if;
9381: if EDW_OWB_COLLECTION_UTIL.get_table_storage(g_primary_target_name,g_table_owner,l_table_space,
9382: l_initial_extent,l_next_extent,l_pct_free,l_pct_used,l_pct_increase,l_max_extents,l_avg_row_len)=false then
9383: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;
9384: g_status:=false;
9385: return false;

Line 9383: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;

9379: return true;
9380: end if;
9381: if EDW_OWB_COLLECTION_UTIL.get_table_storage(g_primary_target_name,g_table_owner,l_table_space,
9382: l_initial_extent,l_next_extent,l_pct_free,l_pct_used,l_pct_increase,l_max_extents,l_avg_row_len)=false then
9383: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;
9384: g_status:=false;
9385: return false;
9386: end if;
9387: l_next_extent:=nvl(l_next_extent,8388608);--8M

Line 9470: l_src_cols EDW_OWB_COLLECTION_UTIL.varcharTableType;

9466: given the da columns for the ltc table, what are the da columns of the stg table?
9467: */
9468: --g_stg_da_cols
9469: function get_stg_da_columns return boolean is
9470: l_src_cols EDW_OWB_COLLECTION_UTIL.varcharTableType;
9471: l_tgt_cols EDW_OWB_COLLECTION_UTIL.varcharTableType;
9472: l_number_cols number;
9473: Begin
9474: if g_debug then

Line 9471: l_tgt_cols EDW_OWB_COLLECTION_UTIL.varcharTableType;

9467: */
9468: --g_stg_da_cols
9469: function get_stg_da_columns return boolean is
9470: l_src_cols EDW_OWB_COLLECTION_UTIL.varcharTableType;
9471: l_tgt_cols EDW_OWB_COLLECTION_UTIL.varcharTableType;
9472: l_number_cols number;
9473: Begin
9474: if g_debug then
9475: write_to_log_file_n('In get_stg_da_columns');

Line 9477: if EDW_OWB_COLLECTION_UTIL.get_obj_obj_map_details(g_primary_src_name,g_primary_target_name,

9473: Begin
9474: if g_debug then
9475: write_to_log_file_n('In get_stg_da_columns');
9476: end if;
9477: if EDW_OWB_COLLECTION_UTIL.get_obj_obj_map_details(g_primary_src_name,g_primary_target_name,
9478: null,l_src_cols,l_tgt_cols,l_number_cols )=false then
9479: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;
9480: g_status:=false;
9481: return false;

Line 9479: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;

9475: write_to_log_file_n('In get_stg_da_columns');
9476: end if;
9477: if EDW_OWB_COLLECTION_UTIL.get_obj_obj_map_details(g_primary_src_name,g_primary_target_name,
9478: null,l_src_cols,l_tgt_cols,l_number_cols )=false then
9479: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;
9480: g_status:=false;
9481: return false;
9482: end if;
9483: for i in 1..g_number_da_cols loop

Line 9526: l_status:=EDW_OWB_COLLECTION_UTIL.does_table_have_data(g_da_table);

9522: l_master_da_table_dis3 varchar2(400);
9523: l_pp_table_temp varchar2(400);
9524: l_table varchar2(400);
9525: Begin
9526: l_status:=EDW_OWB_COLLECTION_UTIL.does_table_have_data(g_da_table);
9527: l_status_pp:=EDW_OWB_COLLECTION_UTIL.does_table_have_data(g_pp_table);
9528: l_status_dim:=EDW_OWB_COLLECTION_UTIL.does_table_have_data(g_primary_target_name);
9529: if l_status=0 or l_status_dim=0 or l_status_pp=0 then
9530: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;

Line 9527: l_status_pp:=EDW_OWB_COLLECTION_UTIL.does_table_have_data(g_pp_table);

9523: l_pp_table_temp varchar2(400);
9524: l_table varchar2(400);
9525: Begin
9526: l_status:=EDW_OWB_COLLECTION_UTIL.does_table_have_data(g_da_table);
9527: l_status_pp:=EDW_OWB_COLLECTION_UTIL.does_table_have_data(g_pp_table);
9528: l_status_dim:=EDW_OWB_COLLECTION_UTIL.does_table_have_data(g_primary_target_name);
9529: if l_status=0 or l_status_dim=0 or l_status_pp=0 then
9530: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;
9531: g_status:=false;

Line 9528: l_status_dim:=EDW_OWB_COLLECTION_UTIL.does_table_have_data(g_primary_target_name);

9524: l_table varchar2(400);
9525: Begin
9526: l_status:=EDW_OWB_COLLECTION_UTIL.does_table_have_data(g_da_table);
9527: l_status_pp:=EDW_OWB_COLLECTION_UTIL.does_table_have_data(g_pp_table);
9528: l_status_dim:=EDW_OWB_COLLECTION_UTIL.does_table_have_data(g_primary_target_name);
9529: if l_status=0 or l_status_dim=0 or l_status_pp=0 then
9530: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;
9531: g_status:=false;
9532: return false;

Line 9530: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;

9526: l_status:=EDW_OWB_COLLECTION_UTIL.does_table_have_data(g_da_table);
9527: l_status_pp:=EDW_OWB_COLLECTION_UTIL.does_table_have_data(g_pp_table);
9528: l_status_dim:=EDW_OWB_COLLECTION_UTIL.does_table_have_data(g_primary_target_name);
9529: if l_status=0 or l_status_dim=0 or l_status_pp=0 then
9530: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;
9531: g_status:=false;
9532: return false;
9533: end if;
9534: if l_status=2 and l_status_pp=2 then

Line 9547: g_status_message:=EDW_OWB_COLLECTION_UTIL.get_message('EDW_INSTANCE_COL_NOT_FOUND');

9543: l_master_da_table_dis2:=g_da_op_table||'D';
9544: l_master_da_table_dis3:=g_da_op_table||'E';
9545: l_pp_table_temp:=g_pp_table||'F';
9546: if g_master_instance is not null and g_instance_column is null then
9547: g_status_message:=EDW_OWB_COLLECTION_UTIL.get_message('EDW_INSTANCE_COL_NOT_FOUND');
9548: write_to_log_file_n(g_status_message);
9549: g_status:=false;
9550: return false;
9551: end if;

Line 9568: if EDW_OWB_COLLECTION_UTIL.drop_table(l_da_table)=false then

9564: if g_master_instance is not null then
9565: l_stmt:=l_stmt||','||g_instance_column;
9566: end if;
9567: l_stmt:=l_stmt||' from '||g_primary_target_name;
9568: if EDW_OWB_COLLECTION_UTIL.drop_table(l_da_table)=false then
9569: null;
9570: end if;
9571: if g_debug then
9572: write_to_log_file_n('going to execute '||l_stmt||get_time);

Line 9578: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(l_da_table,instr(l_da_table,'.')+1,

9574: execute immediate l_stmt;
9575: if g_debug then
9576: write_to_log_file_n('created '||l_da_table||' with '||sql%rowcount||' rows '||get_time);
9577: end if;
9578: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(l_da_table,instr(l_da_table,'.')+1,
9579: length(l_da_table)),substr(l_da_table,1,instr(l_da_table,'.')-1));
9580: if l_status=1 then
9581: l_stmt:='create table '||l_da_table_dis||' tablespace '||g_op_table_space;
9582: if g_parallel is not null then

Line 9594: if EDW_OWB_COLLECTION_UTIL.drop_table(l_da_table_dis)=false then

9590: for i in 1..g_number_da_cols loop
9591: l_stmt:=l_stmt||g_da_cols(i)||',';
9592: end loop;
9593: l_stmt:=substr(l_stmt,1,length(l_stmt)-1);
9594: if EDW_OWB_COLLECTION_UTIL.drop_table(l_da_table_dis)=false then
9595: null;
9596: end if;
9597: if g_debug then
9598: write_to_log_file_n('going to execute '||l_stmt||get_time);

Line 9604: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(l_da_table_dis,instr(l_da_table_dis,'.')+1,

9600: execute immediate l_stmt;
9601: if g_debug then
9602: write_to_log_file_n('created '||l_da_table_dis||' with '||sql%rowcount||' rows '||get_time);
9603: end if;
9604: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(l_da_table_dis,instr(l_da_table_dis,'.')+1,
9605: length(l_da_table_dis)),substr(l_da_table_dis,1,instr(l_da_table_dis,'.')-1));
9606: l_dis_count:=EDW_OWB_COLLECTION_UTIL.get_table_count(l_da_table_dis);
9607: l_da_count:=EDW_OWB_COLLECTION_UTIL.get_table_count(l_da_table);
9608: if g_debug then

Line 9606: l_dis_count:=EDW_OWB_COLLECTION_UTIL.get_table_count(l_da_table_dis);

9602: write_to_log_file_n('created '||l_da_table_dis||' with '||sql%rowcount||' rows '||get_time);
9603: end if;
9604: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(l_da_table_dis,instr(l_da_table_dis,'.')+1,
9605: length(l_da_table_dis)),substr(l_da_table_dis,1,instr(l_da_table_dis,'.')-1));
9606: l_dis_count:=EDW_OWB_COLLECTION_UTIL.get_table_count(l_da_table_dis);
9607: l_da_count:=EDW_OWB_COLLECTION_UTIL.get_table_count(l_da_table);
9608: if g_debug then
9609: write_to_log_file_n('l_dis_count='||l_dis_count||' ,l_da_count='||l_da_count);
9610: end if;

Line 9607: l_da_count:=EDW_OWB_COLLECTION_UTIL.get_table_count(l_da_table);

9603: end if;
9604: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(l_da_table_dis,instr(l_da_table_dis,'.')+1,
9605: length(l_da_table_dis)),substr(l_da_table_dis,1,instr(l_da_table_dis,'.')-1));
9606: l_dis_count:=EDW_OWB_COLLECTION_UTIL.get_table_count(l_da_table_dis);
9607: l_da_count:=EDW_OWB_COLLECTION_UTIL.get_table_count(l_da_table);
9608: if g_debug then
9609: write_to_log_file_n('l_dis_count='||l_dis_count||' ,l_da_count='||l_da_count);
9610: end if;
9611: if l_dis_count <> l_da_count and g_master_instance is not null then

Line 9626: if EDW_OWB_COLLECTION_UTIL.drop_table(l_master_da_table_dis1)=false then

9622: for i in 1..g_number_da_cols loop
9623: l_stmt:=l_stmt||g_da_cols(i)||',';
9624: end loop;
9625: l_stmt:=substr(l_stmt,1,length(l_stmt)-1);
9626: if EDW_OWB_COLLECTION_UTIL.drop_table(l_master_da_table_dis1)=false then
9627: null;
9628: end if;
9629: if g_debug then
9630: write_to_log_file_n('going to execute '||l_stmt||get_time);

Line 9636: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(l_master_da_table_dis1,instr(l_master_da_table_dis1,'.')+1,

9632: execute immediate l_stmt;
9633: if g_debug then
9634: write_to_log_file_n('created '||l_master_da_table_dis1||' with '||sql%rowcount||' rows '||get_time);
9635: end if;
9636: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(l_master_da_table_dis1,instr(l_master_da_table_dis1,'.')+1,
9637: length(l_master_da_table_dis1)),substr(l_master_da_table_dis1,1,instr(l_master_da_table_dis1,'.')-1));
9638: l_stmt:='create table '||l_master_da_table_dis2||' tablespace '||g_op_table_space;
9639: if g_parallel is not null then
9640: l_stmt:=l_stmt||' parallel (degree '||g_parallel||') ';

Line 9653: if EDW_OWB_COLLECTION_UTIL.drop_table(l_master_da_table_dis2)=false then

9649: l_stmt:=l_stmt||g_da_cols(i)||',';
9650: end loop;
9651: l_stmt:=substr(l_stmt,1,length(l_stmt)-1);
9652: l_stmt:=l_stmt||' from '||l_master_da_table_dis1;
9653: if EDW_OWB_COLLECTION_UTIL.drop_table(l_master_da_table_dis2)=false then
9654: null;
9655: end if;
9656: if g_debug then
9657: write_to_log_file_n('going to execute '||l_stmt||get_time);

Line 9663: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(l_master_da_table_dis2,instr(l_master_da_table_dis2,'.')+1,

9659: execute immediate l_stmt;
9660: if g_debug then
9661: write_to_log_file_n('created '||l_master_da_table_dis2||' with '||sql%rowcount||' rows '||get_time);
9662: end if;
9663: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(l_master_da_table_dis2,instr(l_master_da_table_dis2,'.')+1,
9664: length(l_master_da_table_dis2)),substr(l_master_da_table_dis2,1,instr(l_master_da_table_dis2,'.')-1));
9665: l_stmt:='create table '||l_master_da_table_dis3||' tablespace '||g_op_table_space;
9666: if g_parallel is not null then
9667: l_stmt:=l_stmt||' parallel (degree '||g_parallel||') ';

Line 9683: if EDW_OWB_COLLECTION_UTIL.drop_table(l_master_da_table_dis3)=false then

9679: for i in 1..g_number_da_cols loop
9680: l_stmt:=l_stmt||l_master_da_table_dis2||'.'||g_da_cols(i)||'='||l_da_table_dis||'.'||g_da_cols(i)||' and ';
9681: end loop;
9682: l_stmt:=substr(l_stmt,1,length(l_stmt)-4);
9683: if EDW_OWB_COLLECTION_UTIL.drop_table(l_master_da_table_dis3)=false then
9684: null;
9685: end if;
9686: if g_debug then
9687: write_to_log_file_n('going to execute '||l_stmt||get_time);

Line 9693: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(l_master_da_table_dis3,instr(l_master_da_table_dis3,'.')+1,

9689: execute immediate l_stmt;
9690: if g_debug then
9691: write_to_log_file_n('created '||l_master_da_table_dis3||' with '||sql%rowcount||' rows '||get_time);
9692: end if;
9693: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(l_master_da_table_dis3,instr(l_master_da_table_dis3,'.')+1,
9694: length(l_master_da_table_dis3)),substr(l_master_da_table_dis3,1,instr(l_master_da_table_dis3,'.')-1));
9695: --rename
9696: if EDW_OWB_COLLECTION_UTIL.drop_table(l_da_table_dis)=false then
9697: null;

Line 9696: if EDW_OWB_COLLECTION_UTIL.drop_table(l_da_table_dis)=false then

9692: end if;
9693: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(l_master_da_table_dis3,instr(l_master_da_table_dis3,'.')+1,
9694: length(l_master_da_table_dis3)),substr(l_master_da_table_dis3,1,instr(l_master_da_table_dis3,'.')-1));
9695: --rename
9696: if EDW_OWB_COLLECTION_UTIL.drop_table(l_da_table_dis)=false then
9697: null;
9698: end if;
9699: if EDW_OWB_COLLECTION_UTIL.drop_table(l_master_da_table_dis1)=false then
9700: null;

Line 9699: if EDW_OWB_COLLECTION_UTIL.drop_table(l_master_da_table_dis1)=false then

9695: --rename
9696: if EDW_OWB_COLLECTION_UTIL.drop_table(l_da_table_dis)=false then
9697: null;
9698: end if;
9699: if EDW_OWB_COLLECTION_UTIL.drop_table(l_master_da_table_dis1)=false then
9700: null;
9701: end if;
9702: if EDW_OWB_COLLECTION_UTIL.drop_table(l_master_da_table_dis2)=false then
9703: null;

Line 9702: if EDW_OWB_COLLECTION_UTIL.drop_table(l_master_da_table_dis2)=false then

9698: end if;
9699: if EDW_OWB_COLLECTION_UTIL.drop_table(l_master_da_table_dis1)=false then
9700: null;
9701: end if;
9702: if EDW_OWB_COLLECTION_UTIL.drop_table(l_master_da_table_dis2)=false then
9703: null;
9704: end if;
9705: l_da_table_dis:=l_master_da_table_dis3;
9706: end if;

Line 9747: EDW_OWB_COLLECTION_UTIL.set_rollback(g_rollback);

9743: end if;
9744: if g_debug then
9745: write_to_log_file_n('going to execute '||l_stmt||get_time);
9746: end if;
9747: EDW_OWB_COLLECTION_UTIL.set_rollback(g_rollback);
9748: execute immediate l_stmt;
9749: if g_debug then
9750: write_to_log_file_n('inserted into '||g_da_table||' '||sql%rowcount||' rows '||get_time);
9751: end if;

Line 9753: l_owner:=EDW_OWB_COLLECTION_UTIL.get_table_owner(g_da_table);

9749: if g_debug then
9750: write_to_log_file_n('inserted into '||g_da_table||' '||sql%rowcount||' rows '||get_time);
9751: end if;
9752: commit;
9753: l_owner:=EDW_OWB_COLLECTION_UTIL.get_table_owner(g_da_table);
9754: --analysis here is ok because this code is executed only when the tables are empty to start with
9755: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(g_da_table,instr(g_da_table,'.')+1,
9756: length(g_da_table)),l_owner);
9757: end if;

Line 9755: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(g_da_table,instr(g_da_table,'.')+1,

9751: end if;
9752: commit;
9753: l_owner:=EDW_OWB_COLLECTION_UTIL.get_table_owner(g_da_table);
9754: --analysis here is ok because this code is executed only when the tables are empty to start with
9755: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(g_da_table,instr(g_da_table,'.')+1,
9756: length(g_da_table)),l_owner);
9757: end if;
9758: --populate the pp table, assume its empty
9759: if l_status_pp=1 then

Line 9778: if EDW_OWB_COLLECTION_UTIL.drop_table(l_pp_table_temp)=false then

9774: l_stmt:=substr(l_stmt,1,length(l_stmt)-4);
9775: if g_debug then
9776: write_to_log_file_n('going to execute '||l_stmt||get_time);
9777: end if;
9778: if EDW_OWB_COLLECTION_UTIL.drop_table(l_pp_table_temp)=false then
9779: null;
9780: end if;
9781: execute immediate l_stmt;
9782: if g_debug then

Line 9795: EDW_OWB_COLLECTION_UTIL.set_rollback(g_rollback);

9791: 'LOADED_PK,SYSDATE from '||l_pp_table_temp;
9792: if g_debug then
9793: write_to_log_file_n('going to execute '||l_stmt||get_time);
9794: end if;
9795: EDW_OWB_COLLECTION_UTIL.set_rollback(g_rollback);
9796: execute immediate l_stmt;
9797: if g_debug then
9798: write_to_log_file_n('inserted into '||g_pp_table||' '||sql%rowcount||' rows '||get_time);
9799: end if;

Line 9801: if EDW_OWB_COLLECTION_UTIL.drop_table(l_pp_table_temp)=false then

9797: if g_debug then
9798: write_to_log_file_n('inserted into '||g_pp_table||' '||sql%rowcount||' rows '||get_time);
9799: end if;
9800: commit;
9801: if EDW_OWB_COLLECTION_UTIL.drop_table(l_pp_table_temp)=false then
9802: null;
9803: end if;
9804: l_owner:=EDW_OWB_COLLECTION_UTIL.get_table_owner(g_pp_table);
9805: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(g_pp_table,instr(g_pp_table,'.')+1,

Line 9804: l_owner:=EDW_OWB_COLLECTION_UTIL.get_table_owner(g_pp_table);

9800: commit;
9801: if EDW_OWB_COLLECTION_UTIL.drop_table(l_pp_table_temp)=false then
9802: null;
9803: end if;
9804: l_owner:=EDW_OWB_COLLECTION_UTIL.get_table_owner(g_pp_table);
9805: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(g_pp_table,instr(g_pp_table,'.')+1,
9806: length(g_pp_table)),l_owner);
9807: end if;
9808: if EDW_OWB_COLLECTION_UTIL.drop_table(l_da_table)=false then

Line 9805: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(g_pp_table,instr(g_pp_table,'.')+1,

9801: if EDW_OWB_COLLECTION_UTIL.drop_table(l_pp_table_temp)=false then
9802: null;
9803: end if;
9804: l_owner:=EDW_OWB_COLLECTION_UTIL.get_table_owner(g_pp_table);
9805: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(g_pp_table,instr(g_pp_table,'.')+1,
9806: length(g_pp_table)),l_owner);
9807: end if;
9808: if EDW_OWB_COLLECTION_UTIL.drop_table(l_da_table)=false then
9809: null;

Line 9808: if EDW_OWB_COLLECTION_UTIL.drop_table(l_da_table)=false then

9804: l_owner:=EDW_OWB_COLLECTION_UTIL.get_table_owner(g_pp_table);
9805: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(g_pp_table,instr(g_pp_table,'.')+1,
9806: length(g_pp_table)),l_owner);
9807: end if;
9808: if EDW_OWB_COLLECTION_UTIL.drop_table(l_da_table)=false then
9809: null;
9810: end if;
9811: if EDW_OWB_COLLECTION_UTIL.drop_table(l_da_table_dis)=false then
9812: null;

Line 9811: if EDW_OWB_COLLECTION_UTIL.drop_table(l_da_table_dis)=false then

9807: end if;
9808: if EDW_OWB_COLLECTION_UTIL.drop_table(l_da_table)=false then
9809: null;
9810: end if;
9811: if EDW_OWB_COLLECTION_UTIL.drop_table(l_da_table_dis)=false then
9812: null;
9813: end if;
9814: return true;
9815: Exception when others then

Line 9856: EDW_OWB_COLLECTION_UTIL.set_rollback(g_rollback);

9852: l_stmt:=l_stmt||g_factPKName||'1,'||g_factPKNameKey||',sysdate,sysdate from '||p_table||' where row_id2 is null';
9853: if g_debug then
9854: write_to_log_file_n('Going to execute '||l_stmt||get_time);
9855: end if;
9856: EDW_OWB_COLLECTION_UTIL.set_rollback(g_rollback);
9857: execute immediate l_stmt;
9858: if g_debug then
9859: write_to_log_file_n('Inserted '||sql%rowcount||' rows into '||g_da_table||get_time);
9860: end if;

Line 9876: if EDW_OWB_COLLECTION_UTIL.drop_table(l_table1)=false then

9872: l_stmt:=l_stmt||' /*+PARALLEL('||l_table||','||g_parallel||')*/ ';
9873: end if;
9874: l_stmt:=l_stmt||l_table||'.PK from '||p_table||','||g_pp_table||' '||l_table||
9875: ' where '||p_table||'.'||g_fstgPKName||'='||l_table||'.PK';
9876: if EDW_OWB_COLLECTION_UTIL.drop_table(l_table1)=false then
9877: null;
9878: end if;
9879: if g_debug then
9880: write_to_log_file_n('Going to execute '||l_stmt||get_time);

Line 9886: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(l_table1,instr(l_table1,'.')+1,

9882: execute immediate l_stmt;
9883: if g_debug then
9884: write_to_log_file_n('Created '||l_table1||' with '||sql%rowcount||' rows '||get_time);
9885: end if;
9886: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(l_table1,instr(l_table1,'.')+1,
9887: length(l_table1)),substr(l_table1,1,instr(l_table1,'.')-1));
9888: l_stmt:='create table '||l_table_A||' tablespace '||g_op_table_space;
9889: if g_parallel is not null then
9890: l_stmt:=l_stmt||' parallel (degree '||g_parallel||') ';

Line 9895: if EDW_OWB_COLLECTION_UTIL.drop_table(l_table_A)=false then

9891: end if;
9892: l_stmt:=l_stmt||' ';
9893: l_stmt:=l_stmt||' as select '||g_fstgPKName||' '||g_factPKName||' from '||p_table||' MINUS select ';
9894: l_stmt:=l_stmt||' PK '||g_factPKName||' from '||l_table1;
9895: if EDW_OWB_COLLECTION_UTIL.drop_table(l_table_A)=false then
9896: null;
9897: end if;
9898: if g_debug then
9899: write_to_log_file_n('Going to execute '||l_stmt||get_time);

Line 9905: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(l_table_A,instr(l_table_A,'.')+1,

9901: execute immediate l_stmt;
9902: if g_debug then
9903: write_to_log_file_n('Created '||l_table_A||' with '||sql%rowcount||' rows '||get_time);
9904: end if;
9905: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(l_table_A,instr(l_table_A,'.')+1,
9906: length(l_table_A)),substr(l_table_A,1,instr(l_table_A,'.')-1));
9907: if EDW_OWB_COLLECTION_UTIL.drop_table(l_table1)=false then
9908: null;
9909: end if;

Line 9907: if EDW_OWB_COLLECTION_UTIL.drop_table(l_table1)=false then

9903: write_to_log_file_n('Created '||l_table_A||' with '||sql%rowcount||' rows '||get_time);
9904: end if;
9905: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(l_table_A,instr(l_table_A,'.')+1,
9906: length(l_table_A)),substr(l_table_A,1,instr(l_table_A,'.')-1));
9907: if EDW_OWB_COLLECTION_UTIL.drop_table(l_table1)=false then
9908: null;
9909: end if;
9910: l_stmt:='insert ';
9911: l_table:=substr(g_pp_table,instr(g_pp_table,'.')+1,length(g_pp_table));

Line 9923: EDW_OWB_COLLECTION_UTIL.set_rollback(g_rollback);

9919: if g_debug then
9920: write_to_log_file_n('Going to execute '||l_stmt||get_time);
9921: end if;
9922: begin
9923: EDW_OWB_COLLECTION_UTIL.set_rollback(g_rollback);
9924: execute immediate l_stmt;
9925: if g_debug then
9926: write_to_log_file_n('Inserted '||sql%rowcount||' rows into '||g_pp_table||get_time);
9927: end if;

Line 9946: if EDW_OWB_COLLECTION_UTIL.drop_table(l_table_A)=false then

9942: return false;
9943: end if;
9944: end;
9945: end loop;
9946: if EDW_OWB_COLLECTION_UTIL.drop_table(l_table_A)=false then
9947: null;
9948: end if;
9949: return true;
9950: Exception when others then

Line 9970: if EDW_OWB_COLLECTION_UTIL.check_table(g_dup_hold_table)=false then

9966: Begin
9967: if g_debug then
9968: write_to_log_file_n('In move_dup_pp_future');
9969: end if;
9970: if EDW_OWB_COLLECTION_UTIL.check_table(g_dup_hold_table)=false then
9971: return true;
9972: end if;
9973: l_dup_pp_row_id_table:=g_dup_pp_row_id_table||'A';
9974: if EDW_OWB_COLLECTION_UTIL.does_table_have_data(g_dup_pp_row_id_table) = 2 then

Line 9974: if EDW_OWB_COLLECTION_UTIL.does_table_have_data(g_dup_pp_row_id_table) = 2 then

9970: if EDW_OWB_COLLECTION_UTIL.check_table(g_dup_hold_table)=false then
9971: return true;
9972: end if;
9973: l_dup_pp_row_id_table:=g_dup_pp_row_id_table||'A';
9974: if EDW_OWB_COLLECTION_UTIL.does_table_have_data(g_dup_pp_row_id_table) = 2 then
9975: l_stmt:='create table '||l_dup_pp_row_id_table||' tablespace '||g_op_table_space;
9976: if g_parallel is not null then
9977: l_stmt:=l_stmt||' parallel (degree '||g_parallel||') ';
9978: end if;

Line 9981: if EDW_OWB_COLLECTION_UTIL.drop_table(l_dup_pp_row_id_table)=false then

9977: l_stmt:=l_stmt||' parallel (degree '||g_parallel||') ';
9978: end if;
9979: l_stmt:=l_stmt||' ';
9980: l_stmt:=l_stmt||' as select row_id from '||g_dup_hold_table||' MINUS select row_id from '||g_dup_pp_row_id_table;
9981: if EDW_OWB_COLLECTION_UTIL.drop_table(l_dup_pp_row_id_table)=false then
9982: null;
9983: end if;
9984: if g_debug then
9985: write_to_log_file_n('Going to execute '||l_stmt||get_time);

Line 9997: EDW_OWB_COLLECTION_UTIL.set_rollback(g_rollback);

9993: --B minus select * from A
9994: if g_debug then
9995: write_to_log_file_n('Going to execute '||l_stmt||get_time);
9996: end if;
9997: EDW_OWB_COLLECTION_UTIL.set_rollback(g_rollback);
9998: execute immediate l_stmt;
9999: if g_debug then
10000: write_to_log_file_n('Inserted '||sql%rowcount||' rows into '||g_dup_pp_row_id_table||get_time);
10001: end if;

Line 10003: if EDW_OWB_COLLECTION_UTIL.drop_table(l_dup_pp_row_id_table)=false then

9999: if g_debug then
10000: write_to_log_file_n('Inserted '||sql%rowcount||' rows into '||g_dup_pp_row_id_table||get_time);
10001: end if;
10002: commit;
10003: if EDW_OWB_COLLECTION_UTIL.drop_table(l_dup_pp_row_id_table)=false then
10004: null;
10005: end if;
10006: else
10007: l_stmt:='create table '||g_dup_pp_row_id_table||' tablespace '||g_op_table_space;

Line 10013: if EDW_OWB_COLLECTION_UTIL.drop_table(g_dup_pp_row_id_table)=false then

10009: l_stmt:=l_stmt||' parallel (degree '||g_parallel||') ';
10010: end if;
10011: l_stmt:=l_stmt||' ';
10012: l_stmt:=l_stmt||' as select row_id from '||g_dup_hold_table;
10013: if EDW_OWB_COLLECTION_UTIL.drop_table(g_dup_pp_row_id_table)=false then
10014: null;
10015: end if;
10016: if g_debug then
10017: write_to_log_file_n('Going to execute '||l_stmt||get_time);

Line 10024: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(g_dup_pp_row_id_table,instr(g_dup_pp_row_id_table,'.')+1,

10020: if g_debug then
10021: write_to_log_file_n('Created '||g_dup_pp_row_id_table||' with '||sql%rowcount||' rows'||get_time);
10022: end if;
10023: end if;
10024: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(g_dup_pp_row_id_table,instr(g_dup_pp_row_id_table,'.')+1,
10025: length(g_dup_pp_row_id_table)),substr(g_dup_pp_row_id_table,1,instr(g_dup_pp_row_id_table,'.')-1));
10026: return true;
10027: Exception when others then
10028: g_status_message:=sqlerrm;

Line 10048: if EDW_OWB_COLLECTION_UTIL.check_table(g_dup_pp_row_id_table)=false then

10044: Begin
10045: if g_debug then
10046: write_to_log_file_n('In load_dup_coll_into_pp');
10047: end if;
10048: if EDW_OWB_COLLECTION_UTIL.check_table(g_dup_pp_row_id_table)=false then
10049: return true;
10050: end if;
10051: l_dup_pp_table:=g_dup_pp_table||'A';
10052: l_dup_pp_table_B:=g_dup_pp_table||'B';

Line 10069: if EDW_OWB_COLLECTION_UTIL.drop_table(l_dup_pp_table)=false then

10065: l_stmt:=l_stmt||','||g_da_cols(i);
10066: end loop;
10067: l_stmt:=l_stmt||' from '||g_dup_pp_row_id_table||','||g_fstgTableName||' where '||
10068: g_dup_pp_row_id_table||'.row_id='||g_fstgTableName||'.rowid';
10069: if EDW_OWB_COLLECTION_UTIL.drop_table(l_dup_pp_table)=false then
10070: null;
10071: end if;
10072: if g_debug then
10073: write_to_log_file_n('Going to execute '||l_stmt||get_time);

Line 10079: --EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(l_dup_pp_table,instr(l_dup_pp_table,'.')+1,

10075: execute immediate l_stmt;
10076: if g_debug then
10077: write_to_log_file_n('Created '||l_dup_pp_table||' with '||sql%rowcount||' rows'||get_time);
10078: end if;
10079: --EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(l_dup_pp_table,instr(l_dup_pp_table,'.')+1,
10080: --length(l_dup_pp_table)),substr(l_dup_pp_table,1,instr(l_dup_pp_table,'.')-1));
10081: l_stmt:='create table '||l_dup_pp_table_B||' tablespace '||g_op_table_space;
10082: if g_parallel is not null then
10083: l_stmt:=l_stmt||' parallel (degree '||g_parallel||') ';

Line 10091: if EDW_OWB_COLLECTION_UTIL.drop_table(l_dup_pp_table_B)=false then

10087: for i in 1..g_number_da_cols loop
10088: l_stmt:=l_stmt||','||g_da_cols(i);
10089: end loop;
10090: l_stmt:=l_stmt||' from '||l_dup_pp_table;
10091: if EDW_OWB_COLLECTION_UTIL.drop_table(l_dup_pp_table_B)=false then
10092: null;
10093: end if;
10094: if g_debug then
10095: write_to_log_file_n('Going to execute '||l_stmt||get_time);

Line 10101: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(l_dup_pp_table_B,instr(l_dup_pp_table_B,'.')+1,

10097: execute immediate l_stmt;
10098: if g_debug then
10099: write_to_log_file_n('Created '||l_dup_pp_table_B||' with '||sql%rowcount||' rows'||get_time);
10100: end if;
10101: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(l_dup_pp_table_B,instr(l_dup_pp_table_B,'.')+1,
10102: length(l_dup_pp_table_B)),substr(l_dup_pp_table_B,1,instr(l_dup_pp_table_B,'.')-1));
10103: if EDW_OWB_COLLECTION_UTIL.drop_table(l_dup_pp_table)=false then
10104: null;
10105: end if;

Line 10103: if EDW_OWB_COLLECTION_UTIL.drop_table(l_dup_pp_table)=false then

10099: write_to_log_file_n('Created '||l_dup_pp_table_B||' with '||sql%rowcount||' rows'||get_time);
10100: end if;
10101: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(l_dup_pp_table_B,instr(l_dup_pp_table_B,'.')+1,
10102: length(l_dup_pp_table_B)),substr(l_dup_pp_table_B,1,instr(l_dup_pp_table_B,'.')-1));
10103: if EDW_OWB_COLLECTION_UTIL.drop_table(l_dup_pp_table)=false then
10104: null;
10105: end if;
10106: l_stmt:='create table '||g_dup_pp_table||' tablespace '||g_op_table_space;
10107: if g_parallel is not null then

Line 10122: if EDW_OWB_COLLECTION_UTIL.drop_table(g_dup_pp_table)=false then

10118: for i in 1..g_number_da_cols loop
10119: l_stmt:=l_stmt||l_dup_pp_table_B||'.'||g_da_cols(i)||'='||l_table||'.'||g_da_cols(i)||' and ';
10120: end loop;
10121: l_stmt:=substr(l_stmt,1,length(l_stmt)-4);
10122: if EDW_OWB_COLLECTION_UTIL.drop_table(g_dup_pp_table)=false then
10123: null;
10124: end if;
10125: if g_debug then
10126: write_to_log_file_n('Going to execute '||l_stmt||get_time);

Line 10132: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(g_dup_pp_table,instr(g_dup_pp_table,'.')+1,

10128: execute immediate l_stmt;
10129: if g_debug then
10130: write_to_log_file_n('Created '||g_dup_pp_table||' with '||sql%rowcount||' rows'||get_time);
10131: end if;
10132: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(g_dup_pp_table,instr(g_dup_pp_table,'.')+1,
10133: length(g_dup_pp_table)),substr(g_dup_pp_table,1,instr(g_dup_pp_table,'.')-1));
10134: if EDW_OWB_COLLECTION_UTIL.drop_table(l_dup_pp_table_B)=false then
10135: null;
10136: end if;

Line 10134: if EDW_OWB_COLLECTION_UTIL.drop_table(l_dup_pp_table_B)=false then

10130: write_to_log_file_n('Created '||g_dup_pp_table||' with '||sql%rowcount||' rows'||get_time);
10131: end if;
10132: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(g_dup_pp_table,instr(g_dup_pp_table,'.')+1,
10133: length(g_dup_pp_table)),substr(g_dup_pp_table,1,instr(g_dup_pp_table,'.')-1));
10134: if EDW_OWB_COLLECTION_UTIL.drop_table(l_dup_pp_table_B)=false then
10135: null;
10136: end if;
10137: loop
10138: l_stmt:='create table '||l_dup_pp_table_C||' tablespace '||g_op_table_space;

Line 10149: if EDW_OWB_COLLECTION_UTIL.drop_table(l_dup_pp_table_C)=false then

10145: if g_parallel is not null then
10146: l_stmt:=l_stmt||' /*+PARALLEL('||l_table||','||g_parallel||')*/ ';
10147: end if;
10148: l_stmt:=l_stmt||'PK '||g_factPKName||' from '||g_pp_table||' '||l_table;
10149: if EDW_OWB_COLLECTION_UTIL.drop_table(l_dup_pp_table_C)=false then
10150: null;
10151: end if;
10152: if g_debug then
10153: write_to_log_file_n('Going to execute '||l_stmt||get_time);

Line 10159: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(l_dup_pp_table_C,instr(l_dup_pp_table_C,'.')+1,

10155: execute immediate l_stmt;
10156: if g_debug then
10157: write_to_log_file_n('Created '||l_dup_pp_table_C||' with '||sql%rowcount||' rows'||get_time);
10158: end if;
10159: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(l_dup_pp_table_C,instr(l_dup_pp_table_C,'.')+1,
10160: length(l_dup_pp_table_C)),substr(l_dup_pp_table_C,1,instr(l_dup_pp_table_C,'.')-1));
10161: l_stmt:='insert ';
10162: l_table:=substr(g_pp_table,instr(g_pp_table,'.')+1,length(g_pp_table));
10163: if g_parallel is not null then

Line 10174: EDW_OWB_COLLECTION_UTIL.set_rollback(g_rollback);

10170: if g_debug then
10171: write_to_log_file_n('Going to execute '||l_stmt||get_time);
10172: end if;
10173: begin
10174: EDW_OWB_COLLECTION_UTIL.set_rollback(g_rollback);
10175: execute immediate l_stmt;
10176: if g_debug then
10177: write_to_log_file_n('Inserted into '||g_pp_table||' '||sql%rowcount||' rows'||get_time);
10178: end if;

Line 10198: if EDW_OWB_COLLECTION_UTIL.drop_table(g_dup_pp_row_id_table)=false then

10194: return false;
10195: end if;
10196: end;
10197: end loop;
10198: if EDW_OWB_COLLECTION_UTIL.drop_table(g_dup_pp_row_id_table)=false then
10199: null;
10200: end if;
10201: if EDW_OWB_COLLECTION_UTIL.drop_table(g_dup_pp_table)=false then
10202: null;

Line 10201: if EDW_OWB_COLLECTION_UTIL.drop_table(g_dup_pp_table)=false then

10197: end loop;
10198: if EDW_OWB_COLLECTION_UTIL.drop_table(g_dup_pp_row_id_table)=false then
10199: null;
10200: end if;
10201: if EDW_OWB_COLLECTION_UTIL.drop_table(g_dup_pp_table)=false then
10202: null;
10203: end if;
10204: if EDW_OWB_COLLECTION_UTIL.drop_table(l_dup_pp_table_C)=false then
10205: null;

Line 10204: if EDW_OWB_COLLECTION_UTIL.drop_table(l_dup_pp_table_C)=false then

10200: end if;
10201: if EDW_OWB_COLLECTION_UTIL.drop_table(g_dup_pp_table)=false then
10202: null;
10203: end if;
10204: if EDW_OWB_COLLECTION_UTIL.drop_table(l_dup_pp_table_C)=false then
10205: null;
10206: end if;
10207: return true;
10208: Exception when others then

Line 10218: function move_dup_rowid_table_general(p_cols EDW_OWB_COLLECTION_UTIL.varcharTableType,p_number_cols number)

10214:
10215: /*
10216: for data alignment, we need to mark as duplicate or duplicate collect based on NAME or other columns.
10217: */
10218: function move_dup_rowid_table_general(p_cols EDW_OWB_COLLECTION_UTIL.varcharTableType,p_number_cols number)
10219: return number is
10220: l_stmt varchar2(20000);
10221: l_data_table varchar2(400);
10222: l_data_table_count number;

Line 10289: if EDW_OWB_COLLECTION_UTIL.does_table_have_data(g_fstgTableName,'LAST_UPDATE_DATE IS NOT NULL')=2 then

10285: l_dup_value_table:=g_da_op_table||'E';
10286: l_dup_table:=g_da_op_table||'U';
10287: l_dup_max_table:=g_da_op_table||'M';
10288: l_dup_max_rowid_table:=g_da_op_table||'R';
10289: if EDW_OWB_COLLECTION_UTIL.does_table_have_data(g_fstgTableName,'LAST_UPDATE_DATE IS NOT NULL')=2 then
10290: l_col:='LAST_UPDATE_DATE';
10291: else
10292: l_col:='ROWNUM';
10293: end if;

Line 10295: if EDW_OWB_COLLECTION_UTIL.value_in_table(p_cols,p_number_cols,g_instance_column) then

10291: else
10292: l_col:='ROWNUM';
10293: end if;
10294: if g_master_instance is not null then
10295: if EDW_OWB_COLLECTION_UTIL.value_in_table(p_cols,p_number_cols,g_instance_column) then
10296: if g_debug then
10297: write_to_log_file_n(g_instance_column||' is a part of p_col');
10298: end if;
10299: l_instance_in_pcol:=true;

Line 10325: if EDW_OWB_COLLECTION_UTIL.create_table(l_data_table,l_stmt,l_count)=false then

10321: l_stmt:=l_stmt||'ROWNUM col,';
10322: end if;
10323: l_stmt:=l_stmt||g_fstgTableName||'.rowid row_id from '||g_reqid_table||','||g_fstgTableName||' where '||
10324: g_reqid_table||'.row_id='||g_fstgTableName||'.rowid ';
10325: if EDW_OWB_COLLECTION_UTIL.create_table(l_data_table,l_stmt,l_count)=false then
10326: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;
10327: g_status:=false;
10328: return 0;
10329: end if;

Line 10326: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;

10322: end if;
10323: l_stmt:=l_stmt||g_fstgTableName||'.rowid row_id from '||g_reqid_table||','||g_fstgTableName||' where '||
10324: g_reqid_table||'.row_id='||g_fstgTableName||'.rowid ';
10325: if EDW_OWB_COLLECTION_UTIL.create_table(l_data_table,l_stmt,l_count)=false then
10326: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;
10327: g_status:=false;
10328: return 0;
10329: end if;
10330: if l_col='LAST_UPDATE_DATE' then

Line 10381: if EDW_OWB_COLLECTION_UTIL.create_table(l_data_table_BO,l_stmt,l_count)=false then

10377: for i in 1..p_number_cols loop
10378: l_stmt:=l_stmt||l_data_table||'.'||p_cols(i)||'='||l_table||'.'||p_cols(i)||' and ';
10379: end loop;
10380: l_stmt:=substr(l_stmt,1,length(l_stmt)-4);
10381: if EDW_OWB_COLLECTION_UTIL.create_table(l_data_table_BO,l_stmt,l_count)=false then
10382: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;
10383: g_status:=false;
10384: return 0;
10385: end if;

Line 10382: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;

10378: l_stmt:=l_stmt||l_data_table||'.'||p_cols(i)||'='||l_table||'.'||p_cols(i)||' and ';
10379: end loop;
10380: l_stmt:=substr(l_stmt,1,length(l_stmt)-4);
10381: if EDW_OWB_COLLECTION_UTIL.create_table(l_data_table_BO,l_stmt,l_count)=false then
10382: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;
10383: g_status:=false;
10384: return 0;
10385: end if;
10386: if l_count>0 then

Line 10394: if EDW_OWB_COLLECTION_UTIL.create_table(l_data_table_BA,l_stmt,l_count)=false then

10390: end if;
10391: l_stmt:=l_stmt||' ';
10392: l_stmt:=l_stmt||' as select row_id,row_id1 from '||l_data_table_BO||' where '||
10393: g_instance_column||'1<>'''||g_master_instance||'''';
10394: if EDW_OWB_COLLECTION_UTIL.create_table(l_data_table_BA,l_stmt,l_count)=false then
10395: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;
10396: g_status:=false;
10397: return 0;
10398: end if;

Line 10395: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;

10391: l_stmt:=l_stmt||' ';
10392: l_stmt:=l_stmt||' as select row_id,row_id1 from '||l_data_table_BO||' where '||
10393: g_instance_column||'1<>'''||g_master_instance||'''';
10394: if EDW_OWB_COLLECTION_UTIL.create_table(l_data_table_BA,l_stmt,l_count)=false then
10395: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;
10396: g_status:=false;
10397: return 0;
10398: end if;
10399: l_stmt:='create table '||l_data_table_BB||' tablespace '||g_op_table_space;

Line 10411: if EDW_OWB_COLLECTION_UTIL.create_table(l_data_table_BB,l_stmt,l_count)=false then

10407: end loop;
10408: l_stmt:=l_stmt||'row_id2,'||g_instance_column;
10409: l_stmt:=l_stmt||' from '||l_data_table_BO||' where '||
10410: g_instance_column||'1='''||g_master_instance||'''';
10411: if EDW_OWB_COLLECTION_UTIL.create_table(l_data_table_BB,l_stmt,l_count)=false then
10412: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;
10413: g_status:=false;
10414: return 0;
10415: end if;

Line 10412: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;

10408: l_stmt:=l_stmt||'row_id2,'||g_instance_column;
10409: l_stmt:=l_stmt||' from '||l_data_table_BO||' where '||
10410: g_instance_column||'1='''||g_master_instance||'''';
10411: if EDW_OWB_COLLECTION_UTIL.create_table(l_data_table_BB,l_stmt,l_count)=false then
10412: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;
10413: g_status:=false;
10414: return 0;
10415: end if;
10416: --if B table has data,we may need to update the DA table

Line 10427: if EDW_OWB_COLLECTION_UTIL.create_table(l_data_table_BF,l_stmt,l_count)=false then

10423: end if;
10424: l_stmt:=l_stmt||' ';
10425: l_stmt:=l_stmt||' as select row_id2 from '||l_data_table_BB||' where '||
10426: g_instance_column||'<>'''||g_master_instance||'''';
10427: if EDW_OWB_COLLECTION_UTIL.create_table(l_data_table_BF,l_stmt,l_count)=false then
10428: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;
10429: g_status:=false;
10430: return 0;
10431: end if;

Line 10428: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;

10424: l_stmt:=l_stmt||' ';
10425: l_stmt:=l_stmt||' as select row_id2 from '||l_data_table_BB||' where '||
10426: g_instance_column||'<>'''||g_master_instance||'''';
10427: if EDW_OWB_COLLECTION_UTIL.create_table(l_data_table_BF,l_stmt,l_count)=false then
10428: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;
10429: g_status:=false;
10430: return 0;
10431: end if;
10432: if l_count>0 then

Line 10455: if EDW_OWB_COLLECTION_UTIL.create_table(l_data_table_BG,l_stmt,l_count)=false then

10451: l_stmt:=l_stmt||' ';
10452: l_stmt:=l_stmt||' as select row_id2 row_id from '||l_data_table_BF||' having count(row_id2)=1 '||
10453: 'group by row_id2';
10454: end if;
10455: if EDW_OWB_COLLECTION_UTIL.create_table(l_data_table_BG,l_stmt,l_count)=false then
10456: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;
10457: g_status:=false;
10458: return 0;
10459: end if;

Line 10456: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;

10452: l_stmt:=l_stmt||' as select row_id2 row_id from '||l_data_table_BF||' having count(row_id2)=1 '||
10453: 'group by row_id2';
10454: end if;
10455: if EDW_OWB_COLLECTION_UTIL.create_table(l_data_table_BG,l_stmt,l_count)=false then
10456: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;
10457: g_status:=false;
10458: return 0;
10459: end if;
10460: --4161164 : remove IOT , replace with ordinary table and index

Line 10461: EDW_OWB_COLLECTION_UTIL.create_iot_index(l_data_table_BG,'row_id',g_op_table_space,g_parallel);

10457: g_status:=false;
10458: return 0;
10459: end if;
10460: --4161164 : remove IOT , replace with ordinary table and index
10461: EDW_OWB_COLLECTION_UTIL.create_iot_index(l_data_table_BG,'row_id',g_op_table_space,g_parallel);
10462: l_table:=substr(g_da_table,instr(g_da_table,'.')+1,length(g_da_table));
10463: l_stmt:='update /*+ORDERED USE_NL('||l_table||')*/ ';
10464: if g_parallel is not null then
10465: l_stmt:=l_stmt||' /*+PARALLEL('||l_table||','||g_parallel||')*/ ';

Line 10489: if EDW_OWB_COLLECTION_UTIL.create_table(l_data_table_BC,l_stmt,l_count)=false then

10485: l_stmt:=l_stmt||p_cols(i)||',';
10486: end loop;
10487: l_stmt:=l_stmt||'row_id,row_id1 from '||l_data_table_BO||' where '||
10488: g_instance_column||'='||g_instance_column||'1';
10489: if EDW_OWB_COLLECTION_UTIL.create_table(l_data_table_BC,l_stmt,l_count)=false then
10490: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;
10491: g_status:=false;
10492: return 0;
10493: end if;

Line 10490: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;

10486: end loop;
10487: l_stmt:=l_stmt||'row_id,row_id1 from '||l_data_table_BO||' where '||
10488: g_instance_column||'='||g_instance_column||'1';
10489: if EDW_OWB_COLLECTION_UTIL.create_table(l_data_table_BC,l_stmt,l_count)=false then
10490: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;
10491: g_status:=false;
10492: return 0;
10493: end if;
10494: l_stmt:='create table '||l_data_table_BD;

Line 10510: if EDW_OWB_COLLECTION_UTIL.create_table(l_data_table_BD,l_stmt,l_count)=false then

10506: l_stmt:=l_stmt||p_cols(i)||',';
10507: end loop;
10508: l_stmt:=substr(l_stmt,1,length(l_stmt)-1);
10509: l_stmt:=l_stmt||' from '||l_data_table_BB;
10510: if EDW_OWB_COLLECTION_UTIL.create_table(l_data_table_BD,l_stmt,l_count)=false then
10511: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;
10512: g_status:=false;
10513: return 0;
10514: end if;

Line 10511: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;

10507: end loop;
10508: l_stmt:=substr(l_stmt,1,length(l_stmt)-1);
10509: l_stmt:=l_stmt||' from '||l_data_table_BB;
10510: if EDW_OWB_COLLECTION_UTIL.create_table(l_data_table_BD,l_stmt,l_count)=false then
10511: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;
10512: g_status:=false;
10513: return 0;
10514: end if;
10515: l_stmt:='create table '||l_data_table_BE;

Line 10526: if EDW_OWB_COLLECTION_UTIL.create_table(l_data_table_BE,l_stmt,l_count)=false then

10522: for i in 1..p_number_cols loop
10523: l_stmt:=l_stmt||l_data_table_BD||'.'||p_cols(i)||'='||l_data_table_BC||'.'||p_cols(i)||' and ';
10524: end loop;
10525: l_stmt:=substr(l_stmt,1,length(l_stmt)-4);
10526: if EDW_OWB_COLLECTION_UTIL.create_table(l_data_table_BE,l_stmt,l_count)=false then
10527: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;
10528: g_status:=false;
10529: return 0;
10530: end if;

Line 10527: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;

10523: l_stmt:=l_stmt||l_data_table_BD||'.'||p_cols(i)||'='||l_data_table_BC||'.'||p_cols(i)||' and ';
10524: end loop;
10525: l_stmt:=substr(l_stmt,1,length(l_stmt)-4);
10526: if EDW_OWB_COLLECTION_UTIL.create_table(l_data_table_BE,l_stmt,l_count)=false then
10527: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;
10528: g_status:=false;
10529: return 0;
10530: end if;
10531: l_stmt:='create table '||l_data_table_B;

Line 10538: if EDW_OWB_COLLECTION_UTIL.create_table(l_data_table_B,l_stmt,l_count)=false then

10534: end if;
10535: l_stmt:=l_stmt||' ';
10536: l_stmt:=l_stmt||' as select row_id,row_id1 from '||l_data_table_BA||' MINUS select row_id,row_id1 from '||
10537: l_data_table_BE;
10538: if EDW_OWB_COLLECTION_UTIL.create_table(l_data_table_B,l_stmt,l_count)=false then
10539: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;
10540: g_status:=false;
10541: return 0;
10542: end if;

Line 10539: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;

10535: l_stmt:=l_stmt||' ';
10536: l_stmt:=l_stmt||' as select row_id,row_id1 from '||l_data_table_BA||' MINUS select row_id,row_id1 from '||
10537: l_data_table_BE;
10538: if EDW_OWB_COLLECTION_UTIL.create_table(l_data_table_B,l_stmt,l_count)=false then
10539: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;
10540: g_status:=false;
10541: return 0;
10542: end if;
10543: end if;--if l_count>0 for BO

Line 10544: if EDW_OWB_COLLECTION_UTIL.drop_table(l_data_table_BO) = false then

10540: g_status:=false;
10541: return 0;
10542: end if;
10543: end if;--if l_count>0 for BO
10544: if EDW_OWB_COLLECTION_UTIL.drop_table(l_data_table_BO) = false then
10545: null;
10546: end if;
10547: if EDW_OWB_COLLECTION_UTIL.drop_table(l_data_table_BA) = false then
10548: null;

Line 10547: if EDW_OWB_COLLECTION_UTIL.drop_table(l_data_table_BA) = false then

10543: end if;--if l_count>0 for BO
10544: if EDW_OWB_COLLECTION_UTIL.drop_table(l_data_table_BO) = false then
10545: null;
10546: end if;
10547: if EDW_OWB_COLLECTION_UTIL.drop_table(l_data_table_BA) = false then
10548: null;
10549: end if;
10550: if EDW_OWB_COLLECTION_UTIL.drop_table(l_data_table_BB) = false then
10551: null;

Line 10550: if EDW_OWB_COLLECTION_UTIL.drop_table(l_data_table_BB) = false then

10546: end if;
10547: if EDW_OWB_COLLECTION_UTIL.drop_table(l_data_table_BA) = false then
10548: null;
10549: end if;
10550: if EDW_OWB_COLLECTION_UTIL.drop_table(l_data_table_BB) = false then
10551: null;
10552: end if;
10553: if EDW_OWB_COLLECTION_UTIL.drop_table(l_data_table_BC) = false then
10554: null;

Line 10553: if EDW_OWB_COLLECTION_UTIL.drop_table(l_data_table_BC) = false then

10549: end if;
10550: if EDW_OWB_COLLECTION_UTIL.drop_table(l_data_table_BB) = false then
10551: null;
10552: end if;
10553: if EDW_OWB_COLLECTION_UTIL.drop_table(l_data_table_BC) = false then
10554: null;
10555: end if;
10556: if EDW_OWB_COLLECTION_UTIL.drop_table(l_data_table_BD) = false then
10557: null;

Line 10556: if EDW_OWB_COLLECTION_UTIL.drop_table(l_data_table_BD) = false then

10552: end if;
10553: if EDW_OWB_COLLECTION_UTIL.drop_table(l_data_table_BC) = false then
10554: null;
10555: end if;
10556: if EDW_OWB_COLLECTION_UTIL.drop_table(l_data_table_BD) = false then
10557: null;
10558: end if;
10559: if EDW_OWB_COLLECTION_UTIL.drop_table(l_data_table_BE) = false then
10560: null;

Line 10559: if EDW_OWB_COLLECTION_UTIL.drop_table(l_data_table_BE) = false then

10555: end if;
10556: if EDW_OWB_COLLECTION_UTIL.drop_table(l_data_table_BD) = false then
10557: null;
10558: end if;
10559: if EDW_OWB_COLLECTION_UTIL.drop_table(l_data_table_BE) = false then
10560: null;
10561: end if;
10562: if EDW_OWB_COLLECTION_UTIL.drop_table(l_data_table_BF) = false then
10563: null;

Line 10562: if EDW_OWB_COLLECTION_UTIL.drop_table(l_data_table_BF) = false then

10558: end if;
10559: if EDW_OWB_COLLECTION_UTIL.drop_table(l_data_table_BE) = false then
10560: null;
10561: end if;
10562: if EDW_OWB_COLLECTION_UTIL.drop_table(l_data_table_BF) = false then
10563: null;
10564: end if;
10565: if EDW_OWB_COLLECTION_UTIL.drop_table(l_data_table_BG) = false then
10566: null;

Line 10565: if EDW_OWB_COLLECTION_UTIL.drop_table(l_data_table_BG) = false then

10561: end if;
10562: if EDW_OWB_COLLECTION_UTIL.drop_table(l_data_table_BF) = false then
10563: null;
10564: end if;
10565: if EDW_OWB_COLLECTION_UTIL.drop_table(l_data_table_BG) = false then
10566: null;
10567: end if;
10568: if l_count=0 then
10569: l_data_table_D:=l_data_table;

Line 10578: if EDW_OWB_COLLECTION_UTIL.create_table(l_data_table_C,l_stmt,l_count)=false then

10574: l_stmt:=l_stmt||' parallel (degree '||g_parallel||') ';
10575: end if;
10576: l_stmt:=l_stmt||' ';
10577: l_stmt:=l_stmt||' as select rowid row_id from '||l_data_table||' MINUS select row_id from '||l_data_table_B;
10578: if EDW_OWB_COLLECTION_UTIL.create_table(l_data_table_C,l_stmt,l_count)=false then
10579: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;
10580: g_status:=false;
10581: return 0;
10582: end if;

Line 10579: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;

10575: end if;
10576: l_stmt:=l_stmt||' ';
10577: l_stmt:=l_stmt||' as select rowid row_id from '||l_data_table||' MINUS select row_id from '||l_data_table_B;
10578: if EDW_OWB_COLLECTION_UTIL.create_table(l_data_table_C,l_stmt,l_count)=false then
10579: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;
10580: g_status:=false;
10581: return 0;
10582: end if;
10583: l_data_table_D:=g_da_op_table||'D';

Line 10595: if EDW_OWB_COLLECTION_UTIL.create_table(l_data_table_D,l_stmt,l_count)=false then

10591: end loop;
10592: l_stmt:=l_stmt||l_data_table||'.'||g_instance_column||',';
10593: l_stmt:=l_stmt||l_data_table||'.col,'||l_data_table||'.row_id from '||l_data_table_C||','||l_data_table||
10594: ' where '||l_data_table||'.rowid='||l_data_table_C||'.row_id';
10595: if EDW_OWB_COLLECTION_UTIL.create_table(l_data_table_D,l_stmt,l_count)=false then
10596: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;
10597: g_status:=false;
10598: return 0;
10599: end if;

Line 10596: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;

10592: l_stmt:=l_stmt||l_data_table||'.'||g_instance_column||',';
10593: l_stmt:=l_stmt||l_data_table||'.col,'||l_data_table||'.row_id from '||l_data_table_C||','||l_data_table||
10594: ' where '||l_data_table||'.rowid='||l_data_table_C||'.row_id';
10595: if EDW_OWB_COLLECTION_UTIL.create_table(l_data_table_D,l_stmt,l_count)=false then
10596: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;
10597: g_status:=false;
10598: return 0;
10599: end if;
10600: if g_duplicate_collect then

Line 10601: if EDW_OWB_COLLECTION_UTIL.drop_table(l_data_table_B) = false then

10597: g_status:=false;
10598: return 0;
10599: end if;
10600: if g_duplicate_collect then
10601: if EDW_OWB_COLLECTION_UTIL.drop_table(l_data_table_B) = false then
10602: null;
10603: end if;
10604: end if;
10605: --we cannot drop the B table if g_duplicate_collect=false because it needs to be used in the case

Line 10607: if EDW_OWB_COLLECTION_UTIL.drop_table(l_data_table_C) = false then

10603: end if;
10604: end if;
10605: --we cannot drop the B table if g_duplicate_collect=false because it needs to be used in the case
10606: --where master instance is turned on and duplicate collect is turned off
10607: if EDW_OWB_COLLECTION_UTIL.drop_table(l_data_table_C) = false then
10608: null;
10609: end if;
10610: end if;--else for if l_count=0 then
10611: end if;--if g_master_instance is not null and g_duplicate_collect then

Line 10628: if EDW_OWB_COLLECTION_UTIL.create_table(l_dup_value_table,l_stmt,l_count)=false then

10624: for i in 1..p_number_cols loop
10625: l_stmt:=l_stmt||p_cols(i)||',';
10626: end loop;
10627: l_stmt:=substr(l_stmt,1,length(l_stmt)-1);
10628: if EDW_OWB_COLLECTION_UTIL.create_table(l_dup_value_table,l_stmt,l_count)=false then
10629: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;
10630: g_status:=false;
10631: return 0;
10632: end if;

Line 10629: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;

10625: l_stmt:=l_stmt||p_cols(i)||',';
10626: end loop;
10627: l_stmt:=substr(l_stmt,1,length(l_stmt)-1);
10628: if EDW_OWB_COLLECTION_UTIL.create_table(l_dup_value_table,l_stmt,l_count)=false then
10629: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;
10630: g_status:=false;
10631: return 0;
10632: end if;
10633: if l_count=0 then

Line 10639: if EDW_OWB_COLLECTION_UTIL.drop_table(l_data_table_B) = false then

10635: write_to_log_file_n('There are no duplicate records');
10636: end if;
10637: if g_master_instance is not null then
10638: if l_data_table_D_count=l_data_table_count then
10639: if EDW_OWB_COLLECTION_UTIL.drop_table(l_data_table_B) = false then
10640: null;
10641: end if;
10642: if EDW_OWB_COLLECTION_UTIL.drop_table(l_data_table_D) = false then
10643: null;

Line 10642: if EDW_OWB_COLLECTION_UTIL.drop_table(l_data_table_D) = false then

10638: if l_data_table_D_count=l_data_table_count then
10639: if EDW_OWB_COLLECTION_UTIL.drop_table(l_data_table_B) = false then
10640: null;
10641: end if;
10642: if EDW_OWB_COLLECTION_UTIL.drop_table(l_data_table_D) = false then
10643: null;
10644: end if;
10645: if EDW_OWB_COLLECTION_UTIL.drop_table(l_dup_value_table) = false then
10646: null;

Line 10645: if EDW_OWB_COLLECTION_UTIL.drop_table(l_dup_value_table) = false then

10641: end if;
10642: if EDW_OWB_COLLECTION_UTIL.drop_table(l_data_table_D) = false then
10643: null;
10644: end if;
10645: if EDW_OWB_COLLECTION_UTIL.drop_table(l_dup_value_table) = false then
10646: null;
10647: end if;
10648: return 1;
10649: end if;

Line 10659: if EDW_OWB_COLLECTION_UTIL.create_table(g_dup_hold_table,l_stmt,l_count)=false then

10655: l_stmt:=l_stmt||' parallel (degree '||g_parallel||') ';
10656: end if;
10657: l_stmt:=l_stmt||' ';
10658: l_stmt:=l_stmt||' as select row_id from '||l_data_table||' MINUS select row_id from '||l_data_table_D;
10659: if EDW_OWB_COLLECTION_UTIL.create_table(g_dup_hold_table,l_stmt,l_count)=false then
10660: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;
10661: g_status:=false;
10662: return 0;
10663: end if;

Line 10660: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;

10656: end if;
10657: l_stmt:=l_stmt||' ';
10658: l_stmt:=l_stmt||' as select row_id from '||l_data_table||' MINUS select row_id from '||l_data_table_D;
10659: if EDW_OWB_COLLECTION_UTIL.create_table(g_dup_hold_table,l_stmt,l_count)=false then
10660: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;
10661: g_status:=false;
10662: return 0;
10663: end if;
10664: --4161164 : remove IOT , replace with ordinary table and index

Line 10665: EDW_OWB_COLLECTION_UTIL.create_iot_index(g_dup_hold_table,'row_id',g_op_table_space,g_parallel);

10661: g_status:=false;
10662: return 0;
10663: end if;
10664: --4161164 : remove IOT , replace with ordinary table and index
10665: EDW_OWB_COLLECTION_UTIL.create_iot_index(g_dup_hold_table,'row_id',g_op_table_space,g_parallel);
10666: if EDW_OWB_COLLECTION_UTIL.drop_table(l_data_table_B) = false then
10667: null;
10668: end if;
10669: if EDW_OWB_COLLECTION_UTIL.drop_table(l_data_table_D) = false then

Line 10666: if EDW_OWB_COLLECTION_UTIL.drop_table(l_data_table_B) = false then

10662: return 0;
10663: end if;
10664: --4161164 : remove IOT , replace with ordinary table and index
10665: EDW_OWB_COLLECTION_UTIL.create_iot_index(g_dup_hold_table,'row_id',g_op_table_space,g_parallel);
10666: if EDW_OWB_COLLECTION_UTIL.drop_table(l_data_table_B) = false then
10667: null;
10668: end if;
10669: if EDW_OWB_COLLECTION_UTIL.drop_table(l_data_table_D) = false then
10670: null;

Line 10669: if EDW_OWB_COLLECTION_UTIL.drop_table(l_data_table_D) = false then

10665: EDW_OWB_COLLECTION_UTIL.create_iot_index(g_dup_hold_table,'row_id',g_op_table_space,g_parallel);
10666: if EDW_OWB_COLLECTION_UTIL.drop_table(l_data_table_B) = false then
10667: null;
10668: end if;
10669: if EDW_OWB_COLLECTION_UTIL.drop_table(l_data_table_D) = false then
10670: null;
10671: end if;
10672: if EDW_OWB_COLLECTION_UTIL.drop_table(l_dup_value_table) = false then
10673: null;

Line 10672: if EDW_OWB_COLLECTION_UTIL.drop_table(l_dup_value_table) = false then

10668: end if;
10669: if EDW_OWB_COLLECTION_UTIL.drop_table(l_data_table_D) = false then
10670: null;
10671: end if;
10672: if EDW_OWB_COLLECTION_UTIL.drop_table(l_dup_value_table) = false then
10673: null;
10674: end if;
10675: if EDW_OWB_COLLECTION_UTIL.drop_table(l_data_table) = false then
10676: null;

Line 10675: if EDW_OWB_COLLECTION_UTIL.drop_table(l_data_table) = false then

10671: end if;
10672: if EDW_OWB_COLLECTION_UTIL.drop_table(l_dup_value_table) = false then
10673: null;
10674: end if;
10675: if EDW_OWB_COLLECTION_UTIL.drop_table(l_data_table) = false then
10676: null;
10677: end if;
10678: return 2;
10679: else --if g_master_instance is not null then

Line 10680: if EDW_OWB_COLLECTION_UTIL.drop_table(l_dup_value_table) = false then

10676: null;
10677: end if;
10678: return 2;
10679: else --if g_master_instance is not null then
10680: if EDW_OWB_COLLECTION_UTIL.drop_table(l_dup_value_table) = false then
10681: null;
10682: end if;
10683: if EDW_OWB_COLLECTION_UTIL.drop_table(l_data_table) = false then
10684: null;

Line 10683: if EDW_OWB_COLLECTION_UTIL.drop_table(l_data_table) = false then

10679: else --if g_master_instance is not null then
10680: if EDW_OWB_COLLECTION_UTIL.drop_table(l_dup_value_table) = false then
10681: null;
10682: end if;
10683: if EDW_OWB_COLLECTION_UTIL.drop_table(l_data_table) = false then
10684: null;
10685: end if;
10686: return 1;
10687: end if;

Line 10698: if EDW_OWB_COLLECTION_UTIL.create_table(l_data_table_DM,l_stmt,l_count)=false then

10694: l_stmt:=l_stmt||' parallel (degree '||g_parallel||') ';
10695: end if;
10696: l_stmt:=l_stmt||' as select * from '||l_data_table_D||' where '||
10697: g_instance_column||'='''||g_master_instance||'''';
10698: if EDW_OWB_COLLECTION_UTIL.create_table(l_data_table_DM,l_stmt,l_count)=false then
10699: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;
10700: g_status:=false;
10701: return 0;
10702: end if;

Line 10699: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;

10695: end if;
10696: l_stmt:=l_stmt||' as select * from '||l_data_table_D||' where '||
10697: g_instance_column||'='''||g_master_instance||'''';
10698: if EDW_OWB_COLLECTION_UTIL.create_table(l_data_table_DM,l_stmt,l_count)=false then
10699: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;
10700: g_status:=false;
10701: return 0;
10702: end if;
10703: l_stmt:='create table '||l_data_table_DR;

Line 10718: if EDW_OWB_COLLECTION_UTIL.create_table(l_data_table_DR,l_stmt,l_count)=false then

10714: l_stmt:=l_stmt||p_cols(i)||',';
10715: end loop;
10716: l_stmt:=substr(l_stmt,1,length(l_stmt)-1);
10717: l_stmt:=l_stmt||' from '||l_data_table_DM;
10718: if EDW_OWB_COLLECTION_UTIL.create_table(l_data_table_DR,l_stmt,l_count)=false then
10719: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;
10720: g_status:=false;
10721: return 0;
10722: end if;

Line 10719: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;

10715: end loop;
10716: l_stmt:=substr(l_stmt,1,length(l_stmt)-1);
10717: l_stmt:=l_stmt||' from '||l_data_table_DM;
10718: if EDW_OWB_COLLECTION_UTIL.create_table(l_data_table_DR,l_stmt,l_count)=false then
10719: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;
10720: g_status:=false;
10721: return 0;
10722: end if;
10723: l_stmt:='create table '||l_data_table_DN;

Line 10733: if EDW_OWB_COLLECTION_UTIL.create_table(l_data_table_DN,l_stmt,l_count)=false then

10729: for i in 1..p_number_cols loop
10730: l_stmt:=l_stmt||l_data_table_D||'.'||p_cols(i)||'='||l_data_table_DR||'.'||p_cols(i)||' and ';
10731: end loop;
10732: l_stmt:=substr(l_stmt,1,length(l_stmt)-4);
10733: if EDW_OWB_COLLECTION_UTIL.create_table(l_data_table_DN,l_stmt,l_count)=false then
10734: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;
10735: g_status:=false;
10736: return 0;
10737: end if;

Line 10734: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;

10730: l_stmt:=l_stmt||l_data_table_D||'.'||p_cols(i)||'='||l_data_table_DR||'.'||p_cols(i)||' and ';
10731: end loop;
10732: l_stmt:=substr(l_stmt,1,length(l_stmt)-4);
10733: if EDW_OWB_COLLECTION_UTIL.create_table(l_data_table_DN,l_stmt,l_count)=false then
10734: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;
10735: g_status:=false;
10736: return 0;
10737: end if;
10738: if EDW_OWB_COLLECTION_UTIL.drop_table(l_data_table_DR) = false then

Line 10738: if EDW_OWB_COLLECTION_UTIL.drop_table(l_data_table_DR) = false then

10734: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;
10735: g_status:=false;
10736: return 0;
10737: end if;
10738: if EDW_OWB_COLLECTION_UTIL.drop_table(l_data_table_DR) = false then
10739: null;
10740: end if;
10741: end if;--if g_duplicate_collect then
10742: end if;--if g_master_instance is not null

Line 10761: if EDW_OWB_COLLECTION_UTIL.create_table(l_dup_table,l_stmt,l_count)=false then

10757: for i in 1..p_number_cols loop
10758: l_stmt:=l_stmt||l_data_table_D||'.'||p_cols(i)||'='||l_dup_value_table||'.'||p_cols(i)||' and ';
10759: end loop;
10760: l_stmt:=substr(l_stmt,1,length(l_stmt)-4);
10761: if EDW_OWB_COLLECTION_UTIL.create_table(l_dup_table,l_stmt,l_count)=false then
10762: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;
10763: g_status:=false;
10764: return 0;
10765: end if;

Line 10762: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;

10758: l_stmt:=l_stmt||l_data_table_D||'.'||p_cols(i)||'='||l_dup_value_table||'.'||p_cols(i)||' and ';
10759: end loop;
10760: l_stmt:=substr(l_stmt,1,length(l_stmt)-4);
10761: if EDW_OWB_COLLECTION_UTIL.create_table(l_dup_table,l_stmt,l_count)=false then
10762: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;
10763: g_status:=false;
10764: return 0;
10765: end if;
10766: l_stmt:='create table '||l_dup_max_table;

Line 10780: if EDW_OWB_COLLECTION_UTIL.create_table(l_dup_max_table,l_stmt,l_count)=false then

10776: for i in 1..p_number_cols loop
10777: l_stmt:=l_stmt||p_cols(i)||',';
10778: end loop;
10779: l_stmt:=substr(l_stmt,1,length(l_stmt)-1);
10780: if EDW_OWB_COLLECTION_UTIL.create_table(l_dup_max_table,l_stmt,l_count)=false then
10781: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;
10782: g_status:=false;
10783: return 0;
10784: end if;

Line 10781: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;

10777: l_stmt:=l_stmt||p_cols(i)||',';
10778: end loop;
10779: l_stmt:=substr(l_stmt,1,length(l_stmt)-1);
10780: if EDW_OWB_COLLECTION_UTIL.create_table(l_dup_max_table,l_stmt,l_count)=false then
10781: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;
10782: g_status:=false;
10783: return 0;
10784: end if;
10785: l_stmt:='create table '||l_dup_max_rowid_table;

Line 10796: if EDW_OWB_COLLECTION_UTIL.create_table(l_dup_max_rowid_table,l_stmt,l_count)=false then

10792: for i in 1..p_number_cols loop
10793: l_stmt:=l_stmt||l_dup_table||'.'||p_cols(i)||'='||l_dup_max_table||'.'||p_cols(i)||' and ';
10794: end loop;
10795: l_stmt:=l_stmt||l_dup_table||'.col='||l_dup_max_table||'.col';
10796: if EDW_OWB_COLLECTION_UTIL.create_table(l_dup_max_rowid_table,l_stmt,l_count)=false then
10797: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;
10798: g_status:=false;
10799: return 0;
10800: end if;

Line 10797: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;

10793: l_stmt:=l_stmt||l_dup_table||'.'||p_cols(i)||'='||l_dup_max_table||'.'||p_cols(i)||' and ';
10794: end loop;
10795: l_stmt:=l_stmt||l_dup_table||'.col='||l_dup_max_table||'.col';
10796: if EDW_OWB_COLLECTION_UTIL.create_table(l_dup_max_rowid_table,l_stmt,l_count)=false then
10797: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;
10798: g_status:=false;
10799: return 0;
10800: end if;
10801: --4161164 : remove IOT , replace with ordinary table and index

Line 10810: if EDW_OWB_COLLECTION_UTIL.create_table(g_dup_hold_table,l_stmt,l_count)=false then

10806: l_stmt:=l_stmt||' parallel (degree '||g_parallel||') ';
10807: end if;
10808: l_stmt:=l_stmt||' ';
10809: l_stmt:=l_stmt||' as select row_id from '||l_dup_table||' MINUS select row_id from '||l_dup_max_rowid_table;
10810: if EDW_OWB_COLLECTION_UTIL.create_table(g_dup_hold_table,l_stmt,l_count)=false then
10811: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;
10812: g_status:=false;
10813: return 0;
10814: end if;

Line 10811: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;

10807: end if;
10808: l_stmt:=l_stmt||' ';
10809: l_stmt:=l_stmt||' as select row_id from '||l_dup_table||' MINUS select row_id from '||l_dup_max_rowid_table;
10810: if EDW_OWB_COLLECTION_UTIL.create_table(g_dup_hold_table,l_stmt,l_count)=false then
10811: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;
10812: g_status:=false;
10813: return 0;
10814: end if;
10815: --4161164 : remove IOT , replace with ordinary table and index

Line 10816: EDW_OWB_COLLECTION_UTIL.create_iot_index(g_dup_hold_table,'row_id',g_op_table_space,g_parallel);

10812: g_status:=false;
10813: return 0;
10814: end if;
10815: --4161164 : remove IOT , replace with ordinary table and index
10816: EDW_OWB_COLLECTION_UTIL.create_iot_index(g_dup_hold_table,'row_id',g_op_table_space,g_parallel);
10817: if EDW_OWB_COLLECTION_UTIL.drop_table(l_dup_table) = false then
10818: null;
10819: end if;
10820: if EDW_OWB_COLLECTION_UTIL.drop_table(l_dup_max_table) = false then

Line 10817: if EDW_OWB_COLLECTION_UTIL.drop_table(l_dup_table) = false then

10813: return 0;
10814: end if;
10815: --4161164 : remove IOT , replace with ordinary table and index
10816: EDW_OWB_COLLECTION_UTIL.create_iot_index(g_dup_hold_table,'row_id',g_op_table_space,g_parallel);
10817: if EDW_OWB_COLLECTION_UTIL.drop_table(l_dup_table) = false then
10818: null;
10819: end if;
10820: if EDW_OWB_COLLECTION_UTIL.drop_table(l_dup_max_table) = false then
10821: null;

Line 10820: if EDW_OWB_COLLECTION_UTIL.drop_table(l_dup_max_table) = false then

10816: EDW_OWB_COLLECTION_UTIL.create_iot_index(g_dup_hold_table,'row_id',g_op_table_space,g_parallel);
10817: if EDW_OWB_COLLECTION_UTIL.drop_table(l_dup_table) = false then
10818: null;
10819: end if;
10820: if EDW_OWB_COLLECTION_UTIL.drop_table(l_dup_max_table) = false then
10821: null;
10822: end if;
10823: if EDW_OWB_COLLECTION_UTIL.drop_table(l_dup_max_rowid_table) = false then
10824: null;

Line 10823: if EDW_OWB_COLLECTION_UTIL.drop_table(l_dup_max_rowid_table) = false then

10819: end if;
10820: if EDW_OWB_COLLECTION_UTIL.drop_table(l_dup_max_table) = false then
10821: null;
10822: end if;
10823: if EDW_OWB_COLLECTION_UTIL.drop_table(l_dup_max_rowid_table) = false then
10824: null;
10825: end if;
10826: else --there is master instance
10827: l_stmt:='create table '||l_data_table_F;

Line 10841: if EDW_OWB_COLLECTION_UTIL.create_table(l_data_table_F,l_stmt,l_count)=false then

10837: for i in 1..p_number_cols loop
10838: l_stmt:=l_stmt||p_cols(i)||',';
10839: end loop;
10840: l_stmt:=substr(l_stmt,1,length(l_stmt)-1);
10841: if EDW_OWB_COLLECTION_UTIL.create_table(l_data_table_F,l_stmt,l_count)=false then
10842: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;
10843: g_status:=false;
10844: return 0;
10845: end if;

Line 10842: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;

10838: l_stmt:=l_stmt||p_cols(i)||',';
10839: end loop;
10840: l_stmt:=substr(l_stmt,1,length(l_stmt)-1);
10841: if EDW_OWB_COLLECTION_UTIL.create_table(l_data_table_F,l_stmt,l_count)=false then
10842: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;
10843: g_status:=false;
10844: return 0;
10845: end if;
10846: if l_data_table_DM_count=l_count then

Line 10860: if EDW_OWB_COLLECTION_UTIL.create_table(l_data_table_G,l_stmt,l_count)=false then

10856: for i in 1..p_number_cols loop
10857: l_stmt:=l_stmt||l_data_table_F||'.'||p_cols(i)||'='||l_data_table_DM||'.'||p_cols(i)||' and ';
10858: end loop;
10859: l_stmt:=substr(l_stmt,1,length(l_stmt)-4);
10860: if EDW_OWB_COLLECTION_UTIL.create_table(l_data_table_G,l_stmt,l_count)=false then
10861: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;
10862: g_status:=false;
10863: return 0;
10864: end if;

Line 10861: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;

10857: l_stmt:=l_stmt||l_data_table_F||'.'||p_cols(i)||'='||l_data_table_DM||'.'||p_cols(i)||' and ';
10858: end loop;
10859: l_stmt:=substr(l_stmt,1,length(l_stmt)-4);
10860: if EDW_OWB_COLLECTION_UTIL.create_table(l_data_table_G,l_stmt,l_count)=false then
10861: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;
10862: g_status:=false;
10863: return 0;
10864: end if;
10865: end if;

Line 10866: if EDW_OWB_COLLECTION_UTIL.drop_table(l_data_table_F) = false then

10862: g_status:=false;
10863: return 0;
10864: end if;
10865: end if;
10866: if EDW_OWB_COLLECTION_UTIL.drop_table(l_data_table_F) = false then
10867: null;
10868: end if;
10869: l_stmt:='create table '||l_data_table_H;
10870: if g_parallel is not null then

Line 10883: if EDW_OWB_COLLECTION_UTIL.create_table(l_data_table_H,l_stmt,l_count)=false then

10879: for i in 1..p_number_cols loop
10880: l_stmt:=l_stmt||p_cols(i)||',';
10881: end loop;
10882: l_stmt:=substr(l_stmt,1,length(l_stmt)-1);
10883: if EDW_OWB_COLLECTION_UTIL.create_table(l_data_table_H,l_stmt,l_count)=false then
10884: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;
10885: g_status:=false;
10886: return 0;
10887: end if;

Line 10884: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;

10880: l_stmt:=l_stmt||p_cols(i)||',';
10881: end loop;
10882: l_stmt:=substr(l_stmt,1,length(l_stmt)-1);
10883: if EDW_OWB_COLLECTION_UTIL.create_table(l_data_table_H,l_stmt,l_count)=false then
10884: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;
10885: g_status:=false;
10886: return 0;
10887: end if;
10888: if l_data_table_DN_count=l_count then

Line 10902: if EDW_OWB_COLLECTION_UTIL.create_table(l_data_table_I,l_stmt,l_count)=false then

10898: for i in 1..p_number_cols loop
10899: l_stmt:=l_stmt||l_data_table_H||'.'||p_cols(i)||'='||l_data_table_DN||'.'||p_cols(i)||' and ';
10900: end loop;
10901: l_stmt:=substr(l_stmt,1,length(l_stmt)-4);
10902: if EDW_OWB_COLLECTION_UTIL.create_table(l_data_table_I,l_stmt,l_count)=false then
10903: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;
10904: g_status:=false;
10905: return 0;
10906: end if;

Line 10903: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;

10899: l_stmt:=l_stmt||l_data_table_H||'.'||p_cols(i)||'='||l_data_table_DN||'.'||p_cols(i)||' and ';
10900: end loop;
10901: l_stmt:=substr(l_stmt,1,length(l_stmt)-4);
10902: if EDW_OWB_COLLECTION_UTIL.create_table(l_data_table_I,l_stmt,l_count)=false then
10903: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;
10904: g_status:=false;
10905: return 0;
10906: end if;
10907: end if;--else for if l_data_table_DN_count=l_count then

Line 10908: if EDW_OWB_COLLECTION_UTIL.drop_table(l_data_table_H) = false then

10904: g_status:=false;
10905: return 0;
10906: end if;
10907: end if;--else for if l_data_table_DN_count=l_count then
10908: if EDW_OWB_COLLECTION_UTIL.drop_table(l_data_table_H) = false then
10909: null;
10910: end if;
10911: l_stmt:='create table '||l_data_table_J;
10912: if g_parallel is not null then

Line 10917: if EDW_OWB_COLLECTION_UTIL.create_table(l_data_table_J,l_stmt,l_count)=false then

10913: l_stmt:=l_stmt||' parallel (degree '||g_parallel||') ';
10914: end if;
10915: l_stmt:=l_stmt||' ';
10916: l_stmt:=l_stmt||' as select row_id from '||l_data_table_G||' UNION ALL select row_id from '||l_data_table_I;
10917: if EDW_OWB_COLLECTION_UTIL.create_table(l_data_table_J,l_stmt,l_count)=false then
10918: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;
10919: g_status:=false;
10920: return 0;
10921: end if;

Line 10918: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;

10914: end if;
10915: l_stmt:=l_stmt||' ';
10916: l_stmt:=l_stmt||' as select row_id from '||l_data_table_G||' UNION ALL select row_id from '||l_data_table_I;
10917: if EDW_OWB_COLLECTION_UTIL.create_table(l_data_table_J,l_stmt,l_count)=false then
10918: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;
10919: g_status:=false;
10920: return 0;
10921: end if;
10922: if EDW_OWB_COLLECTION_UTIL.drop_table(l_data_table_G) = false then

Line 10922: if EDW_OWB_COLLECTION_UTIL.drop_table(l_data_table_G) = false then

10918: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;
10919: g_status:=false;
10920: return 0;
10921: end if;
10922: if EDW_OWB_COLLECTION_UTIL.drop_table(l_data_table_G) = false then
10923: null;
10924: end if;
10925: if EDW_OWB_COLLECTION_UTIL.drop_table(l_data_table_I) = false then
10926: null;

Line 10925: if EDW_OWB_COLLECTION_UTIL.drop_table(l_data_table_I) = false then

10921: end if;
10922: if EDW_OWB_COLLECTION_UTIL.drop_table(l_data_table_G) = false then
10923: null;
10924: end if;
10925: if EDW_OWB_COLLECTION_UTIL.drop_table(l_data_table_I) = false then
10926: null;
10927: end if;
10928: --4161164 : remove IOT , replace with ordinary table and index
10929: --l_stmt:='create table '||g_dup_hold_table||'(row_id primary key) organization index '||

Line 10937: if EDW_OWB_COLLECTION_UTIL.create_table(g_dup_hold_table,l_stmt,l_count)=false then

10933: l_stmt:=l_stmt||' parallel (degree '||g_parallel||') ';
10934: end if;
10935: l_stmt:=l_stmt||' ';
10936: l_stmt:=l_stmt||' as select row_id from '||l_data_table||' MINUS select row_id from '||l_data_table_J;
10937: if EDW_OWB_COLLECTION_UTIL.create_table(g_dup_hold_table,l_stmt,l_count)=false then
10938: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;
10939: g_status:=false;
10940: return 0;
10941: end if;

Line 10938: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;

10934: end if;
10935: l_stmt:=l_stmt||' ';
10936: l_stmt:=l_stmt||' as select row_id from '||l_data_table||' MINUS select row_id from '||l_data_table_J;
10937: if EDW_OWB_COLLECTION_UTIL.create_table(g_dup_hold_table,l_stmt,l_count)=false then
10938: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;
10939: g_status:=false;
10940: return 0;
10941: end if;
10942: --4161164 : remove IOT , replace with ordinary table and index

Line 10943: EDW_OWB_COLLECTION_UTIL.create_iot_index(g_dup_hold_table,'row_id',g_op_table_space,g_parallel);

10939: g_status:=false;
10940: return 0;
10941: end if;
10942: --4161164 : remove IOT , replace with ordinary table and index
10943: EDW_OWB_COLLECTION_UTIL.create_iot_index(g_dup_hold_table,'row_id',g_op_table_space,g_parallel);
10944: if EDW_OWB_COLLECTION_UTIL.drop_table(l_data_table_J) = false then
10945: null;
10946: end if;
10947: if EDW_OWB_COLLECTION_UTIL.drop_table(l_data_table_DM) = false then

Line 10944: if EDW_OWB_COLLECTION_UTIL.drop_table(l_data_table_J) = false then

10940: return 0;
10941: end if;
10942: --4161164 : remove IOT , replace with ordinary table and index
10943: EDW_OWB_COLLECTION_UTIL.create_iot_index(g_dup_hold_table,'row_id',g_op_table_space,g_parallel);
10944: if EDW_OWB_COLLECTION_UTIL.drop_table(l_data_table_J) = false then
10945: null;
10946: end if;
10947: if EDW_OWB_COLLECTION_UTIL.drop_table(l_data_table_DM) = false then
10948: null;

Line 10947: if EDW_OWB_COLLECTION_UTIL.drop_table(l_data_table_DM) = false then

10943: EDW_OWB_COLLECTION_UTIL.create_iot_index(g_dup_hold_table,'row_id',g_op_table_space,g_parallel);
10944: if EDW_OWB_COLLECTION_UTIL.drop_table(l_data_table_J) = false then
10945: null;
10946: end if;
10947: if EDW_OWB_COLLECTION_UTIL.drop_table(l_data_table_DM) = false then
10948: null;
10949: end if;
10950: if EDW_OWB_COLLECTION_UTIL.drop_table(l_data_table_DN) = false then
10951: null;

Line 10950: if EDW_OWB_COLLECTION_UTIL.drop_table(l_data_table_DN) = false then

10946: end if;
10947: if EDW_OWB_COLLECTION_UTIL.drop_table(l_data_table_DM) = false then
10948: null;
10949: end if;
10950: if EDW_OWB_COLLECTION_UTIL.drop_table(l_data_table_DN) = false then
10951: null;
10952: end if;
10953: end if;--there is master instance
10954: else --else for if g_duplicate_collect then

Line 10969: if g_master_instance is not null and EDW_OWB_COLLECTION_UTIL.check_table(l_data_table_B) then

10965: l_data_table_D||' where ';
10966: for i in 1..p_number_cols loop
10967: l_stmt:=l_stmt||l_data_table_D||'.'||p_cols(i)||'='||l_dup_value_table||'.'||p_cols(i);
10968: end loop;
10969: if g_master_instance is not null and EDW_OWB_COLLECTION_UTIL.check_table(l_data_table_B) then
10970: l_stmt:=l_stmt||' UNION ALL select row_id1 row_id from '||l_data_table_B;
10971: end if;
10972: if EDW_OWB_COLLECTION_UTIL.create_table(g_dup_hold_table,l_stmt,l_count)=false then
10973: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;

Line 10972: if EDW_OWB_COLLECTION_UTIL.create_table(g_dup_hold_table,l_stmt,l_count)=false then

10968: end loop;
10969: if g_master_instance is not null and EDW_OWB_COLLECTION_UTIL.check_table(l_data_table_B) then
10970: l_stmt:=l_stmt||' UNION ALL select row_id1 row_id from '||l_data_table_B;
10971: end if;
10972: if EDW_OWB_COLLECTION_UTIL.create_table(g_dup_hold_table,l_stmt,l_count)=false then
10973: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;
10974: g_status:=false;
10975: return 0;
10976: end if;

Line 10973: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;

10969: if g_master_instance is not null and EDW_OWB_COLLECTION_UTIL.check_table(l_data_table_B) then
10970: l_stmt:=l_stmt||' UNION ALL select row_id1 row_id from '||l_data_table_B;
10971: end if;
10972: if EDW_OWB_COLLECTION_UTIL.create_table(g_dup_hold_table,l_stmt,l_count)=false then
10973: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;
10974: g_status:=false;
10975: return 0;
10976: end if;
10977: --4161164 : remove IOT , replace with ordinary table and index

Line 10978: EDW_OWB_COLLECTION_UTIL.create_iot_index(g_dup_hold_table,'row_id',g_op_table_space,g_parallel);

10974: g_status:=false;
10975: return 0;
10976: end if;
10977: --4161164 : remove IOT , replace with ordinary table and index
10978: EDW_OWB_COLLECTION_UTIL.create_iot_index(g_dup_hold_table,'row_id',g_op_table_space,g_parallel);
10979: end if;
10980: if EDW_OWB_COLLECTION_UTIL.drop_table(l_data_table) = false then
10981: null;
10982: end if;

Line 10980: if EDW_OWB_COLLECTION_UTIL.drop_table(l_data_table) = false then

10976: end if;
10977: --4161164 : remove IOT , replace with ordinary table and index
10978: EDW_OWB_COLLECTION_UTIL.create_iot_index(g_dup_hold_table,'row_id',g_op_table_space,g_parallel);
10979: end if;
10980: if EDW_OWB_COLLECTION_UTIL.drop_table(l_data_table) = false then
10981: null;
10982: end if;
10983: if EDW_OWB_COLLECTION_UTIL.drop_table(l_dup_value_table) = false then
10984: null;

Line 10983: if EDW_OWB_COLLECTION_UTIL.drop_table(l_dup_value_table) = false then

10979: end if;
10980: if EDW_OWB_COLLECTION_UTIL.drop_table(l_data_table) = false then
10981: null;
10982: end if;
10983: if EDW_OWB_COLLECTION_UTIL.drop_table(l_dup_value_table) = false then
10984: null;
10985: end if;
10986: if EDW_OWB_COLLECTION_UTIL.drop_table(l_data_table_B) = false then
10987: null;

Line 10986: if EDW_OWB_COLLECTION_UTIL.drop_table(l_data_table_B) = false then

10982: end if;
10983: if EDW_OWB_COLLECTION_UTIL.drop_table(l_dup_value_table) = false then
10984: null;
10985: end if;
10986: if EDW_OWB_COLLECTION_UTIL.drop_table(l_data_table_B) = false then
10987: null;
10988: end if;
10989: if EDW_OWB_COLLECTION_UTIL.drop_table(l_data_table_D) = false then
10990: null;

Line 10989: if EDW_OWB_COLLECTION_UTIL.drop_table(l_data_table_D) = false then

10985: end if;
10986: if EDW_OWB_COLLECTION_UTIL.drop_table(l_data_table_B) = false then
10987: null;
10988: end if;
10989: if EDW_OWB_COLLECTION_UTIL.drop_table(l_data_table_D) = false then
10990: null;
10991: end if;
10992: l_dup_hold_table_count:=EDW_OWB_COLLECTION_UTIL.get_table_count(g_dup_hold_table);
10993: g_dup_multi_thread_flag:=false;

Line 10992: l_dup_hold_table_count:=EDW_OWB_COLLECTION_UTIL.get_table_count(g_dup_hold_table);

10988: end if;
10989: if EDW_OWB_COLLECTION_UTIL.drop_table(l_data_table_D) = false then
10990: null;
10991: end if;
10992: l_dup_hold_table_count:=EDW_OWB_COLLECTION_UTIL.get_table_count(g_dup_hold_table);
10993: g_dup_multi_thread_flag:=false;
10994: if g_max_threads>1 then
10995: if l_dup_hold_table_count>=2*g_min_job_load_size then
10996: g_dup_multi_thread_flag:=true;

Line 11030: l_pk_key_found:=EDW_OWB_COLLECTION_UTIL.check_table_column(g_fact_dlog,'pk_key');

11026: write_to_log_file_n('In recreate_dlog_table'||get_time);
11027: end if;
11028: l_dlog_table:=g_dlog_rowid_table||'T';
11029: l_rowid_table:=g_dlog_rowid_table||'R';
11030: l_pk_key_found:=EDW_OWB_COLLECTION_UTIL.check_table_column(g_fact_dlog,'pk_key');
11031: if instr(g_fact_dlog,'.')<>0 then
11032: l_owner:=substr(g_fact_dlog,1,instr(g_fact_dlog,'.')-1);
11033: else
11034: l_owner:=EDW_OWB_COLLECTION_UTIL.get_table_owner(g_fact_dlog);

Line 11034: l_owner:=EDW_OWB_COLLECTION_UTIL.get_table_owner(g_fact_dlog);

11030: l_pk_key_found:=EDW_OWB_COLLECTION_UTIL.check_table_column(g_fact_dlog,'pk_key');
11031: if instr(g_fact_dlog,'.')<>0 then
11032: l_owner:=substr(g_fact_dlog,1,instr(g_fact_dlog,'.')-1);
11033: else
11034: l_owner:=EDW_OWB_COLLECTION_UTIL.get_table_owner(g_fact_dlog);
11035: end if;
11036: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(g_fact_dlog,l_owner,1);
11037: l_fact_dlog_count:=EDW_OWB_COLLECTION_UTIL.get_table_count_stats(g_fact_dlog,l_owner);
11038: l_fact_count:=EDW_OWB_COLLECTION_UTIL.get_table_count_stats(g_FactTableName,g_table_owner);

Line 11036: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(g_fact_dlog,l_owner,1);

11032: l_owner:=substr(g_fact_dlog,1,instr(g_fact_dlog,'.')-1);
11033: else
11034: l_owner:=EDW_OWB_COLLECTION_UTIL.get_table_owner(g_fact_dlog);
11035: end if;
11036: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(g_fact_dlog,l_owner,1);
11037: l_fact_dlog_count:=EDW_OWB_COLLECTION_UTIL.get_table_count_stats(g_fact_dlog,l_owner);
11038: l_fact_count:=EDW_OWB_COLLECTION_UTIL.get_table_count_stats(g_FactTableName,g_table_owner);
11039: l_table:=substr(g_fact_dlog,instr(g_fact_dlog,'.')+1,length(g_fact_dlog));
11040: if EDW_OWB_COLLECTION_UTIL.get_table_next_extent(l_table,l_owner,l_next_extent)=false then

Line 11037: l_fact_dlog_count:=EDW_OWB_COLLECTION_UTIL.get_table_count_stats(g_fact_dlog,l_owner);

11033: else
11034: l_owner:=EDW_OWB_COLLECTION_UTIL.get_table_owner(g_fact_dlog);
11035: end if;
11036: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(g_fact_dlog,l_owner,1);
11037: l_fact_dlog_count:=EDW_OWB_COLLECTION_UTIL.get_table_count_stats(g_fact_dlog,l_owner);
11038: l_fact_count:=EDW_OWB_COLLECTION_UTIL.get_table_count_stats(g_FactTableName,g_table_owner);
11039: l_table:=substr(g_fact_dlog,instr(g_fact_dlog,'.')+1,length(g_fact_dlog));
11040: if EDW_OWB_COLLECTION_UTIL.get_table_next_extent(l_table,l_owner,l_next_extent)=false then
11041: l_next_extent:=4194304; --4M

Line 11038: l_fact_count:=EDW_OWB_COLLECTION_UTIL.get_table_count_stats(g_FactTableName,g_table_owner);

11034: l_owner:=EDW_OWB_COLLECTION_UTIL.get_table_owner(g_fact_dlog);
11035: end if;
11036: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(g_fact_dlog,l_owner,1);
11037: l_fact_dlog_count:=EDW_OWB_COLLECTION_UTIL.get_table_count_stats(g_fact_dlog,l_owner);
11038: l_fact_count:=EDW_OWB_COLLECTION_UTIL.get_table_count_stats(g_FactTableName,g_table_owner);
11039: l_table:=substr(g_fact_dlog,instr(g_fact_dlog,'.')+1,length(g_fact_dlog));
11040: if EDW_OWB_COLLECTION_UTIL.get_table_next_extent(l_table,l_owner,l_next_extent)=false then
11041: l_next_extent:=4194304; --4M
11042: end if;

Line 11040: if EDW_OWB_COLLECTION_UTIL.get_table_next_extent(l_table,l_owner,l_next_extent)=false then

11036: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(g_fact_dlog,l_owner,1);
11037: l_fact_dlog_count:=EDW_OWB_COLLECTION_UTIL.get_table_count_stats(g_fact_dlog,l_owner);
11038: l_fact_count:=EDW_OWB_COLLECTION_UTIL.get_table_count_stats(g_FactTableName,g_table_owner);
11039: l_table:=substr(g_fact_dlog,instr(g_fact_dlog,'.')+1,length(g_fact_dlog));
11040: if EDW_OWB_COLLECTION_UTIL.get_table_next_extent(l_table,l_owner,l_next_extent)=false then
11041: l_next_extent:=4194304; --4M
11042: end if;
11043: if l_next_extent is null then
11044: l_next_extent:=4194304; --4M

Line 11065: if EDW_OWB_COLLECTION_UTIL.drop_table(l_rowid_table)=false then

11061: l_stmt:=l_stmt||' parallel (degree '||g_parallel||') ';
11062: end if;
11063: l_stmt:=l_stmt||' as select rowid row_id1, row_id from '||g_fact_dlog||' where row_id in '||
11064: '(select rowid from '||g_object_name||')';
11065: if EDW_OWB_COLLECTION_UTIL.drop_table(l_rowid_table)=false then
11066: null;
11067: end if;
11068: if g_debug then
11069: write_to_log_file_n('Going to execute '||l_stmt||get_time);

Line 11076: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(l_rowid_table,instr(l_rowid_table,'.')+1,

11072: l_rowid_table_count:=sql%rowcount;
11073: if g_debug then
11074: write_to_log_file('Created with '||l_rowid_table_count||' rows '||get_time);
11075: end if;
11076: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(l_rowid_table,instr(l_rowid_table,'.')+1,
11077: length(l_rowid_table)),substr(l_rowid_table,1,instr(l_rowid_table,'.')-1));
11078: end if;
11079: l_use_nl_dlog:=true;
11080: l_use_nl_fact:=true;

Line 11082: l_use_nl_dlog:=EDW_OWB_COLLECTION_UTIL.get_join_nl(l_rowid_table_count,l_fact_dlog_count,

11078: end if;
11079: l_use_nl_dlog:=true;
11080: l_use_nl_fact:=true;
11081: if l_pk_key_found=false then
11082: l_use_nl_dlog:=EDW_OWB_COLLECTION_UTIL.get_join_nl(l_rowid_table_count,l_fact_dlog_count,
11083: g_stg_join_nl_percentage);
11084: l_use_nl_fact:=EDW_OWB_COLLECTION_UTIL.get_join_nl(l_rowid_table_count,l_fact_count,
11085: g_stg_join_nl_percentage);
11086: else

Line 11084: l_use_nl_fact:=EDW_OWB_COLLECTION_UTIL.get_join_nl(l_rowid_table_count,l_fact_count,

11080: l_use_nl_fact:=true;
11081: if l_pk_key_found=false then
11082: l_use_nl_dlog:=EDW_OWB_COLLECTION_UTIL.get_join_nl(l_rowid_table_count,l_fact_dlog_count,
11083: g_stg_join_nl_percentage);
11084: l_use_nl_fact:=EDW_OWB_COLLECTION_UTIL.get_join_nl(l_rowid_table_count,l_fact_count,
11085: g_stg_join_nl_percentage);
11086: else
11087: l_use_nl_fact:=EDW_OWB_COLLECTION_UTIL.get_join_nl(l_fact_dlog_count,l_fact_count,
11088: g_stg_join_nl_percentage);

Line 11087: l_use_nl_fact:=EDW_OWB_COLLECTION_UTIL.get_join_nl(l_fact_dlog_count,l_fact_count,

11083: g_stg_join_nl_percentage);
11084: l_use_nl_fact:=EDW_OWB_COLLECTION_UTIL.get_join_nl(l_rowid_table_count,l_fact_count,
11085: g_stg_join_nl_percentage);
11086: else
11087: l_use_nl_fact:=EDW_OWB_COLLECTION_UTIL.get_join_nl(l_fact_dlog_count,l_fact_count,
11088: g_stg_join_nl_percentage);
11089: end if;
11090: if l_use_nl_fact and l_pk_key_found then
11091: if EDW_OWB_COLLECTION_UTIL.check_index_on_column(g_FactTableName,g_table_owner,g_factPKNameKey)=false then

Line 11091: if EDW_OWB_COLLECTION_UTIL.check_index_on_column(g_FactTableName,g_table_owner,g_factPKNameKey)=false then

11087: l_use_nl_fact:=EDW_OWB_COLLECTION_UTIL.get_join_nl(l_fact_dlog_count,l_fact_count,
11088: g_stg_join_nl_percentage);
11089: end if;
11090: if l_use_nl_fact and l_pk_key_found then
11091: if EDW_OWB_COLLECTION_UTIL.check_index_on_column(g_FactTableName,g_table_owner,g_factPKNameKey)=false then
11092: l_use_nl_fact:=false;
11093: end if;
11094: end if;
11095: --g_dlog_columns,g_number_dlog_columns

Line 11134: if EDW_OWB_COLLECTION_UTIL.drop_table(l_dlog_table)=false then

11130: l_stmt:=l_stmt||'A.'||g_factPKNameKey||'=B.pk_key';
11131: else
11132: l_stmt:=l_stmt||'C.row_id1=B.rowid and A.rowid=C.row_id';
11133: end if;
11134: if EDW_OWB_COLLECTION_UTIL.drop_table(l_dlog_table)=false then
11135: null;
11136: end if;
11137: if g_debug then
11138: write_to_log_file_n('Going to execute '||l_stmt||get_time);

Line 11144: if EDW_OWB_COLLECTION_UTIL.drop_table(l_rowid_table)=false then

11140: execute immediate l_stmt;
11141: if g_debug then
11142: write_to_log_file('Created with '||sql%rowcount||' rows '||get_time);
11143: end if;
11144: if EDW_OWB_COLLECTION_UTIL.drop_table(l_rowid_table)=false then
11145: null;
11146: end if;
11147: /*the following line is modified for fixing bug 2406119.
11148: 'ORA-03291: Invalid truncate option - missing STORAGE keyword'

Line 11151: if EDW_OWB_COLLECTION_UTIL.truncate_table(g_fact_dlog,l_owner)=false then*/

11147: /*the following line is modified for fixing bug 2406119.
11148: 'ORA-03291: Invalid truncate option - missing STORAGE keyword'
11149: Since g_fact_dlog already contains owner information, l_owner should be passed in as null.
11150: This modified code should work on patch 2365233
11151: if EDW_OWB_COLLECTION_UTIL.truncate_table(g_fact_dlog,l_owner)=false then*/
11152: if EDW_OWB_COLLECTION_UTIL.truncate_table(g_fact_dlog,null)=false then
11153: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;
11154: g_status:=false;
11155: return false;

Line 11152: if EDW_OWB_COLLECTION_UTIL.truncate_table(g_fact_dlog,null)=false then

11148: 'ORA-03291: Invalid truncate option - missing STORAGE keyword'
11149: Since g_fact_dlog already contains owner information, l_owner should be passed in as null.
11150: This modified code should work on patch 2365233
11151: if EDW_OWB_COLLECTION_UTIL.truncate_table(g_fact_dlog,l_owner)=false then*/
11152: if EDW_OWB_COLLECTION_UTIL.truncate_table(g_fact_dlog,null)=false then
11153: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;
11154: g_status:=false;
11155: return false;
11156: end if;

Line 11153: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;

11149: Since g_fact_dlog already contains owner information, l_owner should be passed in as null.
11150: This modified code should work on patch 2365233
11151: if EDW_OWB_COLLECTION_UTIL.truncate_table(g_fact_dlog,l_owner)=false then*/
11152: if EDW_OWB_COLLECTION_UTIL.truncate_table(g_fact_dlog,null)=false then
11153: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;
11154: g_status:=false;
11155: return false;
11156: end if;
11157: if l_pk_key_found=false then

Line 11158: if EDW_OWB_COLLECTION_UTIL.check_table_column(g_fact_dlog,'round')=false then

11154: g_status:=false;
11155: return false;
11156: end if;
11157: if l_pk_key_found=false then
11158: if EDW_OWB_COLLECTION_UTIL.check_table_column(g_fact_dlog,'round')=false then
11159: if EDW_OWB_COLLECTION_UTIL.add_column_to_table(l_table,l_owner,'ROUND','NUMBER')=false then
11160: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;
11161: g_status:=false;
11162: return false;

Line 11159: if EDW_OWB_COLLECTION_UTIL.add_column_to_table(l_table,l_owner,'ROUND','NUMBER')=false then

11155: return false;
11156: end if;
11157: if l_pk_key_found=false then
11158: if EDW_OWB_COLLECTION_UTIL.check_table_column(g_fact_dlog,'round')=false then
11159: if EDW_OWB_COLLECTION_UTIL.add_column_to_table(l_table,l_owner,'ROUND','NUMBER')=false then
11160: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;
11161: g_status:=false;
11162: return false;
11163: end if;

Line 11160: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;

11156: end if;
11157: if l_pk_key_found=false then
11158: if EDW_OWB_COLLECTION_UTIL.check_table_column(g_fact_dlog,'round')=false then
11159: if EDW_OWB_COLLECTION_UTIL.add_column_to_table(l_table,l_owner,'ROUND','NUMBER')=false then
11160: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;
11161: g_status:=false;
11162: return false;
11163: end if;
11164: end if;

Line 11165: if EDW_OWB_COLLECTION_UTIL.add_column_to_table(l_table,l_owner,'PK_KEY','NUMBER')=false then

11161: g_status:=false;
11162: return false;
11163: end if;
11164: end if;
11165: if EDW_OWB_COLLECTION_UTIL.add_column_to_table(l_table,l_owner,'PK_KEY','NUMBER')=false then
11166: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;
11167: g_status:=false;
11168: return false;
11169: end if;

Line 11166: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;

11162: return false;
11163: end if;
11164: end if;
11165: if EDW_OWB_COLLECTION_UTIL.add_column_to_table(l_table,l_owner,'PK_KEY','NUMBER')=false then
11166: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;
11167: g_status:=false;
11168: return false;
11169: end if;
11170: end if;

Line 11202: if EDW_OWB_COLLECTION_UTIL.drop_table(l_dlog_table)=false then

11198: if g_debug then
11199: write_to_log_file('Inserted '||sql%rowcount||' rows '||get_time);
11200: end if;
11201: commit;
11202: if EDW_OWB_COLLECTION_UTIL.drop_table(l_dlog_table)=false then
11203: null;
11204: end if;
11205: return true;
11206: Exception when others then

Line 11223: l_owner:=EDW_OWB_COLLECTION_UTIL.get_table_owner(g_fact_dlog);

11219: end if;
11220: if instr(g_fact_dlog,'.')<>0 then
11221: l_owner:=substr(g_fact_dlog,1,instr(g_fact_dlog,'.')-1);
11222: else
11223: l_owner:=EDW_OWB_COLLECTION_UTIL.get_table_owner(g_fact_dlog);
11224: end if;
11225: l_table:=substr(g_fact_dlog,instr(g_fact_dlog,'.')+1,length(g_fact_dlog));
11226: if EDW_OWB_COLLECTION_UTIL.check_table_column(g_fact_dlog,'pk_key')=false then
11227: if EDW_OWB_COLLECTION_UTIL.add_column_to_table(l_table,l_owner,'ROUND','NUMBER')=false then

Line 11226: if EDW_OWB_COLLECTION_UTIL.check_table_column(g_fact_dlog,'pk_key')=false then

11222: else
11223: l_owner:=EDW_OWB_COLLECTION_UTIL.get_table_owner(g_fact_dlog);
11224: end if;
11225: l_table:=substr(g_fact_dlog,instr(g_fact_dlog,'.')+1,length(g_fact_dlog));
11226: if EDW_OWB_COLLECTION_UTIL.check_table_column(g_fact_dlog,'pk_key')=false then
11227: if EDW_OWB_COLLECTION_UTIL.add_column_to_table(l_table,l_owner,'ROUND','NUMBER')=false then
11228: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;
11229: g_status:=false;
11230: return false;

Line 11227: if EDW_OWB_COLLECTION_UTIL.add_column_to_table(l_table,l_owner,'ROUND','NUMBER')=false then

11223: l_owner:=EDW_OWB_COLLECTION_UTIL.get_table_owner(g_fact_dlog);
11224: end if;
11225: l_table:=substr(g_fact_dlog,instr(g_fact_dlog,'.')+1,length(g_fact_dlog));
11226: if EDW_OWB_COLLECTION_UTIL.check_table_column(g_fact_dlog,'pk_key')=false then
11227: if EDW_OWB_COLLECTION_UTIL.add_column_to_table(l_table,l_owner,'ROUND','NUMBER')=false then
11228: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;
11229: g_status:=false;
11230: return false;
11231: end if;

Line 11228: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;

11224: end if;
11225: l_table:=substr(g_fact_dlog,instr(g_fact_dlog,'.')+1,length(g_fact_dlog));
11226: if EDW_OWB_COLLECTION_UTIL.check_table_column(g_fact_dlog,'pk_key')=false then
11227: if EDW_OWB_COLLECTION_UTIL.add_column_to_table(l_table,l_owner,'ROUND','NUMBER')=false then
11228: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;
11229: g_status:=false;
11230: return false;
11231: end if;
11232: if EDW_OWB_COLLECTION_UTIL.add_column_to_table(l_table,l_owner,'PK_KEY','NUMBER')=false then

Line 11232: if EDW_OWB_COLLECTION_UTIL.add_column_to_table(l_table,l_owner,'PK_KEY','NUMBER')=false then

11228: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;
11229: g_status:=false;
11230: return false;
11231: end if;
11232: if EDW_OWB_COLLECTION_UTIL.add_column_to_table(l_table,l_owner,'PK_KEY','NUMBER')=false then
11233: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;
11234: g_status:=false;
11235: return false;
11236: end if;

Line 11233: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;

11229: g_status:=false;
11230: return false;
11231: end if;
11232: if EDW_OWB_COLLECTION_UTIL.add_column_to_table(l_table,l_owner,'PK_KEY','NUMBER')=false then
11233: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;
11234: g_status:=false;
11235: return false;
11236: end if;
11237: end if;

Line 11292: if EDW_OWB_COLLECTION_UTIL.drop_table(l_auto_dang_table1)=false then

11288: l_stmt:=l_stmt||','||g_opcode_table||' where '||g_opcode_table||'.row_id='||
11289: g_fstgTableName||'.rowid';
11290: end if;
11291: l_stmt:=l_stmt||' MINUS select row_id from '||p_surr_table;
11292: if EDW_OWB_COLLECTION_UTIL.drop_table(l_auto_dang_table1)=false then
11293: null;
11294: end if;
11295: if g_debug then
11296: write_to_log_file_n(l_stmt||get_time);

Line 11303: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(l_auto_dang_table1,instr(l_auto_dang_table1,'.')+1,

11299: l_count:=sql%rowcount;
11300: if g_debug then
11301: write_to_log_file_n('Created with '||l_count||' rows '||get_time);
11302: end if;
11303: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(l_auto_dang_table1,instr(l_auto_dang_table1,'.')+1,
11304: length(l_auto_dang_table1)),substr(l_auto_dang_table1,1,instr(l_auto_dang_table1,'.')-1));
11305: if l_count>0 then
11306: p_dang_table:=l_auto_dang_table2;
11307: l_stmt:='create table '||l_auto_dang_table2||' tablespace '||g_op_table_space;

Line 11321: if EDW_OWB_COLLECTION_UTIL.drop_table(l_auto_dang_table2)=false then

11317: end if;
11318: end if;
11319: l_stmt:=l_stmt||' from '||l_auto_dang_table1||','||l_user_fk_table_used||' where '||
11320: l_auto_dang_table1||'.row_id='||l_user_fk_table_used||'.'||l_rowid_col;
11321: if EDW_OWB_COLLECTION_UTIL.drop_table(l_auto_dang_table2)=false then
11322: null;
11323: end if;
11324: if g_debug then
11325: write_to_log_file_n(l_stmt||get_time);

Line 11340: if EDW_OWB_COLLECTION_UTIL.drop_table(l_auto_dang_table1)=false then

11336: end;
11337: if g_debug then
11338: write_to_log_file_n('Created with '||sql%rowcount||' rows '||get_time);
11339: end if;
11340: if EDW_OWB_COLLECTION_UTIL.drop_table(l_auto_dang_table1)=false then
11341: null;
11342: end if;
11343: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(l_auto_dang_table2,instr(l_auto_dang_table2,'.')+1,
11344: length(l_auto_dang_table2)),substr(l_auto_dang_table2,1,instr(l_auto_dang_table2,'.')-1));

Line 11343: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(l_auto_dang_table2,instr(l_auto_dang_table2,'.')+1,

11339: end if;
11340: if EDW_OWB_COLLECTION_UTIL.drop_table(l_auto_dang_table1)=false then
11341: null;
11342: end if;
11343: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(l_auto_dang_table2,instr(l_auto_dang_table2,'.')+1,
11344: length(l_auto_dang_table2)),substr(l_auto_dang_table2,1,instr(l_auto_dang_table2,'.')-1));
11345: end if;
11346: return true;
11347: Exception when others then

Line 11359: p_dang_instance out NOCOPY EDW_OWB_COLLECTION_UTIL.varcharTableType,

11355: p_fk_name varchar2,
11356: p_parent_table_id number,
11357: p_parent_table_name varchar2,
11358: p_dang_table varchar2,
11359: p_dang_instance out NOCOPY EDW_OWB_COLLECTION_UTIL.varcharTableType,
11360: p_number_dang_instance out NOCOPY number
11361: ) return boolean is
11362: l_user_fk_table_used varchar2(200);
11363: l_rowid_col varchar2(20);

Line 11370: l_pk_cols EDW_OWB_COLLECTION_UTIL.varcharTableType;

11366: l_auto_dang_table3 varchar2(200);
11367: l_stmt varchar2(20000);
11368: l_count number;
11369: l_table varchar2(200);
11370: l_pk_cols EDW_OWB_COLLECTION_UTIL.varcharTableType;
11371: l_number_pk_cols number;
11372: l_index number;
11373: l_dim_pk_structure EDW_OWB_COLLECTION_UTIL.varcharTableType;
11374: l_number_dim_pk_structure number;

Line 11373: l_dim_pk_structure EDW_OWB_COLLECTION_UTIL.varcharTableType;

11369: l_table varchar2(200);
11370: l_pk_cols EDW_OWB_COLLECTION_UTIL.varcharTableType;
11371: l_number_pk_cols number;
11372: l_index number;
11373: l_dim_pk_structure EDW_OWB_COLLECTION_UTIL.varcharTableType;
11374: l_number_dim_pk_structure number;
11375: l_prev_index number;
11376: Begin
11377: if g_debug then

Line 11407: if EDW_OWB_COLLECTION_UTIL.value_in_table(g_dim_pk_dim,g_dim_pk_instance,g_number_dim_pk_structure,

11403: p_dang_instance(1):=null;
11404: end if;
11405: --get the pk structure
11406: for z in 1..p_number_dang_instance loop
11407: if EDW_OWB_COLLECTION_UTIL.value_in_table(g_dim_pk_dim,g_dim_pk_instance,g_number_dim_pk_structure,
11408: p_parent_table_name,p_dang_instance(z))=false then
11409: l_number_dim_pk_structure:=0;
11410: if EDW_OWB_COLLECTION_UTIL.get_dim_pk_structure(p_parent_table_name,p_dang_instance(z),
11411: l_dim_pk_structure,l_number_dim_pk_structure)=false then

Line 11410: if EDW_OWB_COLLECTION_UTIL.get_dim_pk_structure(p_parent_table_name,p_dang_instance(z),

11406: for z in 1..p_number_dang_instance loop
11407: if EDW_OWB_COLLECTION_UTIL.value_in_table(g_dim_pk_dim,g_dim_pk_instance,g_number_dim_pk_structure,
11408: p_parent_table_name,p_dang_instance(z))=false then
11409: l_number_dim_pk_structure:=0;
11410: if EDW_OWB_COLLECTION_UTIL.get_dim_pk_structure(p_parent_table_name,p_dang_instance(z),
11411: l_dim_pk_structure,l_number_dim_pk_structure)=false then
11412: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;
11413: g_status:=false;
11414: return false;

Line 11412: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;

11408: p_parent_table_name,p_dang_instance(z))=false then
11409: l_number_dim_pk_structure:=0;
11410: if EDW_OWB_COLLECTION_UTIL.get_dim_pk_structure(p_parent_table_name,p_dang_instance(z),
11411: l_dim_pk_structure,l_number_dim_pk_structure)=false then
11412: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;
11413: g_status:=false;
11414: return false;
11415: end if;
11416: l_prev_index:=g_number_dim_pk_structure+1;

Line 11432: if EDW_OWB_COLLECTION_UTIL.parse_pk_structure(g_dim_pk_structure(z),l_pk_cols,

11428: g_dim_pk_structure(g_number_dim_pk_structure):=null;
11429: end if;
11430: for z in l_prev_index..g_number_dim_pk_structure loop
11431: l_number_pk_cols:=0;
11432: if EDW_OWB_COLLECTION_UTIL.parse_pk_structure(g_dim_pk_structure(z),l_pk_cols,
11433: l_number_pk_cols)=false then
11434: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;
11435: g_status:=false;
11436: return false;

Line 11434: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;

11430: for z in l_prev_index..g_number_dim_pk_structure loop
11431: l_number_pk_cols:=0;
11432: if EDW_OWB_COLLECTION_UTIL.parse_pk_structure(g_dim_pk_structure(z),l_pk_cols,
11433: l_number_pk_cols)=false then
11434: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;
11435: g_status:=false;
11436: return false;
11437: end if;
11438: for y in 1..l_number_pk_cols loop

Line 11469: if EDW_OWB_COLLECTION_UTIL.drop_table(l_table)=false then

11465: else
11466: l_stmt:=l_stmt||' as select distinct '||p_fk_name||' from '||p_dang_table||
11467: ' where '||g_instance_column||'='''||p_dang_instance(z)||'''';
11468: end if;
11469: if EDW_OWB_COLLECTION_UTIL.drop_table(l_table)=false then
11470: null;
11471: end if;
11472: if g_debug then
11473: write_to_log_file_n(l_stmt||get_time);

Line 11486: --l_index:=EDW_OWB_COLLECTION_UTIL.index_in_table(g_dim_pk_dim,g_dim_pk_instance,g_number_dim_pk_structure,

11482: end if;
11483: l_stmt:=l_stmt||' as select '||p_fk_name;
11484: for i in 1..g_number_dim_pk_structure loop
11485: if g_dim_pk_dim(i)=p_parent_table_name and g_dim_pk_instance(i)=p_dang_instance(z) then
11486: --l_index:=EDW_OWB_COLLECTION_UTIL.index_in_table(g_dim_pk_dim,g_dim_pk_instance,g_number_dim_pk_structure,
11487: --p_parent_table_name,p_dang_instance(z));
11488: l_index:=i;
11489: l_number_pk_cols:=0;
11490: for y in 1..g_number_dim_pk_structure_cols loop

Line 11525: if EDW_OWB_COLLECTION_UTIL.drop_table(l_auto_dang_table3)=false then

11521: end loop;
11522: end if;
11523: end loop;
11524: l_stmt:=l_stmt||' from '||l_table;
11525: if EDW_OWB_COLLECTION_UTIL.drop_table(l_auto_dang_table3)=false then
11526: null;
11527: end if;
11528: if g_debug then
11529: write_to_log_file_n(l_stmt||get_time);

Line 11535: if EDW_OWB_COLLECTION_UTIL.drop_table(l_table)=false then

11531: execute immediate l_stmt;
11532: if g_debug then
11533: write_to_log_file_n('Created with '||sql%rowcount||' rows '||get_time);
11534: end if;
11535: if EDW_OWB_COLLECTION_UTIL.drop_table(l_table)=false then
11536: null;
11537: end if;
11538: end loop;
11539: end if;

Line 11549: p_dang_instance EDW_OWB_COLLECTION_UTIL.varcharTableType,

11545: return false;
11546: End;
11547:
11548: function insert_into_parent_fk_log(
11549: p_dang_instance EDW_OWB_COLLECTION_UTIL.varcharTableType,
11550: p_number_dang_instance number,
11551: p_fk_name varchar2,
11552: p_parent_table_id number,
11553: p_parent_table_name varchar2,

Line 11560: l_pk_cols EDW_OWB_COLLECTION_UTIL.varcharTableType;

11556: l_auto_dang_table3 varchar2(200);
11557: l_auto_dang_table2 varchar2(200);
11558: l_instance_column varchar2(200);
11559: l_stmt varchar2(20000);
11560: l_pk_cols EDW_OWB_COLLECTION_UTIL.varcharTableType;
11561: l_number_pk_cols number;
11562: l_index number;
11563: l_cols EDW_OWB_COLLECTION_UTIL.varcharTableType;
11564: l_cols_datatype EDW_OWB_COLLECTION_UTIL.varcharTableType;

Line 11563: l_cols EDW_OWB_COLLECTION_UTIL.varcharTableType;

11559: l_stmt varchar2(20000);
11560: l_pk_cols EDW_OWB_COLLECTION_UTIL.varcharTableType;
11561: l_number_pk_cols number;
11562: l_index number;
11563: l_cols EDW_OWB_COLLECTION_UTIL.varcharTableType;
11564: l_cols_datatype EDW_OWB_COLLECTION_UTIL.varcharTableType;
11565: l_number_cols number;
11566: l_owner varchar2(200);
11567: l_found boolean;

Line 11564: l_cols_datatype EDW_OWB_COLLECTION_UTIL.varcharTableType;

11560: l_pk_cols EDW_OWB_COLLECTION_UTIL.varcharTableType;
11561: l_number_pk_cols number;
11562: l_index number;
11563: l_cols EDW_OWB_COLLECTION_UTIL.varcharTableType;
11564: l_cols_datatype EDW_OWB_COLLECTION_UTIL.varcharTableType;
11565: l_number_cols number;
11566: l_owner varchar2(200);
11567: l_found boolean;
11568: Begin

Line 11596: if EDW_OWB_COLLECTION_UTIL.check_table(l_auto_dang_table3)=false then

11592: end if;
11593: end loop;
11594: end if;
11595: end loop;
11596: if EDW_OWB_COLLECTION_UTIL.check_table(l_auto_dang_table3)=false then
11597: if EDW_OWB_COLLECTION_UTIL.create_auto_dang_table(l_auto_dang_table3,l_pk_cols,l_number_pk_cols)=false then
11598: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;
11599: g_status:=false;
11600: write_to_log_file_n(g_status_message);

Line 11597: if EDW_OWB_COLLECTION_UTIL.create_auto_dang_table(l_auto_dang_table3,l_pk_cols,l_number_pk_cols)=false then

11593: end loop;
11594: end if;
11595: end loop;
11596: if EDW_OWB_COLLECTION_UTIL.check_table(l_auto_dang_table3)=false then
11597: if EDW_OWB_COLLECTION_UTIL.create_auto_dang_table(l_auto_dang_table3,l_pk_cols,l_number_pk_cols)=false then
11598: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;
11599: g_status:=false;
11600: write_to_log_file_n(g_status_message);
11601: return false;

Line 11598: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;

11594: end if;
11595: end loop;
11596: if EDW_OWB_COLLECTION_UTIL.check_table(l_auto_dang_table3)=false then
11597: if EDW_OWB_COLLECTION_UTIL.create_auto_dang_table(l_auto_dang_table3,l_pk_cols,l_number_pk_cols)=false then
11598: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;
11599: g_status:=false;
11600: write_to_log_file_n(g_status_message);
11601: return false;
11602: end if;

Line 11608: if EDW_OWB_COLLECTION_UTIL.get_db_columns_for_table(substr(l_auto_dang_table3,

11604: --check the columns
11605: --l_auto_dang_table3 only gets truncated. what if in the future, the key structure changes?
11606: l_owner:=substr(l_auto_dang_table3,1,instr(l_auto_dang_table3,'.')-1);
11607: l_number_cols:=0;
11608: if EDW_OWB_COLLECTION_UTIL.get_db_columns_for_table(substr(l_auto_dang_table3,
11609: instr(l_auto_dang_table3,'.')+1),l_cols,l_cols_datatype,l_number_cols,l_owner)=false then
11610: null;
11611: end if;
11612: l_found:=true;

Line 11615: if EDW_OWB_COLLECTION_UTIL.value_in_table(l_cols,l_number_cols,l_pk_cols(i))=false then

11611: end if;
11612: l_found:=true;
11613: for i in 1..l_number_pk_cols loop
11614: if l_pk_cols(i)<>'INST' then
11615: if EDW_OWB_COLLECTION_UTIL.value_in_table(l_cols,l_number_cols,l_pk_cols(i))=false then
11616: l_found:=false;
11617: exit;
11618: end if;
11619: end if;

Line 11624: if EDW_OWB_COLLECTION_UTIL.value_in_table(l_pk_cols,l_number_pk_cols,l_cols(i))=false then

11620: end loop;
11621: if l_found then
11622: for i in 1..l_number_cols loop
11623: if l_cols(i)<>'LEVEL_TABLE' and l_cols(i)<>'VALUE' then
11624: if EDW_OWB_COLLECTION_UTIL.value_in_table(l_pk_cols,l_number_pk_cols,l_cols(i))=false then
11625: l_found:=false;
11626: exit;
11627: end if;
11628: end if;

Line 11635: if EDW_OWB_COLLECTION_UTIL.drop_table(l_auto_dang_table3)=false then

11631: if l_found=false then
11632: if g_debug then
11633: write_to_log_file_n('There is a column descrepency. Re-creating '||l_auto_dang_table3);
11634: end if;
11635: if EDW_OWB_COLLECTION_UTIL.drop_table(l_auto_dang_table3)=false then
11636: null;
11637: end if;
11638: if EDW_OWB_COLLECTION_UTIL.create_auto_dang_table(l_auto_dang_table3,l_pk_cols,l_number_pk_cols)=false then
11639: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;

Line 11638: if EDW_OWB_COLLECTION_UTIL.create_auto_dang_table(l_auto_dang_table3,l_pk_cols,l_number_pk_cols)=false then

11634: end if;
11635: if EDW_OWB_COLLECTION_UTIL.drop_table(l_auto_dang_table3)=false then
11636: null;
11637: end if;
11638: if EDW_OWB_COLLECTION_UTIL.create_auto_dang_table(l_auto_dang_table3,l_pk_cols,l_number_pk_cols)=false then
11639: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;
11640: g_status:=false;
11641: write_to_log_file_n(g_status_message);
11642: return false;

Line 11639: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;

11635: if EDW_OWB_COLLECTION_UTIL.drop_table(l_auto_dang_table3)=false then
11636: null;
11637: end if;
11638: if EDW_OWB_COLLECTION_UTIL.create_auto_dang_table(l_auto_dang_table3,l_pk_cols,l_number_pk_cols)=false then
11639: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;
11640: g_status:=false;
11641: write_to_log_file_n(g_status_message);
11642: return false;
11643: end if;

Line 11659: EDW_OWB_COLLECTION_UTIL.set_rollback(g_rollback);

11655: l_stmt:=l_stmt||','||l_pk_cols(i);
11656: end if;
11657: end loop;
11658: l_stmt:=l_stmt||' from '||l_auto_dang_table2;
11659: EDW_OWB_COLLECTION_UTIL.set_rollback(g_rollback);
11660: if g_debug then
11661: write_to_log_file_n(l_stmt||get_time);
11662: end if;
11663: begin

Line 11672: if EDW_OWB_COLLECTION_UTIL.drop_table(l_auto_dang_table2)=false then

11668: commit;
11669: exception when others then
11670: write_to_log_file_n('WARNING!!WARNING!! Error executing stmt '||sqlerrm||get_time);
11671: end;
11672: if EDW_OWB_COLLECTION_UTIL.drop_table(l_auto_dang_table2)=false then
11673: null;
11674: end if;
11675: end loop;
11676: return true;

Line 11685: p_dang_instance EDW_OWB_COLLECTION_UTIL.varcharTableType,

11681: return false;
11682: End;
11683:
11684: function drop_fk_inst_tables(
11685: p_dang_instance EDW_OWB_COLLECTION_UTIL.varcharTableType,
11686: p_number_dang_instance number,
11687: p_parent_table_id number) return boolean is
11688: l_auto_dang_table2 varchar2(200);
11689: Begin

Line 11696: if EDW_OWB_COLLECTION_UTIL.drop_table(l_auto_dang_table2)=false then

11692: l_auto_dang_table2:=g_bis_owner||'.D_'||g_primary_target||'_'||p_parent_table_id||'_'||g_job_id||'_null';
11693: else
11694: l_auto_dang_table2:=g_bis_owner||'.D_'||g_primary_target||'_'||p_parent_table_id||'_'||g_job_id||'_'||p_dang_instance(z);
11695: end if;
11696: if EDW_OWB_COLLECTION_UTIL.drop_table(l_auto_dang_table2)=false then
11697: null;
11698: end if;
11699: end loop;
11700: return true;

Line 11719: l_dang_instance EDW_OWB_COLLECTION_UTIL.varcharTableType;

11715: p_dim_auto_dang_table varchar2,
11716: p_dim_lowest_ltc_id number)
11717: return boolean is
11718: l_dang_table varchar2(200);
11719: l_dang_instance EDW_OWB_COLLECTION_UTIL.varcharTableType;
11720: l_number_dang_instance number:=0;
11721: Begin
11722: if g_debug then
11723: write_to_log_file_n('In log_dimension_dang_keys '||get_time);

Line 11737: if EDW_OWB_COLLECTION_UTIL.drop_table(l_dang_table)=false then

11733: if insert_into_parent_fk_log(l_dang_instance,l_number_dang_instance,p_pk_name,p_parent_table_id,
11734: p_parent_table_name,p_dim_auto_dang_table,p_dim_lowest_ltc_id)=false then
11735: return false;
11736: end if;
11737: if EDW_OWB_COLLECTION_UTIL.drop_table(l_dang_table)=false then
11738: null;
11739: end if;
11740: return true;
11741: Exception when others then

Line 11775: if EDW_OWB_COLLECTION_UTIL.drop_table(p_dang_table)=false then

11771: --it contains only one column (also better for performance)
11772: l_stmt:=l_stmt||' from '||g_error_rowid_table||',';
11773: l_stmt:=l_stmt||g_fstgTableName;
11774: l_stmt:=l_stmt||' where '||g_error_rowid_table||'.row_id='||g_fstgTableName||'.rowid';
11775: if EDW_OWB_COLLECTION_UTIL.drop_table(p_dang_table)=false then
11776: null;
11777: end if;
11778: if g_debug then
11779: write_to_log_file_n(l_stmt||get_time);

Line 11816: if EDW_OWB_COLLECTION_UTIL.get_table_surr_pk(p_ltc_table,l_pk_key)=false then

11812: end if;
11813: --function get_table_surr_pk(p_table varchar2, p_pk out NOCOPY varchar2) return boolean;
11814: --function get_user_key(p_key varchar2) return varchar2 ;
11815: --get_dim_pk(p_dim_name varchar2,p_dim_id number) return varchar2 is
11816: if EDW_OWB_COLLECTION_UTIL.get_table_surr_pk(p_ltc_table,l_pk_key)=false then
11817: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;
11818: return false;
11819: end if;
11820: l_pk:=EDW_OWB_COLLECTION_UTIL.get_user_key(l_pk_key);

Line 11817: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;

11813: --function get_table_surr_pk(p_table varchar2, p_pk out NOCOPY varchar2) return boolean;
11814: --function get_user_key(p_key varchar2) return varchar2 ;
11815: --get_dim_pk(p_dim_name varchar2,p_dim_id number) return varchar2 is
11816: if EDW_OWB_COLLECTION_UTIL.get_table_surr_pk(p_ltc_table,l_pk_key)=false then
11817: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;
11818: return false;
11819: end if;
11820: l_pk:=EDW_OWB_COLLECTION_UTIL.get_user_key(l_pk_key);
11821: if p_dim_id is not null then

Line 11820: l_pk:=EDW_OWB_COLLECTION_UTIL.get_user_key(l_pk_key);

11816: if EDW_OWB_COLLECTION_UTIL.get_table_surr_pk(p_ltc_table,l_pk_key)=false then
11817: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;
11818: return false;
11819: end if;
11820: l_pk:=EDW_OWB_COLLECTION_UTIL.get_user_key(l_pk_key);
11821: if p_dim_id is not null then
11822: l_dim_pk_key:=EDW_OWB_COLLECTION_UTIL.get_dim_pk(null,p_dim_id);
11823: l_dim_pk:=EDW_OWB_COLLECTION_UTIL.get_user_key(l_dim_pk_key);
11824: end if;

Line 11822: l_dim_pk_key:=EDW_OWB_COLLECTION_UTIL.get_dim_pk(null,p_dim_id);

11818: return false;
11819: end if;
11820: l_pk:=EDW_OWB_COLLECTION_UTIL.get_user_key(l_pk_key);
11821: if p_dim_id is not null then
11822: l_dim_pk_key:=EDW_OWB_COLLECTION_UTIL.get_dim_pk(null,p_dim_id);
11823: l_dim_pk:=EDW_OWB_COLLECTION_UTIL.get_user_key(l_dim_pk_key);
11824: end if;
11825: l_seq:=EDW_OWB_COLLECTION_UTIL.get_table_seq(p_ltc_table,null);
11826: if p_pp_table is null then

Line 11823: l_dim_pk:=EDW_OWB_COLLECTION_UTIL.get_user_key(l_dim_pk_key);

11819: end if;
11820: l_pk:=EDW_OWB_COLLECTION_UTIL.get_user_key(l_pk_key);
11821: if p_dim_id is not null then
11822: l_dim_pk_key:=EDW_OWB_COLLECTION_UTIL.get_dim_pk(null,p_dim_id);
11823: l_dim_pk:=EDW_OWB_COLLECTION_UTIL.get_user_key(l_dim_pk_key);
11824: end if;
11825: l_seq:=EDW_OWB_COLLECTION_UTIL.get_table_seq(p_ltc_table,null);
11826: if p_pp_table is null then
11827: if EDW_OWB_COLLECTION_UTIL.index_present(p_ltc_table,null,l_pk,'UNIQUE')=false then

Line 11825: l_seq:=EDW_OWB_COLLECTION_UTIL.get_table_seq(p_ltc_table,null);

11821: if p_dim_id is not null then
11822: l_dim_pk_key:=EDW_OWB_COLLECTION_UTIL.get_dim_pk(null,p_dim_id);
11823: l_dim_pk:=EDW_OWB_COLLECTION_UTIL.get_user_key(l_dim_pk_key);
11824: end if;
11825: l_seq:=EDW_OWB_COLLECTION_UTIL.get_table_seq(p_ltc_table,null);
11826: if p_pp_table is null then
11827: if EDW_OWB_COLLECTION_UTIL.index_present(p_ltc_table,null,l_pk,'UNIQUE')=false then
11828: if g_debug then
11829: write_to_log_file_n('Cannot insert into level table '||p_ltc_table||'. Its missing a unique '||

Line 11827: if EDW_OWB_COLLECTION_UTIL.index_present(p_ltc_table,null,l_pk,'UNIQUE')=false then

11823: l_dim_pk:=EDW_OWB_COLLECTION_UTIL.get_user_key(l_dim_pk_key);
11824: end if;
11825: l_seq:=EDW_OWB_COLLECTION_UTIL.get_table_seq(p_ltc_table,null);
11826: if p_pp_table is null then
11827: if EDW_OWB_COLLECTION_UTIL.index_present(p_ltc_table,null,l_pk,'UNIQUE')=false then
11828: if g_debug then
11829: write_to_log_file_n('Cannot insert into level table '||p_ltc_table||'. Its missing a unique '||
11830: 'index on '||l_pk);
11831: end if;

Line 11868: l_fk EDW_OWB_COLLECTION_UTIL.varcharTableType;

11864: l_table_distinct varchar2(200);
11865: l_table_old varchar2(200); --pk_key already in parent table
11866: l_table_new varchar2(200); --pk_key NOT in parent table. contains new pk_key
11867: l_attempt_flag boolean;
11868: l_fk EDW_OWB_COLLECTION_UTIL.varcharTableType;
11869: l_number_fk number;
11870: l_pk EDW_OWB_COLLECTION_UTIL.varcharTableType;
11871: l_number_pk number;
11872: l_name_col EDW_OWB_COLLECTION_UTIL.varcharTableType;

Line 11870: l_pk EDW_OWB_COLLECTION_UTIL.varcharTableType;

11866: l_table_new varchar2(200); --pk_key NOT in parent table. contains new pk_key
11867: l_attempt_flag boolean;
11868: l_fk EDW_OWB_COLLECTION_UTIL.varcharTableType;
11869: l_number_fk number;
11870: l_pk EDW_OWB_COLLECTION_UTIL.varcharTableType;
11871: l_number_pk number;
11872: l_name_col EDW_OWB_COLLECTION_UTIL.varcharTableType;
11873: l_number_name_col number;
11874: l_unassigned varchar2(200);

Line 11872: l_name_col EDW_OWB_COLLECTION_UTIL.varcharTableType;

11868: l_fk EDW_OWB_COLLECTION_UTIL.varcharTableType;
11869: l_number_fk number;
11870: l_pk EDW_OWB_COLLECTION_UTIL.varcharTableType;
11871: l_number_pk number;
11872: l_name_col EDW_OWB_COLLECTION_UTIL.varcharTableType;
11873: l_number_name_col number;
11874: l_unassigned varchar2(200);
11875: l_table_union varchar2(200);
11876: Begin

Line 11889: if EDW_OWB_COLLECTION_UTIL.get_fks_for_table(p_ltc_table,l_fk,l_number_fk)=false then

11885: p_surr_table:=p_dang_table||'S';
11886: FND_MESSAGE.SET_NAME('BIS','EDW_UNASSIGNED');
11887: l_unassigned:=FND_MESSAGE.GET;
11888: l_number_fk:=0;
11889: if EDW_OWB_COLLECTION_UTIL.get_fks_for_table(p_ltc_table,l_fk,l_number_fk)=false then
11890: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;
11891: return false;
11892: end if;
11893: l_stmt:='create table '||l_table_old||' tablespace '||g_op_table_space;

Line 11890: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;

11886: FND_MESSAGE.SET_NAME('BIS','EDW_UNASSIGNED');
11887: l_unassigned:=FND_MESSAGE.GET;
11888: l_number_fk:=0;
11889: if EDW_OWB_COLLECTION_UTIL.get_fks_for_table(p_ltc_table,l_fk,l_number_fk)=false then
11890: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;
11891: return false;
11892: end if;
11893: l_stmt:='create table '||l_table_old||' tablespace '||g_op_table_space;
11894: if g_parallel is not null then

Line 11899: if EDW_OWB_COLLECTION_UTIL.drop_table(l_table_old)=false then

11895: l_stmt:=l_stmt||' parallel (degree '||g_parallel||') ';
11896: end if;
11897: l_stmt:=l_stmt||' as select '||p_pk||','||p_pk_key||' from '||p_ltc_table||
11898: ' where 1=2';
11899: if EDW_OWB_COLLECTION_UTIL.drop_table(l_table_old)=false then
11900: null;
11901: end if;
11902: if g_debug then
11903: write_to_log_file_n(l_stmt||get_time);

Line 11914: if EDW_OWB_COLLECTION_UTIL.drop_table(l_table_distinct)=false then

11910: if g_parallel is not null then
11911: l_stmt:=l_stmt||' parallel (degree '||g_parallel||') ';
11912: end if;
11913: l_stmt:=l_stmt||' as select distinct '||p_dang_pk||' '||p_pk||' from '||p_dang_table;
11914: if EDW_OWB_COLLECTION_UTIL.drop_table(l_table_distinct)=false then
11915: null;
11916: end if;
11917: if g_debug then
11918: write_to_log_file_n(l_stmt||get_time);

Line 11924: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(l_table_distinct,instr(l_table_distinct,'.')+1,

11920: execute immediate l_stmt;
11921: if g_debug then
11922: write_to_log_file_n('Created with '||sql%rowcount||' rows'||get_time);
11923: end if;
11924: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(l_table_distinct,instr(l_table_distinct,'.')+1,
11925: length(l_table_distinct)),substr(l_table_distinct,1,instr(l_table_distinct,'.')-1));
11926: loop
11927: l_attempt_flag:=false;
11928: l_stmt:='create table '||l_table1||' tablespace '||g_op_table_space;

Line 11934: if EDW_OWB_COLLECTION_UTIL.drop_table(l_table1)=false then

11930: l_stmt:=l_stmt||' parallel (degree '||g_parallel||') ';
11931: end if;
11932: l_stmt:=l_stmt||' as select '||p_pk||' from '||l_table_distinct||' MINUS select '||
11933: p_pk||' from '||l_table_old;
11934: if EDW_OWB_COLLECTION_UTIL.drop_table(l_table1)=false then
11935: null;
11936: end if;
11937: if g_debug then
11938: write_to_log_file_n(l_stmt||get_time);

Line 11949: if EDW_OWB_COLLECTION_UTIL.drop_table(l_table_new)=false then

11945: if g_parallel is not null then
11946: l_stmt:=l_stmt||' parallel (degree '||g_parallel||') ';
11947: end if;
11948: l_stmt:=l_stmt||' as select '||p_pk||','||p_seq||'.NEXTVAL '||p_pk_key||' from '||l_table1;
11949: if EDW_OWB_COLLECTION_UTIL.drop_table(l_table_new)=false then
11950: null;
11951: end if;
11952: if g_debug then
11953: write_to_log_file_n(l_stmt||get_time);

Line 11959: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(l_table_new,instr(l_table_new,'.')+1,

11955: execute immediate l_stmt;
11956: if g_debug then
11957: write_to_log_file_n('Created with '||sql%rowcount||' rows'||get_time);
11958: end if;
11959: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(l_table_new,instr(l_table_new,'.')+1,
11960: length(l_table_new)),substr(l_table_new,1,instr(l_table_new,'.')-1));
11961: if p_pp_table is not null then --data alignment
11962: l_stmt:='insert ';
11963: if g_parallel is not null then

Line 11985: EDW_OWB_COLLECTION_UTIL.set_rollback(g_rollback);

11981: begin
11982: if g_debug then
11983: write_to_log_file_n(l_stmt||get_time);
11984: end if;
11985: EDW_OWB_COLLECTION_UTIL.set_rollback(g_rollback);
11986: execute immediate l_stmt;
11987: if g_debug then
11988: write_to_log_file_n('Inserted '||sql%rowcount||' rows'||get_time);
11989: end if;

Line 12020: EDW_OWB_COLLECTION_UTIL.set_rollback(g_rollback);

12016: end if;
12017: if g_debug then
12018: write_to_log_file_n(l_stmt||get_time);
12019: end if;
12020: EDW_OWB_COLLECTION_UTIL.set_rollback(g_rollback);
12021: execute immediate l_stmt;
12022: if g_debug then
12023: write_to_log_file_n('Inserted '||sql%rowcount||' rows'||get_time);
12024: end if;

Line 12033: if EDW_OWB_COLLECTION_UTIL.drop_table(l_table_union)=false then

12029: l_stmt:=l_stmt||' parallel (degree '||g_parallel||') ';
12030: end if;
12031: l_stmt:=l_stmt||' as select '||p_pk||','||p_pk_key||' from '||l_table_old||' UNION ALL '||
12032: ' select '||p_pk||','||p_pk_key||' from '||l_table_new;
12033: if EDW_OWB_COLLECTION_UTIL.drop_table(l_table_union)=false then
12034: null;
12035: end if;
12036: if g_debug then
12037: write_to_log_file_n(l_stmt||get_time);

Line 12049: if EDW_OWB_COLLECTION_UTIL.drop_table(p_surr_table)=false then

12045: l_stmt:=l_stmt||' parallel (degree '||g_parallel||') ';
12046: end if;
12047: l_stmt:=l_stmt||' as select B.row_id,A.'||p_pk_key||' pk_key '||
12048: ' from '||l_table_union||' A,'||p_dang_table||' B where A.'||p_pk||'=B.'||p_dang_pk;
12049: if EDW_OWB_COLLECTION_UTIL.drop_table(p_surr_table)=false then
12050: null;
12051: end if;
12052: if g_debug then
12053: write_to_log_file_n(l_stmt||get_time);

Line 12059: if EDW_OWB_COLLECTION_UTIL.truncate_table(l_table_old)=false then

12055: execute immediate l_stmt;
12056: if g_debug then
12057: write_to_log_file_n('Created with '||sql%rowcount||' rows'||get_time);
12058: end if;
12059: if EDW_OWB_COLLECTION_UTIL.truncate_table(l_table_old)=false then
12060: null;
12061: end if;
12062: if p_pp_table is not null then --data alignment
12063: loop

Line 12072: if EDW_OWB_COLLECTION_UTIL.drop_table(l_table_new)=false then

12068: l_stmt:=l_stmt||' parallel (degree '||g_parallel||') ';
12069: end if;
12070: l_stmt:=l_stmt||' as select '||p_pk||','||p_pk_key||' from '||l_table_union||
12071: ' MINUS select '||p_pk||','||p_pk_key||' from '||l_table_old;
12072: if EDW_OWB_COLLECTION_UTIL.drop_table(l_table_new)=false then
12073: null;
12074: end if;
12075: if g_debug then
12076: write_to_log_file_n(l_stmt||get_time);

Line 12096: EDW_OWB_COLLECTION_UTIL.set_rollback(g_rollback);

12092: if g_debug then
12093: write_to_log_file_n(l_stmt||get_time);
12094: end if;
12095: begin
12096: EDW_OWB_COLLECTION_UTIL.set_rollback(g_rollback);
12097: execute immediate l_stmt;
12098: if g_debug then
12099: write_to_log_file_n('Inserted '||sql%rowcount||' rows'||get_time);
12100: end if;

Line 12125: EDW_OWB_COLLECTION_UTIL.set_rollback(g_rollback);

12121: 'where A.'||p_pk||'=B.'||p_pk;
12122: if g_debug then
12123: write_to_log_file_n(l_stmt||get_time);
12124: end if;
12125: EDW_OWB_COLLECTION_UTIL.set_rollback(g_rollback);
12126: execute immediate l_stmt;
12127: if g_debug then
12128: write_to_log_file_n('Inserted '||sql%rowcount||' rows'||get_time);
12129: end if;

Line 12136: if EDW_OWB_COLLECTION_UTIL.truncate_table(l_table_old)=false then

12132: exit;
12133: end if;
12134: end loop;
12135: end if;
12136: if EDW_OWB_COLLECTION_UTIL.truncate_table(l_table_old)=false then
12137: null;
12138: end if;
12139: if p_dim_table is not null then
12140: if EDW_OWB_COLLECTION_UTIL.get_dim_lvl_pk_keys(null,p_dim_id,l_pk,l_number_pk)=false then

Line 12140: if EDW_OWB_COLLECTION_UTIL.get_dim_lvl_pk_keys(null,p_dim_id,l_pk,l_number_pk)=false then

12136: if EDW_OWB_COLLECTION_UTIL.truncate_table(l_table_old)=false then
12137: null;
12138: end if;
12139: if p_dim_table is not null then
12140: if EDW_OWB_COLLECTION_UTIL.get_dim_lvl_pk_keys(null,p_dim_id,l_pk,l_number_pk)=false then
12141: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;
12142: return false;
12143: end if;
12144: if EDW_OWB_COLLECTION_UTIL.get_dim_lvl_name_cols(null,p_dim_id,l_name_col,l_number_name_col)=false then

Line 12141: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;

12137: null;
12138: end if;
12139: if p_dim_table is not null then
12140: if EDW_OWB_COLLECTION_UTIL.get_dim_lvl_pk_keys(null,p_dim_id,l_pk,l_number_pk)=false then
12141: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;
12142: return false;
12143: end if;
12144: if EDW_OWB_COLLECTION_UTIL.get_dim_lvl_name_cols(null,p_dim_id,l_name_col,l_number_name_col)=false then
12145: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;

Line 12144: if EDW_OWB_COLLECTION_UTIL.get_dim_lvl_name_cols(null,p_dim_id,l_name_col,l_number_name_col)=false then

12140: if EDW_OWB_COLLECTION_UTIL.get_dim_lvl_pk_keys(null,p_dim_id,l_pk,l_number_pk)=false then
12141: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;
12142: return false;
12143: end if;
12144: if EDW_OWB_COLLECTION_UTIL.get_dim_lvl_name_cols(null,p_dim_id,l_name_col,l_number_name_col)=false then
12145: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;
12146: return false;
12147: end if;
12148: loop

Line 12145: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;

12141: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;
12142: return false;
12143: end if;
12144: if EDW_OWB_COLLECTION_UTIL.get_dim_lvl_name_cols(null,p_dim_id,l_name_col,l_number_name_col)=false then
12145: g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;
12146: return false;
12147: end if;
12148: loop
12149: l_attempt_flag:=false;

Line 12157: if EDW_OWB_COLLECTION_UTIL.drop_table(l_table_new)=false then

12153: l_stmt:=l_stmt||' parallel (degree '||g_parallel||') ';
12154: end if;
12155: l_stmt:=l_stmt||' as select '||p_pk||','||p_pk_key||' from '||l_table_union||
12156: ' MINUS select '||p_pk||','||p_pk_key||' from '||l_table_old;
12157: if EDW_OWB_COLLECTION_UTIL.drop_table(l_table_new)=false then
12158: null;
12159: end if;
12160: if g_debug then
12161: write_to_log_file_n(l_stmt||get_time);

Line 12191: EDW_OWB_COLLECTION_UTIL.set_rollback(g_rollback);

12187: if g_debug then
12188: write_to_log_file_n(l_stmt||get_time);
12189: end if;
12190: begin
12191: EDW_OWB_COLLECTION_UTIL.set_rollback(g_rollback);
12192: execute immediate l_stmt;
12193: if g_debug then
12194: write_to_log_file_n('Inserted '||sql%rowcount||' rows'||get_time);
12195: end if;

Line 12220: EDW_OWB_COLLECTION_UTIL.set_rollback(g_rollback);

12216: 'where A.'||p_pk||'=B.'||p_dim_pk;
12217: if g_debug then
12218: write_to_log_file_n(l_stmt||get_time);
12219: end if;
12220: EDW_OWB_COLLECTION_UTIL.set_rollback(g_rollback);
12221: execute immediate l_stmt;
12222: if g_debug then
12223: write_to_log_file_n('Inserted '||sql%rowcount||' rows'||get_time);
12224: end if;

Line 12234: if EDW_OWB_COLLECTION_UTIL.drop_table(l_table_union)=false then

12230: end if;
12231: exit;
12232: end if;
12233: end loop;
12234: if EDW_OWB_COLLECTION_UTIL.drop_table(l_table_union)=false then
12235: null;
12236: end if;
12237: if EDW_OWB_COLLECTION_UTIL.drop_table(l_table_old)=false then
12238: null;

Line 12237: if EDW_OWB_COLLECTION_UTIL.drop_table(l_table_old)=false then

12233: end loop;
12234: if EDW_OWB_COLLECTION_UTIL.drop_table(l_table_union)=false then
12235: null;
12236: end if;
12237: if EDW_OWB_COLLECTION_UTIL.drop_table(l_table_old)=false then
12238: null;
12239: end if;
12240: if EDW_OWB_COLLECTION_UTIL.drop_table(l_table_new)=false then
12241: null;

Line 12240: if EDW_OWB_COLLECTION_UTIL.drop_table(l_table_new)=false then

12236: end if;
12237: if EDW_OWB_COLLECTION_UTIL.drop_table(l_table_old)=false then
12238: null;
12239: end if;
12240: if EDW_OWB_COLLECTION_UTIL.drop_table(l_table_new)=false then
12241: null;
12242: end if;
12243: if EDW_OWB_COLLECTION_UTIL.drop_table(l_table1)=false then
12244: null;

Line 12243: if EDW_OWB_COLLECTION_UTIL.drop_table(l_table1)=false then

12239: end if;
12240: if EDW_OWB_COLLECTION_UTIL.drop_table(l_table_new)=false then
12241: null;
12242: end if;
12243: if EDW_OWB_COLLECTION_UTIL.drop_table(l_table1)=false then
12244: null;
12245: end if;
12246: if EDW_OWB_COLLECTION_UTIL.drop_table(l_table_distinct)=false then
12247: null;

Line 12246: if EDW_OWB_COLLECTION_UTIL.drop_table(l_table_distinct)=false then

12242: end if;
12243: if EDW_OWB_COLLECTION_UTIL.drop_table(l_table1)=false then
12244: null;
12245: end if;
12246: if EDW_OWB_COLLECTION_UTIL.drop_table(l_table_distinct)=false then
12247: null;
12248: end if;
12249: return true;
12250: Exception when others then

Line 12280: if EDW_OWB_COLLECTION_UTIL.drop_table(l_table1)=false then

12276: l_stmt:=l_stmt||'row_id_copy row_id from '||g_surr_table||' where operation_code=0';
12277: else
12278: l_stmt:=l_stmt||'row_id from '||g_surr_table||' where operation_code=0';
12279: end if;
12280: if EDW_OWB_COLLECTION_UTIL.drop_table(l_table1)=false then
12281: null;
12282: end if;
12283: /*
12284: Please note that row_id of l_table1 is row_id_copy!!!

Line 12293: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(l_table1,instr(l_table1,'.')+1,

12289: execute immediate l_stmt;
12290: if g_debug then
12291: write_to_log_file_n('Created with '||sql%rowcount||' rows'||get_time);
12292: end if;
12293: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(l_table1,instr(l_table1,'.')+1,
12294: length(l_table1)),substr(l_table1,1,instr(l_table1,'.')-1));
12295: l_stmt:='create table '||l_table2||' tablespace '||g_op_table_space;
12296: if g_parallel is not null then
12297: l_stmt:=l_stmt||' parallel (degree '||g_parallel||') ';

Line 12315: if EDW_OWB_COLLECTION_UTIL.drop_table(l_table2)=false then

12311: l_stmt:=l_stmt||g_user_measure_table||' B where A.row_id=B.rowid';
12312: else
12313: l_stmt:=l_stmt||g_fstgTableName||' B where A.row_id=B.rowid';
12314: end if;
12315: if EDW_OWB_COLLECTION_UTIL.drop_table(l_table2)=false then
12316: null;
12317: end if;
12318: if g_debug then
12319: write_to_log_file_n(l_stmt||get_time);

Line 12325: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(l_table2,instr(l_table2,'.')+1,

12321: execute immediate l_stmt;
12322: if g_debug then
12323: write_to_log_file_n('Created with '||sql%rowcount||' rows'||get_time);
12324: end if;
12325: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(l_table2,instr(l_table2,'.')+1,
12326: length(l_table2)),substr(l_table2,1,instr(l_table2,'.')-1));
12327: --4161164 : remove IOT , replace with ordinary table and index
12328: --l_stmt:='create table '||l_table3||'(row_id primary key,row_id1) organization index tablespace '||g_op_table_space;
12329: l_stmt:='create table '||l_table3||' tablespace '||g_op_table_space;

Line 12343: if EDW_OWB_COLLECTION_UTIL.drop_table(l_table3)=false then

12339: l_stmt:=l_stmt||' /*+parallel(B,'||g_parallel||')*/ ';
12340: end if;
12341: l_stmt:=l_stmt||'A.row_id,B.rowid row_id1 from '||l_table2||' A,'||g_FactTableName||' B where '||
12342: ' A.'||g_fstgPKName||'=B.'||g_factPKName;
12343: if EDW_OWB_COLLECTION_UTIL.drop_table(l_table3)=false then
12344: null;
12345: end if;
12346: if g_debug then
12347: write_to_log_file_n(l_stmt||get_time);

Line 12354: EDW_OWB_COLLECTION_UTIL.create_iot_index(l_table3,'row_id',g_op_table_space,g_parallel);

12350: if g_debug then
12351: write_to_log_file_n('Created with '||sql%rowcount||' rows'||get_time);
12352: end if;
12353: --4161164 : remove IOT , replace with ordinary table and index
12354: EDW_OWB_COLLECTION_UTIL.create_iot_index(l_table3,'row_id',g_op_table_space,g_parallel);
12355: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(l_table3,instr(l_table3,'.')+1,
12356: length(l_table3)),substr(l_table3,1,instr(l_table3,'.')-1));
12357: l_stmt:='update /*+ORDERED USE_NL(A)*/ '||g_surr_table||' A set (row_id1,operation_code)='||
12358: '(select row_id1,1 from '||l_table3||' where '||l_table3||'.row_id=A.rowid) where A.rowid in '||

Line 12355: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(l_table3,instr(l_table3,'.')+1,

12351: write_to_log_file_n('Created with '||sql%rowcount||' rows'||get_time);
12352: end if;
12353: --4161164 : remove IOT , replace with ordinary table and index
12354: EDW_OWB_COLLECTION_UTIL.create_iot_index(l_table3,'row_id',g_op_table_space,g_parallel);
12355: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(l_table3,instr(l_table3,'.')+1,
12356: length(l_table3)),substr(l_table3,1,instr(l_table3,'.')-1));
12357: l_stmt:='update /*+ORDERED USE_NL(A)*/ '||g_surr_table||' A set (row_id1,operation_code)='||
12358: '(select row_id1,1 from '||l_table3||' where '||l_table3||'.row_id=A.rowid) where A.rowid in '||
12359: '(select row_id from '||l_table3||')';

Line 12360: EDW_OWB_COLLECTION_UTIL.set_rollback(g_rollback);

12356: length(l_table3)),substr(l_table3,1,instr(l_table3,'.')-1));
12357: l_stmt:='update /*+ORDERED USE_NL(A)*/ '||g_surr_table||' A set (row_id1,operation_code)='||
12358: '(select row_id1,1 from '||l_table3||' where '||l_table3||'.row_id=A.rowid) where A.rowid in '||
12359: '(select row_id from '||l_table3||')';
12360: EDW_OWB_COLLECTION_UTIL.set_rollback(g_rollback);
12361: if g_debug then
12362: write_to_log_file_n(l_stmt||get_time);
12363: end if;
12364: execute immediate l_stmt;

Line 12370: if EDW_OWB_COLLECTION_UTIL.drop_table(l_table1)=false then

12366: if g_debug then
12367: write_to_log_file_n('Updated '||l_count||' rows'||get_time);
12368: end if;
12369: commit;
12370: if EDW_OWB_COLLECTION_UTIL.drop_table(l_table1)=false then
12371: null;
12372: end if;
12373: if EDW_OWB_COLLECTION_UTIL.drop_table(l_table2)=false then
12374: null;

Line 12373: if EDW_OWB_COLLECTION_UTIL.drop_table(l_table2)=false then

12369: commit;
12370: if EDW_OWB_COLLECTION_UTIL.drop_table(l_table1)=false then
12371: null;
12372: end if;
12373: if EDW_OWB_COLLECTION_UTIL.drop_table(l_table2)=false then
12374: null;
12375: end if;
12376: if EDW_OWB_COLLECTION_UTIL.drop_table(l_table3)=false then
12377: null;

Line 12376: if EDW_OWB_COLLECTION_UTIL.drop_table(l_table3)=false then

12372: end if;
12373: if EDW_OWB_COLLECTION_UTIL.drop_table(l_table2)=false then
12374: null;
12375: end if;
12376: if EDW_OWB_COLLECTION_UTIL.drop_table(l_table3)=false then
12377: null;
12378: end if;
12379: if l_count=0 then
12380: write_to_log_file_n('Could not update any rows for insert/update. Some other error');

Line 12410: if EDW_OWB_COLLECTION_UTIL.drop_table(g_fact_audit_net_table)= false then

12406: insert_into_load_progress_d(g_load_pk,g_primary_target_name,g_jobid_stmt||'Inserting into '||g_primary_target_name,sysdate,
12407: null,'MAPPING','INSERT',g_jobid_stmt||'INSERT'||p_count,'I');
12408: <>
12409: if g_fact_audit or g_fact_net_change then
12410: if EDW_OWB_COLLECTION_UTIL.drop_table(g_fact_audit_net_table)= false then
12411: null;
12412: end if;
12413: end if;
12414: /*

Line 12426: if EDW_OWB_COLLECTION_UTIL.drop_table(g_insert_ctas_table)=false then

12422: write_to_log_file_n('ROW-BY-ROW inserts '||get_time);
12423: end if;
12424: l_unique_violation:=false;
12425: g_number_rows_processed:=0;
12426: if EDW_OWB_COLLECTION_UTIL.drop_table(g_insert_ctas_table)=false then
12427: null;
12428: end if;
12429: if g_debug then
12430: write_to_log_file_n(g_insert_stmt_ctas||get_time);

Line 12441: if EDW_OWB_COLLECTION_UTIL.drop_table(l_table1)=false then

12437: if g_parallel is not null then
12438: l_stmt:=l_stmt||' parallel (degree '||g_parallel||') ';
12439: end if;
12440: l_stmt:=l_stmt||' as select rowid row_id from '||g_insert_ctas_table;
12441: if EDW_OWB_COLLECTION_UTIL.drop_table(l_table1)=false then
12442: null;
12443: end if;
12444: if g_debug then
12445: write_to_log_file_n(l_stmt||get_time);

Line 12482: if EDW_OWB_COLLECTION_UTIL.drop_table(l_table1)=false then

12478: if refind_insert_rows=false then
12479: return false;
12480: end if;
12481: end if;
12482: if EDW_OWB_COLLECTION_UTIL.drop_table(l_table1)=false then
12483: null;
12484: end if;
12485: if EDW_OWB_COLLECTION_UTIL.drop_table(g_insert_ctas_table)=false then
12486: null;

Line 12485: if EDW_OWB_COLLECTION_UTIL.drop_table(g_insert_ctas_table)=false then

12481: end if;
12482: if EDW_OWB_COLLECTION_UTIL.drop_table(l_table1)=false then
12483: null;
12484: end if;
12485: if EDW_OWB_COLLECTION_UTIL.drop_table(g_insert_ctas_table)=false then
12486: null;
12487: end if;
12488: g_total_insert:=g_number_rows_processed;
12489: else

Line 12495: EDW_OWB_COLLECTION_UTIL.alter_session('NO-PARALLEL');

12491: write_to_log_file_n('MASS inserts '||get_time);
12492: end if;
12493: if g_fact_audit=false and g_fact_net_change=false then
12494: if g_parallel is null then
12495: EDW_OWB_COLLECTION_UTIL.alter_session('NO-PARALLEL');
12496: else
12497: if g_is_source=false and g_object_type='FACT' then
12498: if edw_owb_collection_util.is_source_for_fast_refresh_mv(g_primary_target_name,g_table_owner)=1 then
12499: --3529591

Line 12498: if edw_owb_collection_util.is_source_for_fast_refresh_mv(g_primary_target_name,g_table_owner)=1 then

12494: if g_parallel is null then
12495: EDW_OWB_COLLECTION_UTIL.alter_session('NO-PARALLEL');
12496: else
12497: if g_is_source=false and g_object_type='FACT' then
12498: if edw_owb_collection_util.is_source_for_fast_refresh_mv(g_primary_target_name,g_table_owner)=1 then
12499: --3529591
12500: EDW_OWB_COLLECTION_UTIL.alter_session('NO-PARALLEL');
12501: else
12502: null;

Line 12500: EDW_OWB_COLLECTION_UTIL.alter_session('NO-PARALLEL');

12496: else
12497: if g_is_source=false and g_object_type='FACT' then
12498: if edw_owb_collection_util.is_source_for_fast_refresh_mv(g_primary_target_name,g_table_owner)=1 then
12499: --3529591
12500: EDW_OWB_COLLECTION_UTIL.alter_session('NO-PARALLEL');
12501: else
12502: null;
12503: end if;
12504: else

Line 12505: EDW_OWB_COLLECTION_UTIL.alter_session('NO-PARALLEL');

12501: else
12502: null;
12503: end if;
12504: else
12505: EDW_OWB_COLLECTION_UTIL.alter_session('NO-PARALLEL');
12506: end if;
12507: end if;
12508: end if;
12509: begin

Line 12510: EDW_OWB_COLLECTION_UTIL.set_rollback(g_rollback);

12506: end if;
12507: end if;
12508: end if;
12509: begin
12510: EDW_OWB_COLLECTION_UTIL.set_rollback(g_rollback);
12511: execute immediate g_insert_stmt;
12512: g_number_rows_processed:=sql%rowcount;
12513: g_total_insert:=g_number_rows_processed;
12514: if g_debug then

Line 12555: EDW_OWB_COLLECTION_UTIL.alter_session('PARALLEL');

12551: end;
12552: end if;
12553: if g_fact_audit=false and g_fact_net_change=false then
12554: if g_parallel is not null then
12555: EDW_OWB_COLLECTION_UTIL.alter_session('PARALLEL');
12556: if g_debug then
12557: write_to_log_file_n('Session made parallel dml enabled');
12558: end if;
12559: end if;

Line 12566: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(g_fact_audit_net_table,

12562: if g_fact_audit or g_fact_net_change then
12563: --analyze
12564: insert_into_load_progress_d(g_load_pk,g_primary_target_name,g_jobid_stmt||'Process Audit or Netchange Records',sysdate,
12565: null,'MAPPING','INSERT',g_jobid_stmt||'INSERTAN'||p_count,'I');
12566: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(g_fact_audit_net_table,
12567: instr(g_fact_audit_net_table,'.')+1,length(g_fact_audit_net_table)),
12568: substr(g_fact_audit_net_table,1,instr(g_fact_audit_net_table,'.')-1));
12569: if l_insert_type='ROW-BY-ROW' then
12570: g_number_rows_processed:=0;

Line 12577: if EDW_OWB_COLLECTION_UTIL.drop_table(l_table1)=false then

12573: if g_parallel is not null then
12574: l_stmt:=l_stmt||' parallel (degree '||g_parallel||') ';
12575: end if;
12576: l_stmt:=l_stmt||' as select rowid row_id from '||g_fact_audit_net_table;
12577: if EDW_OWB_COLLECTION_UTIL.drop_table(l_table1)=false then
12578: null;
12579: end if;
12580: if g_debug then
12581: write_to_log_file_n(l_stmt||get_time);

Line 12611: if EDW_OWB_COLLECTION_UTIL.drop_table(l_table1)=false then

12607: return false;
12608: end if;
12609: end;
12610: end loop;
12611: if EDW_OWB_COLLECTION_UTIL.drop_table(l_table1)=false then
12612: null;
12613: end if;
12614: g_total_insert:=g_number_rows_processed;
12615: if l_unique_violation then

Line 12634: EDW_OWB_COLLECTION_UTIL.alter_session('NO-PARALLEL');

12630: write_to_debug_n('MASS INSERT. Going to execute g_audit_net_insert_stmt'||get_time);
12631: end if;
12632: --insert into the fact
12633: if g_parallel is null then
12634: EDW_OWB_COLLECTION_UTIL.alter_session('NO-PARALLEL');
12635: else
12636: if g_is_source=false and g_object_type='FACT' then
12637: if edw_owb_collection_util.is_source_for_fast_refresh_mv(g_primary_target_name,g_table_owner)=1 then
12638: --3529591

Line 12637: if edw_owb_collection_util.is_source_for_fast_refresh_mv(g_primary_target_name,g_table_owner)=1 then

12633: if g_parallel is null then
12634: EDW_OWB_COLLECTION_UTIL.alter_session('NO-PARALLEL');
12635: else
12636: if g_is_source=false and g_object_type='FACT' then
12637: if edw_owb_collection_util.is_source_for_fast_refresh_mv(g_primary_target_name,g_table_owner)=1 then
12638: --3529591
12639: EDW_OWB_COLLECTION_UTIL.alter_session('NO-PARALLEL');
12640: else
12641: null;

Line 12639: EDW_OWB_COLLECTION_UTIL.alter_session('NO-PARALLEL');

12635: else
12636: if g_is_source=false and g_object_type='FACT' then
12637: if edw_owb_collection_util.is_source_for_fast_refresh_mv(g_primary_target_name,g_table_owner)=1 then
12638: --3529591
12639: EDW_OWB_COLLECTION_UTIL.alter_session('NO-PARALLEL');
12640: else
12641: null;
12642: end if;
12643: else

Line 12644: EDW_OWB_COLLECTION_UTIL.alter_session('NO-PARALLEL');

12640: else
12641: null;
12642: end if;
12643: else
12644: EDW_OWB_COLLECTION_UTIL.alter_session('NO-PARALLEL');
12645: end if;
12646: end if;
12647: begin
12648: EDW_OWB_COLLECTION_UTIL.set_rollback(g_rollback);

Line 12648: EDW_OWB_COLLECTION_UTIL.set_rollback(g_rollback);

12644: EDW_OWB_COLLECTION_UTIL.alter_session('NO-PARALLEL');
12645: end if;
12646: end if;
12647: begin
12648: EDW_OWB_COLLECTION_UTIL.set_rollback(g_rollback);
12649: execute immediate g_audit_net_insert_stmt;
12650: g_number_rows_processed:=sql%rowcount;
12651: g_total_insert:=g_number_rows_processed;
12652: commit;

Line 12681: EDW_OWB_COLLECTION_UTIL.alter_session('PARALLEL');

12677: end if;
12678: end;
12679: end if;
12680: if g_parallel is not null then
12681: EDW_OWB_COLLECTION_UTIL.alter_session('PARALLEL');
12682: end if;
12683: insert_into_load_progress_d(g_load_pk,null,null,null,sysdate,null,null,g_jobid_stmt||'INSERTAN'||p_count,'U');
12684: end if;
12685: if g_debug then

Line 12780: l_columns EDW_OWB_COLLECTION_UTIL.varcharTableType;

12776: function make_stg_copy return boolean is
12777: l_extent number;
12778: l_divide number;
12779: l_table varchar2(200);
12780: l_columns EDW_OWB_COLLECTION_UTIL.varcharTableType;
12781: l_number_columns number;
12782: Begin
12783: write_to_debug_n('In make_stg_copy');
12784: if g_number_fstg_columns is null then

Line 12796: if EDW_OWB_COLLECTION_UTIL.drop_table(l_table)=false then

12792: if g_parallel is not null then
12793: g_stmt:=g_stmt||' parallel (degree '||g_parallel||') ';
12794: end if;
12795: g_stmt:=g_stmt||' as select row_id from '||g_ok_rowid_table||' where status=1';
12796: if EDW_OWB_COLLECTION_UTIL.drop_table(l_table)=false then
12797: null;
12798: end if;
12799: if g_debug then
12800: write_to_log_file_n('Going to execute '||g_stmt||get_time);

Line 12809: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(l_table,instr(l_table,'.')+1,

12805: end if;
12806: if g_debug then
12807: write_to_log_file_n('Created with '||g_number_rows_ready||' rows '||get_time);
12808: end if;
12809: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(l_table,instr(l_table,'.')+1,
12810: length(l_table)),substr(l_table,1,instr(l_table,'.')-1));
12811: g_stmt:='create table '||g_stg_copy_table||' tablespace '||g_op_table_space;
12812: if g_fact_next_extent is not null then
12813: if g_parallel is null then

Line 12860: if EDW_OWB_COLLECTION_UTIL.value_in_table(l_columns,l_number_columns,

12856: end loop;
12857: g_stmt:=substr(g_stmt,1,length(g_stmt)-1);
12858: --put the fks
12859: for i in 1..g_numberOfDimTables loop
12860: if EDW_OWB_COLLECTION_UTIL.value_in_table(l_columns,l_number_columns,
12861: g_fstgUserFKName(i))=false then
12862: if g_fstg_fk_direct_load(i)=false and g_fstg_fk_value_load(i)=false then
12863: g_stmt:=g_stmt||','||g_fstgUserFKName(i);
12864: elsif g_fstg_fk_value_load(i)=true then

Line 12877: if EDW_OWB_COLLECTION_UTIL.value_in_table(l_columns,l_number_columns,'OPERATION_CODE')=false then

12873: end if;
12874: if g_last_update_date_flag then
12875: g_stmt:=g_stmt||',last_update_date';
12876: end if;
12877: if EDW_OWB_COLLECTION_UTIL.value_in_table(l_columns,l_number_columns,'OPERATION_CODE')=false then
12878: g_stmt:=g_stmt||',operation_code';
12879: end if;
12880: g_stmt:=g_stmt||' from '||l_table||','||g_fstgTableName||' where '||l_table||'.row_id='||
12881: g_fstgTableName||'.rowid';

Line 12882: if EDW_OWB_COLLECTION_UTIL.drop_table(g_stg_copy_table)=false then

12878: g_stmt:=g_stmt||',operation_code';
12879: end if;
12880: g_stmt:=g_stmt||' from '||l_table||','||g_fstgTableName||' where '||l_table||'.row_id='||
12881: g_fstgTableName||'.rowid';
12882: if EDW_OWB_COLLECTION_UTIL.drop_table(g_stg_copy_table)=false then
12883: null;
12884: end if;
12885: if g_debug then
12886: write_to_log_file_n('Going to execute '||g_stmt||get_time);

Line 12892: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(g_stg_copy_table,instr(g_stg_copy_table,'.')+1,

12888: execute immediate g_stmt;
12889: if g_debug then
12890: write_to_log_file_n('Created with '||sql%rowcount||' rows '||get_time);
12891: end if;
12892: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(g_stg_copy_table,instr(g_stg_copy_table,'.')+1,
12893: length(g_stg_copy_table)),substr(g_stg_copy_table,1,instr(g_stg_copy_table,'.')-1));
12894: return true;
12895: Exception when others then
12896: g_status_message:=sqlerrm;

Line 12903: if EDW_OWB_COLLECTION_UTIL.drop_table(p_table_name)=false then

12899: End;
12900:
12901: function drop_input_tables(p_table_name varchar2) return boolean is
12902: Begin
12903: if EDW_OWB_COLLECTION_UTIL.drop_table(p_table_name)=false then
12904: null;
12905: end if;
12906: if EDW_OWB_COLLECTION_UTIL.drop_table(p_table_name||'_SC')=false then
12907: null;

Line 12906: if EDW_OWB_COLLECTION_UTIL.drop_table(p_table_name||'_SC')=false then

12902: Begin
12903: if EDW_OWB_COLLECTION_UTIL.drop_table(p_table_name)=false then
12904: null;
12905: end if;
12906: if EDW_OWB_COLLECTION_UTIL.drop_table(p_table_name||'_SC')=false then
12907: null;
12908: end if;
12909: if EDW_OWB_COLLECTION_UTIL.drop_table(p_table_name||'_DC')=false then
12910: null;

Line 12909: if EDW_OWB_COLLECTION_UTIL.drop_table(p_table_name||'_DC')=false then

12905: end if;
12906: if EDW_OWB_COLLECTION_UTIL.drop_table(p_table_name||'_SC')=false then
12907: null;
12908: end if;
12909: if EDW_OWB_COLLECTION_UTIL.drop_table(p_table_name||'_DC')=false then
12910: null;
12911: end if;
12912: if EDW_OWB_COLLECTION_UTIL.drop_table(p_table_name||'_SL')=false then
12913: null;

Line 12912: if EDW_OWB_COLLECTION_UTIL.drop_table(p_table_name||'_SL')=false then

12908: end if;
12909: if EDW_OWB_COLLECTION_UTIL.drop_table(p_table_name||'_DC')=false then
12910: null;
12911: end if;
12912: if EDW_OWB_COLLECTION_UTIL.drop_table(p_table_name||'_SL')=false then
12913: null;
12914: end if;
12915: if EDW_OWB_COLLECTION_UTIL.drop_table(p_table_name||'_SU')=false then
12916: null;

Line 12915: if EDW_OWB_COLLECTION_UTIL.drop_table(p_table_name||'_SU')=false then

12911: end if;
12912: if EDW_OWB_COLLECTION_UTIL.drop_table(p_table_name||'_SL')=false then
12913: null;
12914: end if;
12915: if EDW_OWB_COLLECTION_UTIL.drop_table(p_table_name||'_SU')=false then
12916: null;
12917: end if;
12918: return true;
12919: Exception when others then

Line 13313: if EDW_OWB_COLLECTION_UTIL.merge_all_ilog_tables(

13309: else
13310: l_ok_rowid_table:=g_ok_rowid_table;
13311: l_ok_rowid_table2:=g_ok_rowid_table||'A';
13312: end if;
13313: if EDW_OWB_COLLECTION_UTIL.merge_all_ilog_tables(
13314: g_ok_rowid_table,
13315: l_ok_rowid_table,
13316: l_ok_rowid_table2,
13317: 'OK',

Line 13324: if EDW_OWB_COLLECTION_UTIL.does_table_have_data(l_ok_rowid_table,' status=1 ')=2 then

13320: g_parallel)=false then
13321: return false;
13322: end if;
13323: --update the collection status of Interface table to ready if there is status 1 in ok tables
13324: if EDW_OWB_COLLECTION_UTIL.does_table_have_data(l_ok_rowid_table,' status=1 ')=2 then
13325: if g_debug then
13326: write_to_log_file_n(l_ok_rowid_table||' has status 1. we need to update interface table '||
13327: 'to READY for these rows');
13328: end if;

Line 13355: if EDW_OWB_COLLECTION_UTIL.drop_table(g_ok_rowid_table)=false then

13351: g_ok_rowid_table:=substr(g_ok_rowid_table,1,length(g_ok_rowid_table)-1);
13352: else
13353: g_ok_rowid_table:=g_ok_rowid_table||'A';
13354: end if;
13355: if EDW_OWB_COLLECTION_UTIL.drop_table(g_ok_rowid_table)=false then
13356: null;
13357: end if;
13358: g_stmt:='create table '||g_ok_rowid_table||' tablespace '||g_op_table_space;
13359: g_stmt:=g_stmt||' storage (initial 4M next 4M pctincrease 0) ';

Line 13384: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(g_ok_rowid_table,instr(g_ok_rowid_table,'.')+1,

13380: execute immediate g_stmt;
13381: if g_debug then
13382: write_to_log_file_n('Created index '||get_time);
13383: end if;
13384: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(g_ok_rowid_table,instr(g_ok_rowid_table,'.')+1,
13385: length(g_ok_rowid_table)),substr(g_ok_rowid_table,1,instr(g_ok_rowid_table,'.')-1));
13386: if EDW_OWB_COLLECTION_UTIL.drop_table(l_ok_table)=false then
13387: null;
13388: end if;

Line 13386: if EDW_OWB_COLLECTION_UTIL.drop_table(l_ok_table)=false then

13382: write_to_log_file_n('Created index '||get_time);
13383: end if;
13384: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(g_ok_rowid_table,instr(g_ok_rowid_table,'.')+1,
13385: length(g_ok_rowid_table)),substr(g_ok_rowid_table,1,instr(g_ok_rowid_table,'.')-1));
13386: if EDW_OWB_COLLECTION_UTIL.drop_table(l_ok_table)=false then
13387: null;
13388: end if;
13389: return true;
13390: Exception when others then

Line 13404: if EDW_OWB_COLLECTION_UTIL.make_ilog_from_main_ilog(

13400: ) return boolean is
13401: l_err_rec_flag boolean;
13402: Begin
13403: write_to_debug_n('In make_ok_from_main_ok '||p_ok_table||' '||p_low_end||' '||p_high_end);
13404: if EDW_OWB_COLLECTION_UTIL.make_ilog_from_main_ilog(
13405: g_ok_rowid_table,
13406: p_ok_table,
13407: p_low_end,
13408: p_high_end,

Line 13434: if EDW_OWB_COLLECTION_UTIL.set_session_parameters(g_hash_area_size,g_sort_area_size,

13430: called when being run as a job
13431: */
13432: function set_session_parameters return boolean is
13433: Begin
13434: if EDW_OWB_COLLECTION_UTIL.set_session_parameters(g_hash_area_size,g_sort_area_size,
13435: g_trace,g_parallel)=false then
13436: return false;
13437: end if;
13438: return true;

Line 13458: l_owner:=EDW_OWB_COLLECTION_UTIL.get_table_owner(g_fact_dlog);

13454: l_dlog:=substr(g_fact_dlog,instr(g_fact_dlog,'.')+1,length(g_fact_dlog));
13455: l_owner:=g_bis_owner;
13456: else
13457: l_dlog:=g_fact_dlog;
13458: l_owner:=EDW_OWB_COLLECTION_UTIL.get_table_owner(g_fact_dlog);
13459: end if;
13460: if EDW_OWB_COLLECTION_UTIL.get_db_columns_for_table(l_dlog,g_dlog_columns,g_number_dlog_columns,
13461: l_owner) = false then
13462: return false;

Line 13460: if EDW_OWB_COLLECTION_UTIL.get_db_columns_for_table(l_dlog,g_dlog_columns,g_number_dlog_columns,

13456: else
13457: l_dlog:=g_fact_dlog;
13458: l_owner:=EDW_OWB_COLLECTION_UTIL.get_table_owner(g_fact_dlog);
13459: end if;
13460: if EDW_OWB_COLLECTION_UTIL.get_db_columns_for_table(l_dlog,g_dlog_columns,g_number_dlog_columns,
13461: l_owner) = false then
13462: return false;
13463: end if;
13464: if EDW_OWB_COLLECTION_UTIL.check_table(g_fact_dlog) then

Line 13464: if EDW_OWB_COLLECTION_UTIL.check_table(g_fact_dlog) then

13460: if EDW_OWB_COLLECTION_UTIL.get_db_columns_for_table(l_dlog,g_dlog_columns,g_number_dlog_columns,
13461: l_owner) = false then
13462: return false;
13463: end if;
13464: if EDW_OWB_COLLECTION_UTIL.check_table(g_fact_dlog) then
13465: if EDW_OWB_COLLECTION_UTIL.does_table_have_data(g_fact_dlog)=2 then
13466: g_dlog_has_data:=true;
13467: if create_dlog_lookup_table=false then
13468: return false;

Line 13465: if EDW_OWB_COLLECTION_UTIL.does_table_have_data(g_fact_dlog)=2 then

13461: l_owner) = false then
13462: return false;
13463: end if;
13464: if EDW_OWB_COLLECTION_UTIL.check_table(g_fact_dlog) then
13465: if EDW_OWB_COLLECTION_UTIL.does_table_have_data(g_fact_dlog)=2 then
13466: g_dlog_has_data:=true;
13467: if create_dlog_lookup_table=false then
13468: return false;
13469: end if;

Line 13497: l_lstg_count:=EDW_OWB_COLLECTION_UTIL.get_table_count_stats(g_fstgTableName,g_table_owner);

13493: if g_debug then
13494: write_to_log_file_n('In set_stg_nl_parameters '||p_load_size);
13495: end if;
13496: g_stg_join_nl:=true;
13497: l_lstg_count:=EDW_OWB_COLLECTION_UTIL.get_table_count_stats(g_fstgTableName,g_table_owner);
13498: if p_load_size>g_collection_size then
13499: l_load_size:=g_collection_size;
13500: else
13501: l_load_size:=p_load_size;

Line 13505: g_stg_join_nl:=EDW_OWB_COLLECTION_UTIL.get_join_nl(l_load_size,l_lstg_count,

13501: l_load_size:=p_load_size;
13502: end if;
13503: write_to_debug_n('lstg count is '||l_lstg_count||', l_load_size='||l_load_size);
13504: if l_lstg_count is not null and l_lstg_count>0 then
13505: g_stg_join_nl:=EDW_OWB_COLLECTION_UTIL.get_join_nl(l_load_size,l_lstg_count,
13506: g_stg_join_nl_percentage);
13507: if g_use_mti=false then
13508: if check_stg_make_copy(l_load_size,l_lstg_count)=false then
13509: g_stg_copy_table_flag:=false;

Line 13539: l_parameter EDW_OWB_COLLECTION_UTIL.varcharTableType;

13535: p_temp_exe_name varchar2,
13536: p_bis_short_name varchar2
13537: ) return boolean is
13538: l_exe_file_name varchar2(200);
13539: l_parameter EDW_OWB_COLLECTION_UTIL.varcharTableType;
13540: l_parameter_value_set EDW_OWB_COLLECTION_UTIL.varcharTableType;
13541: l_number_parameters number;
13542: Begin
13543: l_exe_file_name:='EDW_MAPPING_COLLECT.COLLECT';

Line 13540: l_parameter_value_set EDW_OWB_COLLECTION_UTIL.varcharTableType;

13536: p_bis_short_name varchar2
13537: ) return boolean is
13538: l_exe_file_name varchar2(200);
13539: l_parameter EDW_OWB_COLLECTION_UTIL.varcharTableType;
13540: l_parameter_value_set EDW_OWB_COLLECTION_UTIL.varcharTableType;
13541: l_number_parameters number;
13542: Begin
13543: l_exe_file_name:='EDW_MAPPING_COLLECT.COLLECT';
13544: l_parameter(1):='p_object_name';

Line 13559: if EDW_OWB_COLLECTION_UTIL.create_conc_program(

13555: l_parameter_value_set(6):='FND_NUMBER';
13556: l_parameter(7):='p_rownum_for_seq_num';
13557: l_parameter_value_set(7):='FND_NUMBER';
13558: l_number_parameters:=7;
13559: if EDW_OWB_COLLECTION_UTIL.create_conc_program(
13560: p_temp_conc_name,
13561: p_temp_conc_short_name,
13562: p_temp_exe_name,
13563: l_exe_file_name,

Line 13585: l_parameter EDW_OWB_COLLECTION_UTIL.varcharTableType;

13581: p_temp_exe_name varchar2,
13582: p_bis_short_name varchar2
13583: ) return boolean is
13584: l_exe_file_name varchar2(200);
13585: l_parameter EDW_OWB_COLLECTION_UTIL.varcharTableType;
13586: l_parameter_value_set EDW_OWB_COLLECTION_UTIL.varcharTableType;
13587: l_number_parameters number;
13588: Begin
13589: l_exe_file_name:=upper('EDW_MAPPING_COLLECT.execute_duplicate_stmt_multi');

Line 13586: l_parameter_value_set EDW_OWB_COLLECTION_UTIL.varcharTableType;

13582: p_bis_short_name varchar2
13583: ) return boolean is
13584: l_exe_file_name varchar2(200);
13585: l_parameter EDW_OWB_COLLECTION_UTIL.varcharTableType;
13586: l_parameter_value_set EDW_OWB_COLLECTION_UTIL.varcharTableType;
13587: l_number_parameters number;
13588: Begin
13589: l_exe_file_name:=upper('EDW_MAPPING_COLLECT.execute_duplicate_stmt_multi');
13590: l_parameter(1):='p_object_name';

Line 13623: if EDW_OWB_COLLECTION_UTIL.create_conc_program(

13619: l_parameter_value_set(15):='FND_CHAR240';
13620: l_parameter(16):='p_status_table';
13621: l_parameter_value_set(16):='FND_CHAR240';
13622: l_number_parameters:=16;
13623: if EDW_OWB_COLLECTION_UTIL.create_conc_program(
13624: p_temp_conc_name,
13625: p_temp_conc_short_name,
13626: p_temp_exe_name,
13627: l_exe_file_name,

Line 13644: l_fstg_measures edw_owb_collection_util.varcharTableType;

13640: End;
13641:
13642: function create_user_measure_fk_table
13643: return boolean is
13644: l_fstg_measures edw_owb_collection_util.varcharTableType;
13645: l_fstg_data_type edw_owb_collection_util.varcharTableType;
13646: l_fstg_data_len edw_owb_collection_util.varcharTableType;
13647: l_num_fstg_measures number;
13648: ----

Line 13645: l_fstg_data_type edw_owb_collection_util.varcharTableType;

13641:
13642: function create_user_measure_fk_table
13643: return boolean is
13644: l_fstg_measures edw_owb_collection_util.varcharTableType;
13645: l_fstg_data_type edw_owb_collection_util.varcharTableType;
13646: l_fstg_data_len edw_owb_collection_util.varcharTableType;
13647: l_num_fstg_measures number;
13648: ----
13649: l_fstg_fk edw_owb_collection_util.varcharTableType;

Line 13646: l_fstg_data_len edw_owb_collection_util.varcharTableType;

13642: function create_user_measure_fk_table
13643: return boolean is
13644: l_fstg_measures edw_owb_collection_util.varcharTableType;
13645: l_fstg_data_type edw_owb_collection_util.varcharTableType;
13646: l_fstg_data_len edw_owb_collection_util.varcharTableType;
13647: l_num_fstg_measures number;
13648: ----
13649: l_fstg_fk edw_owb_collection_util.varcharTableType;
13650: l_fstg_fk_data_type edw_owb_collection_util.varcharTableType;

Line 13649: l_fstg_fk edw_owb_collection_util.varcharTableType;

13645: l_fstg_data_type edw_owb_collection_util.varcharTableType;
13646: l_fstg_data_len edw_owb_collection_util.varcharTableType;
13647: l_num_fstg_measures number;
13648: ----
13649: l_fstg_fk edw_owb_collection_util.varcharTableType;
13650: l_fstg_fk_data_type edw_owb_collection_util.varcharTableType;
13651: l_fstg_fk_data_len edw_owb_collection_util.varcharTableType;
13652: l_num_fstg_fk number;
13653: ----

Line 13650: l_fstg_fk_data_type edw_owb_collection_util.varcharTableType;

13646: l_fstg_data_len edw_owb_collection_util.varcharTableType;
13647: l_num_fstg_measures number;
13648: ----
13649: l_fstg_fk edw_owb_collection_util.varcharTableType;
13650: l_fstg_fk_data_type edw_owb_collection_util.varcharTableType;
13651: l_fstg_fk_data_len edw_owb_collection_util.varcharTableType;
13652: l_num_fstg_fk number;
13653: ----
13654: l_size number;

Line 13651: l_fstg_fk_data_len edw_owb_collection_util.varcharTableType;

13647: l_num_fstg_measures number;
13648: ----
13649: l_fstg_fk edw_owb_collection_util.varcharTableType;
13650: l_fstg_fk_data_type edw_owb_collection_util.varcharTableType;
13651: l_fstg_fk_data_len edw_owb_collection_util.varcharTableType;
13652: l_num_fstg_fk number;
13653: ----
13654: l_size number;
13655: l_index integer;

Line 13657: l_std_columns edw_owb_collection_util.varcharTableType;

13653: ----
13654: l_size number;
13655: l_index integer;
13656: ----
13657: l_std_columns edw_owb_collection_util.varcharTableType;
13658: l_num_std_columns number;
13659: ----
13660: Begin
13661: if g_debug then

Line 13690: if edw_owb_collection_util.value_in_table(l_fstg_measures,l_num_fstg_measures,l_std_columns(i))=false then

13686: --add the std columns like operation code
13687: l_num_std_columns:=1;
13688: l_std_columns(l_num_std_columns):='OPERATION_CODE';
13689: for i in 1..l_num_std_columns loop
13690: if edw_owb_collection_util.value_in_table(l_fstg_measures,l_num_fstg_measures,l_std_columns(i))=false then
13691: l_index:=edw_owb_collection_util.index_in_table(g_fstg_columns,g_number_fstg_columns,l_std_columns(i));
13692: if l_index>0 then
13693: l_num_fstg_measures:=l_num_fstg_measures+1;
13694: l_fstg_measures(l_num_fstg_measures):=g_fstg_columns(l_index);

Line 13691: l_index:=edw_owb_collection_util.index_in_table(g_fstg_columns,g_number_fstg_columns,l_std_columns(i));

13687: l_num_std_columns:=1;
13688: l_std_columns(l_num_std_columns):='OPERATION_CODE';
13689: for i in 1..l_num_std_columns loop
13690: if edw_owb_collection_util.value_in_table(l_fstg_measures,l_num_fstg_measures,l_std_columns(i))=false then
13691: l_index:=edw_owb_collection_util.index_in_table(g_fstg_columns,g_number_fstg_columns,l_std_columns(i));
13692: if l_index>0 then
13693: l_num_fstg_measures:=l_num_fstg_measures+1;
13694: l_fstg_measures(l_num_fstg_measures):=g_fstg_columns(l_index);
13695: l_fstg_data_type(l_num_fstg_measures):=g_data_type(l_index);

Line 13726: if edw_owb_collection_util.drop_table(g_user_measure_table)=false then

13722: l_size||' pctincrease 0 MAXEXTENTS 2147483645)';
13723: if g_parallel is not null then
13724: g_stmt:=g_stmt||' parallel(degree '||g_parallel||')';
13725: end if;
13726: if edw_owb_collection_util.drop_table(g_user_measure_table)=false then
13727: null;
13728: end if;
13729: if g_debug then
13730: write_to_log_file_n(g_stmt);

Line 13753: if EDW_OWB_COLLECTION_UTIL.value_in_table(l_fstg_fk,l_num_fstg_fk,g_instance_column)=false then

13749: end loop;
13750: end if;
13751: end loop;
13752: if g_instance_column is not null then
13753: if EDW_OWB_COLLECTION_UTIL.value_in_table(l_fstg_fk,l_num_fstg_fk,g_instance_column)=false then
13754: l_num_fstg_fk:=l_num_fstg_fk+1;
13755: l_fstg_fk(l_num_fstg_fk):=g_instance_column;
13756: l_fstg_fk_data_type(l_num_fstg_fk):='VARCHAR2';
13757: l_fstg_fk_data_len(l_num_fstg_fk):='80';

Line 13780: if edw_owb_collection_util.drop_table(g_user_fk_table)=false then

13776: l_size||' pctincrease 0 MAXEXTENTS 2147483645)';
13777: if g_parallel is not null then
13778: g_stmt:=g_stmt||' parallel(degree '||g_parallel||')';
13779: end if;
13780: if edw_owb_collection_util.drop_table(g_user_fk_table)=false then
13781: null;
13782: end if;
13783: if g_debug then
13784: write_to_log_file_n(g_stmt);

Line 13803: l_fstg_measures edw_owb_collection_util.varcharTableType;

13799: */
13800: function insert_fm_ff_table
13801: return boolean is
13802: ------
13803: l_fstg_measures edw_owb_collection_util.varcharTableType;
13804: l_num_fstg_measures number;
13805: l_fstg_fk edw_owb_collection_util.varcharTableType;
13806: l_num_fstg_fk number;
13807: ------

Line 13805: l_fstg_fk edw_owb_collection_util.varcharTableType;

13801: return boolean is
13802: ------
13803: l_fstg_measures edw_owb_collection_util.varcharTableType;
13804: l_num_fstg_measures number;
13805: l_fstg_fk edw_owb_collection_util.varcharTableType;
13806: l_num_fstg_fk number;
13807: ------
13808: l_table varchar2(200);
13809: l_stmt varchar2(5000);

Line 13816: if edw_owb_collection_util.get_db_columns_for_table(g_user_fk_table,l_fstg_fk,l_num_fstg_fk,g_bis_owner)=false then

13812: if g_debug then
13813: write_to_log_file_n('In insert_fm_ff_table '||get_time);
13814: end if;
13815: l_table:=g_ok_rowid_table||'A';
13816: if edw_owb_collection_util.get_db_columns_for_table(g_user_fk_table,l_fstg_fk,l_num_fstg_fk,g_bis_owner)=false then
13817: return false;
13818: end if;
13819: if g_debug then
13820: write_to_log_file_n('The user fk table columns');

Line 13825: if edw_owb_collection_util.get_db_columns_for_table(g_user_measure_table,l_fstg_measures,

13821: for i in 1..l_num_fstg_fk loop
13822: write_to_log_file(l_fstg_fk(i));
13823: end loop;
13824: end if;
13825: if edw_owb_collection_util.get_db_columns_for_table(g_user_measure_table,l_fstg_measures,
13826: l_num_fstg_measures,g_bis_owner)=false then
13827: return false;
13828: end if;
13829: if g_debug then

Line 13867: if edw_owb_collection_util.value_in_table(l_fstg_measures,l_num_fstg_measures,l_fstg_fk(i))=false then

13863: end if;
13864: end loop;
13865: for i in 1..l_num_fstg_fk loop
13866: if l_fstg_fk(i)<>'ROW_ID' then
13867: if edw_owb_collection_util.value_in_table(l_fstg_measures,l_num_fstg_measures,l_fstg_fk(i))=false then
13868: g_stmt:=g_stmt||l_fstg_fk(i)||',';
13869: end if;
13870: end if;
13871: end loop;

Line 13879: if EDW_OWB_COLLECTION_UTIL.drop_table(l_table)=false then

13875: if g_parallel is not null then
13876: l_stmt:=l_stmt||' parallel (degree '||g_parallel||') ';
13877: end if;
13878: l_stmt:=l_stmt||' as select row_id from '||g_ok_rowid_table||' where status=1';
13879: if EDW_OWB_COLLECTION_UTIL.drop_table(l_table)=false then
13880: null;
13881: end if;
13882: if g_debug then
13883: write_to_log_file_n('Going to execute '||l_stmt||get_time);

Line 13892: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(l_table,instr(l_table,'.')+1,

13888: end if;
13889: if g_debug then
13890: write_to_log_file_n('Created with '||sql%rowcount||' rows '||get_time);
13891: end if;
13892: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(l_table,instr(l_table,'.')+1,
13893: length(l_table)),substr(l_table,1,instr(l_table,'.')-1));
13894: if g_debug then
13895: write_to_log_file_n(g_stmt||get_time);
13896: end if;

Line 13902: if EDW_OWB_COLLECTION_UTIL.drop_table(l_table)=false then

13898: if g_debug then
13899: write_to_log_file_n('Loaded '||sql%rowcount||' rows '||get_time);
13900: end if;
13901: --drop the l_table
13902: if EDW_OWB_COLLECTION_UTIL.drop_table(l_table)=false then
13903: null;
13904: end if;
13905: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(g_user_measure_table,instr(g_user_measure_table,'.')+1,
13906: length(g_user_measure_table)),substr(g_user_measure_table,1,instr(g_user_measure_table,'.')-1));

Line 13905: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(g_user_measure_table,instr(g_user_measure_table,'.')+1,

13901: --drop the l_table
13902: if EDW_OWB_COLLECTION_UTIL.drop_table(l_table)=false then
13903: null;
13904: end if;
13905: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(g_user_measure_table,instr(g_user_measure_table,'.')+1,
13906: length(g_user_measure_table)),substr(g_user_measure_table,1,instr(g_user_measure_table,'.')-1));
13907: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(g_user_fk_table,instr(g_user_fk_table,'.')+1,
13908: length(g_user_fk_table)),substr(g_user_fk_table,1,instr(g_user_fk_table,'.')-1));
13909: commit;

Line 13907: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(g_user_fk_table,instr(g_user_fk_table,'.')+1,

13903: null;
13904: end if;
13905: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(g_user_measure_table,instr(g_user_measure_table,'.')+1,
13906: length(g_user_measure_table)),substr(g_user_measure_table,1,instr(g_user_measure_table,'.')-1));
13907: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(g_user_fk_table,instr(g_user_fk_table,'.')+1,
13908: length(g_user_fk_table)),substr(g_user_fk_table,1,instr(g_user_fk_table,'.')-1));
13909: commit;
13910: return true;
13911: Exception when others then

Line 13919: if edw_owb_collection_util.get_db_columns_for_table(

13915: End;
13916:
13917: function get_fstg_col_parameters return boolean is
13918: Begin
13919: if edw_owb_collection_util.get_db_columns_for_table(
13920: g_fstgTableName,
13921: g_fstg_columns,
13922: g_data_type,
13923: g_data_length,

Line 13983: ''||nvl(edw_owb_collection_util.g_conc_program_id,0)||','||

13979: ''''||g_bis_owner||''','||
13980: ''||nvl(g_sort_area_size,0)||','||
13981: ''||nvl(g_hash_area_size,0)||','||
13982: ''||g_load_pk||','||
13983: ''||nvl(edw_owb_collection_util.g_conc_program_id,0)||','||
13984: '1);');
13985: end if;
13986: DBMS_JOB.SUBMIT(g_ltc_drill_down_job_id,'EDW_MAPPING_COLLECT.drill_parent_to_children('||
13987: ''''||g_primary_target_name||''','||

Line 14002: ''||nvl(edw_owb_collection_util.g_conc_program_id,0)||','||

13998: ''''||g_bis_owner||''','||
13999: ''||nvl(g_sort_area_size,0)||','||
14000: ''||nvl(g_hash_area_size,0)||','||
14001: ''||g_load_pk||','||
14002: ''||nvl(edw_owb_collection_util.g_conc_program_id,0)||','||
14003: '1);');
14004: end if;
14005: if g_ltc_drill_down_job_id is not null and g_ltc_drill_down_job_id>0 then
14006: if g_debug then

Line 14010: if edw_owb_collection_util.update_status_table(g_dd_status_table,'status','RUNNING','where parent_ltc_id='||

14006: if g_debug then
14007: write_to_log_file_n('Job '||g_ltc_drill_down_job_id||' launched '||get_time);
14008: end if;
14009: --update the status table;
14010: if edw_owb_collection_util.update_status_table(g_dd_status_table,'status','RUNNING','where parent_ltc_id='||
14011: g_primary_target)=false then
14012: return false;
14013: end if;
14014: if edw_owb_collection_util.update_status_table(g_dd_status_table,'job_id',g_ltc_drill_down_job_id,

Line 14014: if edw_owb_collection_util.update_status_table(g_dd_status_table,'job_id',g_ltc_drill_down_job_id,

14010: if edw_owb_collection_util.update_status_table(g_dd_status_table,'status','RUNNING','where parent_ltc_id='||
14011: g_primary_target)=false then
14012: return false;
14013: end if;
14014: if edw_owb_collection_util.update_status_table(g_dd_status_table,'job_id',g_ltc_drill_down_job_id,
14015: 'where parent_ltc_id='||g_primary_target)=false then
14016: return false;
14017: end if;
14018: commit;--job starts in the database

Line 14041: l_status edw_owb_collection_util.varcharTableType;

14037: it needs to see if its parent ltc has finished the drill down
14038: */
14039: function check_dim_drill_down return boolean is
14040: --
14041: l_status edw_owb_collection_util.varcharTableType;
14042: l_num_status number;
14043: l_names edw_owb_collection_util.varcharTableType;
14044: l_num_names number;
14045: l_parent varchar2(200);

Line 14043: l_names edw_owb_collection_util.varcharTableType;

14039: function check_dim_drill_down return boolean is
14040: --
14041: l_status edw_owb_collection_util.varcharTableType;
14042: l_num_status number;
14043: l_names edw_owb_collection_util.varcharTableType;
14044: l_num_names number;
14045: l_parent varchar2(200);
14046: l_parent_id number;
14047: l_job_id number;

Line 14061: if edw_owb_collection_util.query_table_cols(g_dd_status_table,'status',' where child_ltc_id='||g_primary_target,

14057: end if;
14058: l_not_done:=false;
14059: --g_dd_status_table
14060: --first check the status. if done, we can proceed
14061: if edw_owb_collection_util.query_table_cols(g_dd_status_table,'status',' where child_ltc_id='||g_primary_target,
14062: l_status,l_num_status)=false then
14063: return false;
14064: end if;
14065: for i in 1..l_num_status loop

Line 14085: if edw_owb_collection_util.query_table_cols(g_dd_status_table,'parent_ltc||''+''||parent_ltc_id||''+''||job_id',

14081: end if;
14082: --get all the job ids. see if they are running. then wait. after all are done, check the status. if
14083: --any one is not done, have to manually do it.
14084: l_num_status:=0;
14085: if edw_owb_collection_util.query_table_cols(g_dd_status_table,'parent_ltc||''+''||parent_ltc_id||''+''||job_id',
14086: ' where child_ltc_id='||g_primary_target||' and status<>''DONE''',l_status,l_num_status)=false then
14087: return false;
14088: end if;
14089: for i in 1..l_num_status loop

Line 14090: if edw_owb_collection_util.parse_names(l_status(i),'+',l_names,l_num_names)=false then

14086: ' where child_ltc_id='||g_primary_target||' and status<>''DONE''',l_status,l_num_status)=false then
14087: return false;
14088: end if;
14089: for i in 1..l_num_status loop
14090: if edw_owb_collection_util.parse_names(l_status(i),'+',l_names,l_num_names)=false then
14091: return false;
14092: end if;
14093: l_parent:=l_names(1);
14094: l_parent_id:=l_names(2);

Line 14097: if edw_owb_collection_util.check_job_status(l_job_id)='Y' then

14093: l_parent:=l_names(1);
14094: l_parent_id:=l_names(2);
14095: l_job_id:=to_number(l_names(3));
14096: l_job_running:=false;
14097: if edw_owb_collection_util.check_job_status(l_job_id)='Y' then
14098: if edw_owb_collection_util.check_table(g_bis_owner||'.TAB_MARKER_DD_'||l_parent_id) then
14099: l_job_running:=true;
14100: end if;
14101: end if;

Line 14098: if edw_owb_collection_util.check_table(g_bis_owner||'.TAB_MARKER_DD_'||l_parent_id) then

14094: l_parent_id:=l_names(2);
14095: l_job_id:=to_number(l_names(3));
14096: l_job_running:=false;
14097: if edw_owb_collection_util.check_job_status(l_job_id)='Y' then
14098: if edw_owb_collection_util.check_table(g_bis_owner||'.TAB_MARKER_DD_'||l_parent_id) then
14099: l_job_running:=true;
14100: end if;
14101: end if;
14102: if l_job_running then

Line 14103: if edw_owb_collection_util.wait_on_jobs(l_job_id,g_sleep_time,'JOB')=false then

14099: l_job_running:=true;
14100: end if;
14101: end if;
14102: if l_job_running then
14103: if edw_owb_collection_util.wait_on_jobs(l_job_id,g_sleep_time,'JOB')=false then
14104: return false;
14105: end if;
14106: --then requery the status and see if its an error
14107: l_num_status:=0;

Line 14108: if edw_owb_collection_util.query_table_cols(g_dd_status_table,'status',

14104: return false;
14105: end if;
14106: --then requery the status and see if its an error
14107: l_num_status:=0;
14108: if edw_owb_collection_util.query_table_cols(g_dd_status_table,'status',
14109: ' where child_ltc_id='||g_primary_target||' and parent_ltc_id='||l_parent_id,
14110: l_status,l_num_status)=false then
14111: return false;
14112: end if;

Line 14120: if edw_owb_collection_util.terminate_job(l_job_id)=false then

14116: end if;
14117: else
14118: --this is a crashed process
14119: --terminate it
14120: if edw_owb_collection_util.terminate_job(l_job_id)=false then
14121: null;
14122: end if;
14123: if g_debug then
14124: write_to_log_file_n(l_job_id||' has crashed...going to manually push down');

Line 14172: l_child_ltc EDW_OWB_COLLECTION_UTIL.varcharTableType;

14168: p_job number --1 means that this is a job
14169: --
14170: )is
14171: --
14172: l_child_ltc EDW_OWB_COLLECTION_UTIL.varcharTableType;
14173: l_child_ltc_id EDW_OWB_COLLECTION_UTIL.numberTableType;
14174: l_num_child_ltc number;
14175: --
14176: l_parent_ltc EDW_OWB_COLLECTION_UTIL.varcharTableType;

Line 14173: l_child_ltc_id EDW_OWB_COLLECTION_UTIL.numberTableType;

14169: --
14170: )is
14171: --
14172: l_child_ltc EDW_OWB_COLLECTION_UTIL.varcharTableType;
14173: l_child_ltc_id EDW_OWB_COLLECTION_UTIL.numberTableType;
14174: l_num_child_ltc number;
14175: --
14176: l_parent_ltc EDW_OWB_COLLECTION_UTIL.varcharTableType;
14177: l_parent_ltc_id EDW_OWB_COLLECTION_UTIL.numberTableType;

Line 14176: l_parent_ltc EDW_OWB_COLLECTION_UTIL.varcharTableType;

14172: l_child_ltc EDW_OWB_COLLECTION_UTIL.varcharTableType;
14173: l_child_ltc_id EDW_OWB_COLLECTION_UTIL.numberTableType;
14174: l_num_child_ltc number;
14175: --
14176: l_parent_ltc EDW_OWB_COLLECTION_UTIL.varcharTableType;
14177: l_parent_ltc_id EDW_OWB_COLLECTION_UTIL.numberTableType;
14178: l_num_parent_ltc number;
14179: l_pci_table EDW_OWB_COLLECTION_UTIL.varcharTableType;
14180: l_parent_pci_table EDW_OWB_COLLECTION_UTIL.varcharTableType;

Line 14177: l_parent_ltc_id EDW_OWB_COLLECTION_UTIL.numberTableType;

14173: l_child_ltc_id EDW_OWB_COLLECTION_UTIL.numberTableType;
14174: l_num_child_ltc number;
14175: --
14176: l_parent_ltc EDW_OWB_COLLECTION_UTIL.varcharTableType;
14177: l_parent_ltc_id EDW_OWB_COLLECTION_UTIL.numberTableType;
14178: l_num_parent_ltc number;
14179: l_pci_table EDW_OWB_COLLECTION_UTIL.varcharTableType;
14180: l_parent_pci_table EDW_OWB_COLLECTION_UTIL.varcharTableType;
14181: --

Line 14179: l_pci_table EDW_OWB_COLLECTION_UTIL.varcharTableType;

14175: --
14176: l_parent_ltc EDW_OWB_COLLECTION_UTIL.varcharTableType;
14177: l_parent_ltc_id EDW_OWB_COLLECTION_UTIL.numberTableType;
14178: l_num_parent_ltc number;
14179: l_pci_table EDW_OWB_COLLECTION_UTIL.varcharTableType;
14180: l_parent_pci_table EDW_OWB_COLLECTION_UTIL.varcharTableType;
14181: --
14182: l_stmt varchar2(4000);
14183: TYPE CurTyp IS REF CURSOR;

Line 14180: l_parent_pci_table EDW_OWB_COLLECTION_UTIL.varcharTableType;

14176: l_parent_ltc EDW_OWB_COLLECTION_UTIL.varcharTableType;
14177: l_parent_ltc_id EDW_OWB_COLLECTION_UTIL.numberTableType;
14178: l_num_parent_ltc number;
14179: l_pci_table EDW_OWB_COLLECTION_UTIL.varcharTableType;
14180: l_parent_pci_table EDW_OWB_COLLECTION_UTIL.varcharTableType;
14181: --
14182: l_stmt varchar2(4000);
14183: TYPE CurTyp IS REF CURSOR;
14184: cv CurTyp;

Line 14196: if edw_owb_collection_util.create_prot_table(l_marker_table,g_op_table_space)=false then

14192: if p_job=1 then --this is a dbms job
14193: g_op_table_space:=p_op_table_space;
14194: g_bis_owner:=p_bis_owner;
14195: l_marker_table:=g_bis_owner||'.TAB_MARKER_DD_'||p_parent_id;
14196: if edw_owb_collection_util.create_prot_table(l_marker_table,g_op_table_space)=false then
14197: null;
14198: end if;
14199: if p_debug='Y' then
14200: g_debug:=true;

Line 14201: edw_owb_collection_util.setup_conc_program_log('DD_'||p_parent);

14197: null;
14198: end if;
14199: if p_debug='Y' then
14200: g_debug:=true;
14201: edw_owb_collection_util.setup_conc_program_log('DD_'||p_parent);
14202: edw_owb_collection_util.set_debug(true);
14203: else
14204: g_debug:=false;
14205: end if;

Line 14202: edw_owb_collection_util.set_debug(true);

14198: end if;
14199: if p_debug='Y' then
14200: g_debug:=true;
14201: edw_owb_collection_util.setup_conc_program_log('DD_'||p_parent);
14202: edw_owb_collection_util.set_debug(true);
14203: else
14204: g_debug:=false;
14205: end if;
14206: g_table_owner:=p_table_owner;

Line 14214: edw_owb_collection_util.alter_session('SORT_AREA_SIZE',g_sort_area_size);

14210: g_parallel:=null;
14211: end if;
14212: g_sort_area_size:=p_sort_area_size;
14213: if g_sort_area_size>0 then
14214: edw_owb_collection_util.alter_session('SORT_AREA_SIZE',g_sort_area_size);
14215: end if;
14216: g_hash_area_size:=p_hash_area_size;
14217: if g_hash_area_size>0 then
14218: edw_owb_collection_util.alter_session('HASH_AREA_SIZE',g_hash_area_size);

Line 14218: edw_owb_collection_util.alter_session('HASH_AREA_SIZE',g_hash_area_size);

14214: edw_owb_collection_util.alter_session('SORT_AREA_SIZE',g_sort_area_size);
14215: end if;
14216: g_hash_area_size:=p_hash_area_size;
14217: if g_hash_area_size>0 then
14218: edw_owb_collection_util.alter_session('HASH_AREA_SIZE',g_hash_area_size);
14219: end if;
14220: g_load_pk:=p_load_pk;
14221: g_conc_program_id:=p_conc_program_id;
14222: end if;

Line 14282: if edw_owb_collection_util.update_status_table(p_dd_table,'status','DONE','where parent_ltc_id='||

14278: l_pci_table(i))=false then
14279: raise l_exception;
14280: else
14281: --we want to update the status to success so that this child can proceed with its own dril down
14282: if edw_owb_collection_util.update_status_table(p_dd_table,'status','DONE','where parent_ltc_id='||
14283: p_parent_id||' and child_ltc_id='||l_child_ltc_id(i))=false then
14284: null;
14285: end if;
14286: commit;

Line 14296: if edw_owb_collection_util.update_status_table(p_dd_table,'status','DONE','where parent_ltc_id='||

14292: end if;
14293: if merge_pci_snplog(p_parent,p_parent_id,g_table_owner,p_parent_pk,p_ul_table)=false then
14294: raise l_exception;
14295: end if;
14296: if edw_owb_collection_util.update_status_table(p_dd_table,'status','DONE','where parent_ltc_id='||
14297: p_parent_id)=false then
14298: null;
14299: end if;
14300: commit;

Line 14302: if edw_owb_collection_util.drop_table(l_marker_table)=false then

14298: null;
14299: end if;
14300: commit;
14301: end if;
14302: if edw_owb_collection_util.drop_table(l_marker_table)=false then
14303: null;
14304: end if;
14305: --dbms job is done
14306: Exception

Line 14310: if edw_owb_collection_util.update_status_table(p_dd_table,'status','ERROR+++'||g_status_message,

14306: Exception
14307: when l_exception then
14308: --put into status table
14309: write_to_log_file_n(g_status_message);
14310: if edw_owb_collection_util.update_status_table(p_dd_table,'status','ERROR+++'||g_status_message,
14311: 'where parent_ltc_id='||p_parent_id)=false then
14312: null;
14313: end if;
14314: commit;

Line 14315: if edw_owb_collection_util.drop_table(l_marker_table)=false then

14311: 'where parent_ltc_id='||p_parent_id)=false then
14312: null;
14313: end if;
14314: commit;
14315: if edw_owb_collection_util.drop_table(l_marker_table)=false then
14316: null;
14317: end if;
14318: raise;
14319: when others then

Line 14322: if edw_owb_collection_util.update_status_table(p_dd_table,'status','ERROR+++'||sqlerrm,'where parent_ltc_id='||

14318: raise;
14319: when others then
14320: --put into status table
14321: write_to_log_file_n('Error in drill_parent_to_children '||sqlerrm);
14322: if edw_owb_collection_util.update_status_table(p_dd_table,'status','ERROR+++'||sqlerrm,'where parent_ltc_id='||
14323: p_parent_id)=false then
14324: null;
14325: end if;
14326: commit;

Line 14327: if edw_owb_collection_util.drop_table(l_marker_table)=false then

14323: p_parent_id)=false then
14324: null;
14325: end if;
14326: commit;
14327: if edw_owb_collection_util.drop_table(l_marker_table)=false then
14328: null;
14329: end if;
14330: raise;
14331: --end of dbms job

Line 14366: l_pk_col EDW_OWB_COLLECTION_UTIL.varcharTableType;

14362: and pk_col.column_id=pk_key.column_id
14363: and fk_key.key_id=lvl_rel.fk_id
14364: and fk_col.column_id=fk_key.column_id;
14365: --
14366: l_pk_col EDW_OWB_COLLECTION_UTIL.varcharTableType;
14367: l_fk_col EDW_OWB_COLLECTION_UTIL.varcharTableType;
14368: l_num_keys number;
14369: --
14370: l_parent_count number;

Line 14367: l_fk_col EDW_OWB_COLLECTION_UTIL.varcharTableType;

14363: and fk_key.key_id=lvl_rel.fk_id
14364: and fk_col.column_id=fk_key.column_id;
14365: --
14366: l_pk_col EDW_OWB_COLLECTION_UTIL.varcharTableType;
14367: l_fk_col EDW_OWB_COLLECTION_UTIL.varcharTableType;
14368: l_num_keys number;
14369: --
14370: l_parent_count number;
14371: l_ul_count number;

Line 14380: if edw_owb_collection_util.drop_table(p_pci_table)=false then

14376: Begin
14377: if g_debug then
14378: write_to_log_file_n('In drill_parent_to_child '||p_parent_id||' '||p_child_id||' '||get_time);
14379: end if;
14380: if edw_owb_collection_util.drop_table(p_pci_table)=false then
14381: null;
14382: end if;
14383: if edw_owb_collection_util.check_table(p_ul_table)=false then --if the parent ul table does not exist
14384: if g_debug then

Line 14383: if edw_owb_collection_util.check_table(p_ul_table)=false then --if the parent ul table does not exist

14379: end if;
14380: if edw_owb_collection_util.drop_table(p_pci_table)=false then
14381: null;
14382: end if;
14383: if edw_owb_collection_util.check_table(p_ul_table)=false then --if the parent ul table does not exist
14384: if g_debug then
14385: write_to_log_file_n('Parent UL table '||p_ul_table||' does not exist. Returning...');
14386: end if;
14387: return true;

Line 14423: l_ul_count:=edw_owb_collection_util.get_table_count_stats(p_ul_table,null);

14419: for i in 1..l_num_keys loop
14420: write_to_log_file(l_pk_col(i)||' '||l_fk_col(i));
14421: end loop;
14422: end if;
14423: l_ul_count:=edw_owb_collection_util.get_table_count_stats(p_ul_table,null);
14424: l_parent_count:=edw_owb_collection_util.get_table_count_stats(p_parent,g_table_owner);
14425: l_use_nl:=EDW_OWB_COLLECTION_UTIL.get_join_nl(l_ul_count,l_parent_count,g_stg_join_nl_percentage);
14426: l_stmt:='create table '||p_pci_table||' tablespace '||g_op_table_space;
14427: if g_parallel is not null then

Line 14424: l_parent_count:=edw_owb_collection_util.get_table_count_stats(p_parent,g_table_owner);

14420: write_to_log_file(l_pk_col(i)||' '||l_fk_col(i));
14421: end loop;
14422: end if;
14423: l_ul_count:=edw_owb_collection_util.get_table_count_stats(p_ul_table,null);
14424: l_parent_count:=edw_owb_collection_util.get_table_count_stats(p_parent,g_table_owner);
14425: l_use_nl:=EDW_OWB_COLLECTION_UTIL.get_join_nl(l_ul_count,l_parent_count,g_stg_join_nl_percentage);
14426: l_stmt:='create table '||p_pci_table||' tablespace '||g_op_table_space;
14427: if g_parallel is not null then
14428: l_stmt:=l_stmt||' parallel (degree '||g_parallel||') ';

Line 14425: l_use_nl:=EDW_OWB_COLLECTION_UTIL.get_join_nl(l_ul_count,l_parent_count,g_stg_join_nl_percentage);

14421: end loop;
14422: end if;
14423: l_ul_count:=edw_owb_collection_util.get_table_count_stats(p_ul_table,null);
14424: l_parent_count:=edw_owb_collection_util.get_table_count_stats(p_parent,g_table_owner);
14425: l_use_nl:=EDW_OWB_COLLECTION_UTIL.get_join_nl(l_ul_count,l_parent_count,g_stg_join_nl_percentage);
14426: l_stmt:='create table '||p_pci_table||' tablespace '||g_op_table_space;
14427: if g_parallel is not null then
14428: l_stmt:=l_stmt||' parallel (degree '||g_parallel||') ';
14429: end if;

Line 14471: p_pci_tables EDW_OWB_COLLECTION_UTIL.varcharTableType,

14467: function merge_all_update_rowids(
14468: p_ltc_id number,
14469: p_ul_table varchar2,
14470: p_ur_pattern varchar2,
14471: p_pci_tables EDW_OWB_COLLECTION_UTIL.varcharTableType,
14472: p_num_pci_tables number
14473: )return boolean is
14474: --
14475: l_table EDW_OWB_COLLECTION_UTIL.varcharTableType;

Line 14475: l_table EDW_OWB_COLLECTION_UTIL.varcharTableType;

14471: p_pci_tables EDW_OWB_COLLECTION_UTIL.varcharTableType,
14472: p_num_pci_tables number
14473: )return boolean is
14474: --
14475: l_table EDW_OWB_COLLECTION_UTIL.varcharTableType;
14476: l_num_table number;
14477: l_pci_table EDW_OWB_COLLECTION_UTIL.varcharTableType;
14478: l_num_pci_table number;
14479: --

Line 14477: l_pci_table EDW_OWB_COLLECTION_UTIL.varcharTableType;

14473: )return boolean is
14474: --
14475: l_table EDW_OWB_COLLECTION_UTIL.varcharTableType;
14476: l_num_table number;
14477: l_pci_table EDW_OWB_COLLECTION_UTIL.varcharTableType;
14478: l_num_pci_table number;
14479: --
14480: l_stmt varchar2(20000);
14481: --

Line 14488: --if edw_owb_collection_util.drop_table(p_ul_table)=false then

14484: write_to_log_file_n('In merge_all_update_rowids '||get_time);
14485: end if;
14486: l_num_table:=0;
14487: --p_ul_table needs to be dropped in init_all
14488: --if edw_owb_collection_util.drop_table(p_ul_table)=false then
14489: --null;
14490: --end if;
14491: --
14492: if edw_owb_collection_util.get_tables_matching_pattern(p_ur_pattern,g_bis_owner,l_table,l_num_table)=false then

Line 14492: if edw_owb_collection_util.get_tables_matching_pattern(p_ur_pattern,g_bis_owner,l_table,l_num_table)=false then

14488: --if edw_owb_collection_util.drop_table(p_ul_table)=false then
14489: --null;
14490: --end if;
14491: --
14492: if edw_owb_collection_util.get_tables_matching_pattern(p_ur_pattern,g_bis_owner,l_table,l_num_table)=false then
14493: return false;
14494: end if;
14495: for i in 1..l_num_table loop
14496: l_table(i):=g_bis_owner||'.'||l_table(i);

Line 14500: if edw_owb_collection_util.check_table(p_pci_tables(i)) then

14496: l_table(i):=g_bis_owner||'.'||l_table(i);
14497: end loop;
14498: l_num_pci_table:=0;
14499: for i in 1..p_num_pci_tables loop
14500: if edw_owb_collection_util.check_table(p_pci_tables(i)) then
14501: l_num_pci_table:=l_num_pci_table+1;
14502: l_pci_table(l_num_pci_table):=p_pci_tables(i);
14503: end if;
14504: end loop;

Line 14533: if edw_owb_collection_util.drop_table(l_table(i))=false then

14529: write_to_log_file_n('created with '||sql%rowcount||' rows '||get_time);
14530: end if;
14531: ------
14532: for i in 1..l_num_table loop
14533: if edw_owb_collection_util.drop_table(l_table(i))=false then
14534: null;
14535: end if;
14536: end loop;
14537: for i in 1..l_num_pci_table loop

Line 14538: if edw_owb_collection_util.drop_table(l_pci_table(i))=false then

14534: null;
14535: end if;
14536: end loop;
14537: for i in 1..l_num_pci_table loop
14538: if edw_owb_collection_util.drop_table(l_pci_table(i))=false then
14539: null;
14540: end if;
14541: end loop;
14542: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(p_ul_table,instr(p_ul_table,'.')+1,

Line 14542: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(p_ul_table,instr(p_ul_table,'.')+1,

14538: if edw_owb_collection_util.drop_table(l_pci_table(i))=false then
14539: null;
14540: end if;
14541: end loop;
14542: EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(p_ul_table,instr(p_ul_table,'.')+1,
14543: length(p_ul_table)),substr(p_ul_table,1,instr(p_ul_table,'.')-1));
14544: end if;
14545: return true;
14546: Exception when others then

Line 14589: if edw_owb_collection_util.drop_table(l_snplogs_L)=false then

14585: l_snplogs_L:=g_bis_owner||'.TAB_'||l_dim_id||'_'||l_prefix||'_L';
14586: if g_debug then
14587: write_to_log_file_n('l_snplogs_L='||l_snplogs_L);
14588: end if;
14589: if edw_owb_collection_util.drop_table(l_snplogs_L)=false then
14590: null;
14591: end if;
14592: if g_debug then
14593: write_to_log_file_n('select LOG_TABLE from all_snapshot_logs where master='||p_ltc||

Line 14602: if edw_owb_collection_util.check_table(p_ul_table) then

14598: close c1;
14599: if g_debug then
14600: write_to_log_file(l_snplog);
14601: end if;
14602: if edw_owb_collection_util.check_table(p_ul_table) then
14603: l_ul_found:=true;
14604: else
14605: l_ul_found:=false;
14606: end if;

Line 14608: if EDW_OWB_COLLECTION_UTIL.is_column_in_table(l_snplog,p_ltc_pk,p_table_owner) then

14604: else
14605: l_ul_found:=false;
14606: end if;
14607: if l_snplog is not null then
14608: if EDW_OWB_COLLECTION_UTIL.is_column_in_table(l_snplog,p_ltc_pk,p_table_owner) then
14609: l_ll_snplog_has_pk:=true;
14610: end if;
14611: if l_ul_found then
14612: l_table:=g_bis_owner||'.TAB_'||p_ltc_id||'_SNPLOG';

Line 14613: if edw_owb_collection_util.drop_table(l_table)=false then

14609: l_ll_snplog_has_pk:=true;
14610: end if;
14611: if l_ul_found then
14612: l_table:=g_bis_owner||'.TAB_'||p_ltc_id||'_SNPLOG';
14613: if edw_owb_collection_util.drop_table(l_table)=false then
14614: null;
14615: end if;
14616: else
14617: --if ul table is not there, we can directly create the L table

Line 14674: if edw_owb_collection_util.drop_table(l_table)=false then

14670: execute immediate l_stmt;
14671: if g_debug then
14672: write_to_log_file_n('created with '||sql%rowcount||' rows '||get_time);
14673: end if;
14674: if edw_owb_collection_util.drop_table(l_table)=false then
14675: null;
14676: end if;
14677: end if;
14678: end if;