DBA Data[Home] [Help]

APPS.EDW_SUMMARY_COLLECT SQL Statements

The following lines contain the word 'select', 'insert', 'update' or 'delete':

Line: 23

    p_update_type varchar2,
    p_level_order EDW_OWB_COLLECTION_UTIL.varcharTableType,
    p_skip_cols EDW_OWB_COLLECTION_UTIL.varcharTableType,
    p_number_skip_cols number,
    p_load_pk number,
    p_fresh_restart boolean,
    p_op_table_space varchar2,
    p_rollback varchar2,
    p_ltc_merge_use_nl boolean,
    p_dim_inc_refresh_derv boolean,
    p_check_fk_change boolean,
    p_ok_switch_update number,
    p_join_nl_percentage number,
    p_thread_type varchar2,
    p_max_threads number,
    p_min_job_load_size number,
    p_sleep_time number,
    p_job_status_table varchar2,
    p_hash_area_size number,
    p_sort_area_size number,
    p_trace boolean,
    p_read_cfig_options boolean,
    p_max_fk_density number,
    p_analyze_frequency number,
    p_parallel_drill_down boolean,
    p_dd_status_table varchar2
    ) is
Begin
  if p_max_threads>1 then
    --multi threaded
    collect_dimension_multi_thread(
    p_conc_id,
    p_conc_name,
    p_dim_name,
    p_levels,
    p_child_level_number,
    p_child_levels,
    p_child_fk,
    p_parent_pk,
    p_level_snapshot_logs,
    p_number_levels,
    p_debug,
    p_exec_flag,
    p_bis_owner,
    p_parallel,
    p_collection_size,
    p_table_owner,
    p_forall_size,
    p_update_type,
    p_level_order,
    p_skip_cols,
    p_number_skip_cols,
    p_load_pk,
    p_fresh_restart,
    p_op_table_space,
    p_rollback,
    p_ltc_merge_use_nl,
    p_dim_inc_refresh_derv,
    p_check_fk_change,
    p_ok_switch_update,
    p_join_nl_percentage,
    p_thread_type,
    p_max_threads,
    p_min_job_load_size,
    p_sleep_time,
    p_job_status_table,
    p_hash_area_size,
    p_sort_area_size,
    p_trace,
    p_read_cfig_options,
    p_max_fk_density,
    p_analyze_frequency,
    p_parallel_drill_down,
    p_dd_status_table
    );
Line: 118

    p_update_type,
    p_level_order,
    p_skip_cols,
    p_number_skip_cols,
    p_load_pk,
    p_fresh_restart,
    p_op_table_space,
    p_rollback,
    p_ltc_merge_use_nl,
    p_dim_inc_refresh_derv,
    p_check_fk_change,
    p_ok_switch_update,
    p_join_nl_percentage,
    p_read_cfig_options,
    p_max_fk_density,
    p_analyze_frequency
    );
Line: 160

    p_update_type varchar2,
    p_level_order EDW_OWB_COLLECTION_UTIL.varcharTableType,
    p_skip_cols EDW_OWB_COLLECTION_UTIL.varcharTableType,
    p_number_skip_cols number,
    p_load_pk number,
    p_fresh_restart boolean,
    p_op_table_space varchar2,
    p_rollback varchar2,
    p_ltc_merge_use_nl boolean,
    p_dim_inc_refresh_derv boolean,
    p_check_fk_change boolean,
    p_ok_switch_update number,
    p_join_nl_percentage number,
    p_thread_type varchar2,
    p_max_threads number,
    p_min_job_load_size number,
    p_sleep_time number,
    p_job_status_table varchar2,
    p_hash_area_size number,
    p_sort_area_size number,
    p_trace boolean,
    p_read_cfig_options boolean,
    p_max_fk_density number,
    p_analyze_frequency number,
    p_parallel_drill_down boolean,
    p_dd_status_table varchar2
    ) is
l_input_table varchar2(200);
Line: 225

  g_update_type :=p_update_type;
Line: 236

  g_ok_switch_update:=p_ok_switch_update;
Line: 293

    p_update_type,
    p_level_order,
    p_skip_cols,
    p_number_skip_cols,
    p_load_pk,
    p_fresh_restart,
    p_op_table_space,
    p_rollback,
    p_ltc_merge_use_nl,
    p_dim_inc_refresh_derv,
    p_check_fk_change,
    p_ok_switch_update,
    p_join_nl_percentage,
    p_max_threads,
    p_min_job_load_size,
    p_sleep_time,
    p_job_status_table,
    p_hash_area_size,
    p_sort_area_size,
    p_trace,
    p_read_cfig_options,
    p_max_fk_density
    )=false then
    g_status_message:=EDW_OWB_COLLECTION_UTIL.get_status_message;
Line: 332

        insert_into_star;
Line: 334

        if EDW_OWB_COLLECTION_UTIL.update_dim_load_input_table(
          l_input_table,
          l_ilog_table,
          g_skip_ilog_update,
          g_level_change,--to recreate from stmt etc
          g_dim_empty_flag,
          g_before_update_table_final,
          g_error_rec_flag,
          g_consider_snapshot,
          g_levels_I,
          g_use_ltc_ilog,
          g_number_levels
          )=false then
          g_status_message:=EDW_OWB_COLLECTION_UTIL.get_status_message;
Line: 469

                if EDW_OWB_COLLECTION_UTIL.delete_conc_program(
                  l_temp_conc_short_name,
                  l_temp_exe_name,
                  l_bis_short_name,
                  'SHORT')=false then
                  null;
Line: 493

    if drop_prot_table(g_insert_prot_table,g_insert_prot_table_active)=false then
      null;
Line: 496

    if drop_prot_table(g_bu_insert_prot_table,g_bu_insert_prot_table_active)=false then
      null;
Line: 518

  the following must be updated into the inp table
  g_skip_ilog_update
  g_level_change  --to recreate from stmt etc
  g_dim_empty_flag
  g_before_update_table_final
  */
  g_max_threads:=p_max_threads;
Line: 553

  insert_into_load_progress_d(g_load_pk,g_dim_name,'Read Metadata'||g_jobid_stmt,sysdate,null,'DIMENSION',
  'METADAT','RM'||g_job_id,'I');
Line: 556

    insert_into_load_progress_d(g_load_pk,null,null,null,sysdate,null,null,'RM'||g_job_id,'U');
Line: 564

      insert_into_load_progress_d(g_load_pk,null,null,null,sysdate,null,null,'RM'||g_job_id,'U');
Line: 607

  make_select_from_where_stmt;
Line: 611

  make_select_from_where_ins;
Line: 621

  insert_into_load_progress_d(g_load_pk,null,null,null,sysdate,null,null,'RM'||g_job_id,'U');
Line: 636

    if initial_insert_into_star(true)=false then
      return false;
Line: 640

    insert_into_load_progress_d(g_load_pk,g_dim_name,'Load ILOG'||g_jobid_stmt,sysdate,null,'DIMENSION',
    'INSERT','IL2010'||g_job_id,'I');
Line: 642

    insert_into_ilog(true);--multi threading true
Line: 643

    insert_into_load_progress_d(g_load_pk,null,null,null,sysdate,null,null,'IL2010'||g_job_id,'U');
Line: 648

  insert_into_load_progress_d(g_load_pk,g_dim_name,'Create Protection Table'||g_jobid_stmt,sysdate,null,'DIMENSION',
  'INSERT','CPTBL'||g_job_id,'I');
Line: 651

    if create_prot_table(g_bu_insert_prot_table,g_bu_insert_prot_table_active)=false then
      g_status:=false;
Line: 655

    if get_before_update_table_name=false then
      g_status:=false;
Line: 660

  insert_into_load_progress_d(g_load_pk,null,null,null,sysdate,null,null,'CPTBL'||g_job_id,'U');
Line: 778

  becasue init_all resets many of the global variables that we updated into the inp table,
  will have to read again
  */
  if read_options_table(p_table_name)=false then
    return false;
Line: 794

  insert_into_load_progress_d(g_load_pk,g_dim_name,'Read Metadata'||g_jobid_stmt,sysdate,null,'DIMENSION',
  'METADAT','RM'||g_job_id,'I');
Line: 822

  make_select_from_where_stmt;
Line: 826

  make_select_from_where_ins;
Line: 844

  insert_into_load_progress_d(g_load_pk,null,null,null,sysdate,null,null,'RM'||g_job_id,'U');
Line: 857

      insert_into_star;
Line: 894

    p_update_type varchar2,
    p_level_order EDW_OWB_COLLECTION_UTIL.varcharTableType,
    p_skip_cols EDW_OWB_COLLECTION_UTIL.varcharTableType,
    p_number_skip_cols number,
    p_load_pk number,
    p_fresh_restart boolean,
    p_op_table_space varchar2,
    p_rollback varchar2,
    p_ltc_merge_use_nl boolean,
    p_dim_inc_refresh_derv boolean,
    p_check_fk_change boolean,
    p_ok_switch_update number,
    p_join_nl_percentage number,
    p_read_cfig_options boolean,
    p_max_fk_density number,
    p_analyze_frequency number
    ) is
--get the mapping details for dim
--also used to see if slowly changing dim is implemented
begin
g_dim_name:=p_dim_name;
Line: 934

g_update_type :=p_update_type;
Line: 945

g_ok_switch_update:=p_ok_switch_update;
Line: 1000

  write_to_log_file('g_ok_switch_update='||g_ok_switch_update);
Line: 1040

insert_into_load_progress_d(g_load_pk,g_dim_name,'Read Metadata'||g_jobid_stmt,sysdate,null,'DIMENSION',
'METADAT','RM'||g_job_id,'I');
Line: 1043

  insert_into_load_progress_d(g_load_pk,null,null,null,sysdate,null,null,'RM'||g_job_id,'U');
Line: 1051

    insert_into_load_progress_d(g_load_pk,null,null,null,sysdate,null,null,'RM'||g_job_id,'U');
Line: 1056

    insert_into_load_progress_d(g_load_pk,null,null,null,sysdate,null,null,'RM'||g_job_id,'U');
Line: 1062

  insert_into_load_progress_d(g_load_pk,null,null,null,sysdate,null,null,'RM'||g_job_id,'U');
Line: 1070

  insert_into_load_progress_d(g_load_pk,null,null,null,sysdate,null,null,'RM'||g_job_id,'U');
Line: 1078

  insert_into_load_progress_d(g_load_pk,null,null,null,sysdate,null,null,'RM'||g_job_id,'U');
Line: 1097

make_select_from_where_stmt;
Line: 1099

  insert_into_load_progress_d(g_load_pk,null,null,null,sysdate,null,null,'RM'||g_job_id,'U');
Line: 1102

make_select_from_where_ins;
Line: 1104

  insert_into_load_progress_d(g_load_pk,null,null,null,sysdate,null,null,'RM'||g_job_id,'U');
Line: 1108

  insert_into_load_progress_d(g_load_pk,null,null,null,sysdate,null,null,'RM'||g_job_id,'U');
Line: 1114

insert_into_load_progress_d(g_load_pk,null,null,null,sysdate,null,null,'RM'||g_job_id,'U');
Line: 1125

 insert_into_load_progress_d(g_load_pk,g_dim_name,'Create Protection Table'||g_jobid_stmt,sysdate,null,'DIMENSION',
 'INSERT','CPTBL'||g_job_id,'I');
Line: 1129

   if create_prot_table(g_insert_prot_table,g_insert_prot_table_active)=false then
      g_status:=false;
Line: 1135

    if create_prot_table(g_bu_insert_prot_table,g_bu_insert_prot_table_active)=false then
      g_status:=false;
Line: 1139

    if get_before_update_table_name=false then
      g_status:=false;
Line: 1144

  insert_into_load_progress_d(g_load_pk,null,null,null,sysdate,null,null,'CPTBL'||g_job_id,'U');
Line: 1152

  if drop_prot_table(g_insert_prot_table,g_insert_prot_table_active)=false then
    null;
Line: 1155

  if drop_prot_table(g_bu_insert_prot_table,g_bu_insert_prot_table_active)=false then
    null;
Line: 1184

    if initial_insert_into_star(false)=false then
      return;
Line: 1187

    insert_into_star;
Line: 1190

    insert_into_load_progress_d(g_load_pk,g_dim_name,'Load ILOG'||g_jobid_stmt,sysdate,null,'DIMENSION',
    'INSERT','IL2010'||g_job_id,'I');
Line: 1192

    insert_into_ilog(false);
Line: 1193

    insert_into_load_progress_d(g_load_pk,null,null,null,sysdate,null,null,'IL2010'||g_job_id,'U');
Line: 1213

  make_temp_insert_sql;--to insert into the temp int table
Line: 1218

    write_to_log_file_n('g_temp_insert_stmt is ');
Line: 1219

    write_to_log_file(g_temp_insert_stmt);
Line: 1226

  make_hold_insert_stmt;
Line: 1231

    write_to_log_file_n('The hold table insert stmt is '||g_hold_insert_stmt);
Line: 1233

  make_insert_update_stmt_star;
Line: 1238

    write_to_log_file_n('The insert stmt into star is '||g_insert_stmt_star);
Line: 1241

    write_to_log_file_n('The update stmt into star is '||g_update_stmt_star);
Line: 1261

      if g_skip_ilog_update=false then
        l_status:=set_gilog_status;
Line: 1264

        g_skip_ilog_update:=false;
Line: 1274

      g_skip_ilog_update:=false;
Line: 1283

      write_to_log_file('Moved a total of '||g_number_rows_inserted||' records into the star table');
Line: 1287

       insert_into_load_progress_d(g_load_pk,g_dim_name,'Determine Incremental Data'||g_jobid_stmt,
       sysdate,null,'DIMENSION','CREATE-TABLE','CDVT2000'||l_count||' '||g_job_id,'I');
Line: 1292

           insert_into_load_progress_d(g_load_pk,null,null,null,sysdate,null,null,'CDVT2000'||l_count||' '||
           g_job_id,'U');
Line: 1298

           insert_into_load_progress_d(g_load_pk,null,null,null,sysdate,null,null,'CDVT2000'||l_count||' '||
           g_job_id,'U');
Line: 1304

           insert_into_load_progress_d(g_load_pk,null,null,null,sysdate,null,null,'CDVT2000'||l_count||' '||g_job_id,'U');
Line: 1309

            insert_into_load_progress_d(g_load_pk,null,null,null,sysdate,null,null,'CDVT2000'||l_count||' '||g_job_id,'U');
Line: 1314

       insert_into_load_progress_d(g_load_pk,null,null,null,sysdate,null,null,'CDVT2000'||l_count||' '||g_job_id,'U');
Line: 1315

       insert_into_load_progress_d(g_load_pk,g_dim_name,'Pre proccess Dimension Data'||g_jobid_stmt,
       sysdate,null,'DIMENSION','INSERT','CDVT2010'||l_count||' '||g_job_id,'I');
Line: 1317

       execute_temp_insert_sql;--move the data into int temp table
Line: 1319

         insert_into_load_progress_d(g_load_pk,null,null,null,sysdate,null,null,'CDVT2010'||l_count||' '||g_job_id,'U');
Line: 1326

           insert_into_load_progress_d(g_load_pk,null,null,null,sysdate,null,null,'CDVT2010'||l_count||' '||g_job_id,'U');
Line: 1336

         insert_into_load_progress_d(g_load_pk,null,null,null,sysdate,null,null,'CDVT2010'||l_count||' '||g_job_id,'U');
Line: 1339

       insert_into_load_progress_d(g_load_pk,null,null,null,sysdate,null,null,'CDVT2010'||l_count||' '||g_job_id,'U');
Line: 1343

         if g_insert_star_flag then
           insert_into_load_progress_d(g_load_pk,g_dim_name,'Drill Up for all levels'||g_jobid_stmt,
           sysdate,null,'DIMENSION','CREATE-TABLE','DUPALL000'||l_count||' '||g_job_id,'I');
Line: 1352

               insert_into_load_progress_d(g_load_pk,null,null,null,sysdate,null,null,'DUPALL000'||l_count||' '||g_job_id,'U');
Line: 1360

             insert_into_load_progress_d(g_load_pk,null,null,null,sysdate,null,null,'DUPALL000'||l_count||' '||g_job_id,'U');
Line: 1365

              insert_into_load_progress_d(g_load_pk,null,null,null,sysdate,null,null,'DUPALL000'||l_count||' '||g_job_id,'U');
Line: 1368

           insert_into_load_progress_d(g_load_pk,null,null,null,sysdate,null,null,'DUPALL000'||l_count||' '||g_job_id,'U');
Line: 1372

           insert_into_load_progress_d(g_load_pk,null,null,null,sysdate,null,null,'DUPALL000'||l_count||' '||g_job_id,'U');
Line: 1377

       if g_update_star_flag then
         insert_into_load_progress_d(g_load_pk,g_dim_name,'Move Update Data into Hold Table'||g_jobid_stmt,
         sysdate,null,'DIMENSION','CREATE-TABLE','CDVT2020'||l_count||' '||g_job_id,'I');
Line: 1380

         execute_hold_insert_stmt;
Line: 1382

           insert_into_load_progress_d(g_load_pk,null,null,null,sysdate,null,null,'CDVT2020'||l_count||' '||g_job_id,'U');
Line: 1385

         insert_into_load_progress_d(g_load_pk,null,null,null,sysdate,null,null,'CDVT2020'||l_count||' '||g_job_id,'U');
Line: 1387

       execute_insert_update_star(l_count);
Line: 1388

       g_number_rows_processed:=g_number_rows_processed+g_number_rows_inserted;
Line: 1390

         write_to_log_file_n('Moved '||g_number_rows_inserted||' into star table');
Line: 1396

       if g_type_ilog_generation='UPDATE' then
         if delete_gilog_status = false then  --delete where status=1
           return;
Line: 1402

         g_number_rows_processed,'PROCESSING','UPDATE')=false then
         g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;
Line: 1418

       if g_update_star_flag then
         if EDW_OWB_COLLECTION_UTIL.truncate_table(g_dim_name_hold) = false then
           return;
Line: 1444

l_stmt:='select 1 from '||g_dim_name||' where rownum=1';
Line: 1475

function initial_insert_into_star(p_multi_thread boolean) return boolean is
Begin
  if g_debug then
    write_to_log_file_n('In initial_insert_into_star');
Line: 1489

    insert_into_load_progress_d(g_load_pk,g_dim_name,'Load ILOG'||g_jobid_stmt,sysdate,null,'DIMENSION',
    'INSERT','IL2010'||g_job_id,'I');
Line: 1491

    insert_into_ilog(p_multi_thread);
Line: 1492

    insert_into_load_progress_d(g_load_pk,null,null,null,sysdate,null,null,'IL2010'||g_job_id,'U');
Line: 1503

    insert_into_load_progress_d(g_load_pk,g_dim_name,'Create Level Key Tables'||g_jobid_stmt,sysdate,null,'DIMENSION',
    'CREATE-TABLE','IS2020'||g_job_id,'I');
Line: 1506

      insert_into_load_progress_d(g_load_pk,null,null,null,sysdate,null,null,'IS2020'||g_job_id,'U');
Line: 1511

      insert_into_load_progress_d(g_load_pk,null,null,null,sysdate,null,null,'IS2020'||g_job_id,'U');
Line: 1516

      insert_into_load_progress_d(g_load_pk,null,null,null,sysdate,null,null,'IS2020'||g_job_id,'U');
Line: 1520

    insert_into_load_progress_d(g_load_pk,null,null,null,sysdate,null,null,'IS2020'||g_job_id,'U');
Line: 1525

 write_to_log_file_n('Error in initial_insert_into_star '||g_status_message);
Line: 1529

PROCEDURE insert_into_star IS
l_stmt varchar2(32000);
Line: 1540

l_insert_type varchar2(200);
Line: 1543

    write_to_log_file_n('In insert_into_star'||get_time);
Line: 1545

  l_insert_type:='MASS';
Line: 1548

    l_stmt:='insert into '||g_dim_name||' ( ';
Line: 1550

    l_stmt:='insert /*+ PARALLEL ('||g_dim_name||','||g_parallel||') */ into '||g_dim_name||' ( ';
Line: 1552

  l_stmt_row:='insert into '||g_dim_name||' ( ';
Line: 1559

  l_stmt:=l_stmt||' CREATION_DATE, LAST_UPDATE_DATE ) ';
Line: 1560

  l_stmt_row:=l_stmt_row||' CREATION_DATE, LAST_UPDATE_DATE ) ';
Line: 1563

      l_stmt:=l_stmt||g_select_stmt||',SYSDATE,SYSDATE '||g_from_stmt||' '||g_where_stmt;
Line: 1564

      l_stmt_row:=l_stmt_row||g_select_stmt||',SYSDATE,SYSDATE '||g_from_stmt||' '||g_where_stmt||' and '||
      g_lowest_level_alias||'.rowid=:a';
Line: 1567

      l_stmt:=l_stmt||g_select_stmt||',SYSDATE,SYSDATE '||g_from_stmt;
Line: 1568

      l_stmt_row:=l_stmt_row||g_select_stmt||',SYSDATE,SYSDATE '||g_from_stmt||' where '||
      g_lowest_level_alias||'.rowid=:a';
Line: 1574

        l_stmt:=l_stmt||g_select_stmt||',SYSDATE,SYSDATE '||g_from_stmt||','||g_ilog_small||' '||g_where_stmt||
        ' And '||g_ilog_small||'.row_id='||g_lowest_level_alias||'.rowid';
Line: 1576

        l_stmt_row:=l_stmt_row||g_select_stmt||',SYSDATE,SYSDATE '||g_from_stmt||' '||g_where_stmt||' and '||
        g_lowest_level_alias||'.rowid=:a';
Line: 1579

        l_stmt:=l_stmt||g_select_stmt||',SYSDATE,SYSDATE '||g_from_stmt||','||g_ilog_small||' where '||
        g_ilog_small||'.row_id='||g_lowest_level_alias||'.rowid';
Line: 1581

        l_stmt_row:=l_stmt_row||g_select_stmt||',SYSDATE,SYSDATE '||g_from_stmt||' where '||
        g_lowest_level_alias||'.rowid=:a';
Line: 1588

          l_stmt:=l_stmt||g_select_stmt||',SYSDATE,SYSDATE '||g_from_stmt||' '||g_where_stmt||
          ' and '||g_lowest_level_alias||'.rowid=:a';
Line: 1590

          l_stmt_row:=l_stmt_row||g_select_stmt||',SYSDATE,SYSDATE '||g_from_stmt||' '||g_where_stmt||
          ' and '||g_lowest_level_alias||'.rowid=:a';
Line: 1593

          l_stmt:=l_stmt||g_select_stmt||',SYSDATE,SYSDATE '||g_from_stmt||' '||g_where_stmt;
Line: 1594

          l_stmt_row:=l_stmt_row||g_select_stmt||',SYSDATE,SYSDATE '||g_from_stmt||' '||g_where_stmt||
          ' and '||g_lowest_level_alias||'.rowid=:a';
Line: 1599

          l_stmt:=l_stmt||g_select_stmt||',SYSDATE,SYSDATE '||g_from_stmt||' where '||
          g_lowest_level_alias||'.rowid=:a';
Line: 1601

          l_stmt_row:=l_stmt_row||g_select_stmt||',SYSDATE,SYSDATE '||g_from_stmt||' where '||
          g_lowest_level_alias||'.rowid=:a';
Line: 1604

          l_stmt:=l_stmt||g_select_stmt||',SYSDATE,SYSDATE '||g_from_stmt;
Line: 1605

          l_stmt_row:=l_stmt_row||g_select_stmt||',SYSDATE,SYSDATE '||g_from_stmt||' and '||
          g_lowest_level_alias||'.rowid=:a';
Line: 1620

    if g_skip_ilog_update=false then
      l_status:=set_gilog_status;
Line: 1623

      g_skip_ilog_update:=false;
Line: 1636

      insert_into_load_progress_d(g_load_pk,g_dim_name,'Insert into Star'||g_jobid_stmt,sysdate,null,'DIMENSION',
      'INSERT','LIS2020'||l_count||' '||g_job_id,'I');
Line: 1641

          insert_into_load_progress_d(g_load_pk,null,null,null,sysdate,null,null,'LIS2020'||l_count||' '||g_job_id,'U');
Line: 1646

          insert_into_load_progress_d(g_load_pk,null,null,null,sysdate,null,null,'LIS2020'||l_count||' '||g_job_id,'U');
Line: 1651

          insert_into_load_progress_d(g_load_pk,null,null,null,sysdate,null,null,'LIS2020'||l_count||' '||g_job_id,'U');
Line: 1656

          insert_into_load_progress_d(g_load_pk,null,null,null,sysdate,null,null,'LIS2020'||l_count||' '||g_job_id,'U');
Line: 1661

          insert_into_load_progress_d(g_load_pk,null,null,null,sysdate,null,null,'LIS2020'||l_count||' '||g_job_id,'U');
Line: 1673

          write_to_log_file_n('Going to execute insert into star');
Line: 1675

        <>
        if g_ltc_merge_use_nl or l_insert_type='ROW-BY-ROW' then
          if g_debug then
            write_to_log_file_n('nested loop option');
Line: 1680

          g_number_rows_inserted:=0;
Line: 1687

          l_stmt1:=l_stmt1||'  as select rowid row_id from '||g_lowest_level;
Line: 1699

          l_stmt1:='select row_id from '||l_table;
Line: 1706

            g_number_rows_inserted:=g_number_rows_inserted+1;
Line: 1727

                write_to_log_file_n('Out of memory error in mass insert. (Try row-by-row) '||sqlerrm);
Line: 1729

              l_insert_type:='ROW-BY-ROW';
Line: 1730

              goto start_direct_insert;
Line: 1736

              goto start_direct_insert;
Line: 1743

          g_number_rows_inserted:=sql%rowcount;
Line: 1745

        g_number_rows_processed:=g_number_rows_processed+g_number_rows_inserted;
Line: 1747

          write_to_log_file_n('Moved '||g_number_rows_inserted||' into the star table '||get_time);
Line: 1755

        insert_into_load_progress_d(g_load_pk,null,null,null,sysdate,null,null,'LIS2020'||l_count||' '||g_job_id,'U');
Line: 1758

      if g_type_ilog_generation='UPDATE' then
        if delete_gilog_status=false then  --delete where status=1
          insert_into_load_progress_d(g_load_pk,null,null,null,sysdate,null,null,'LIS2020'||l_count||' '||g_job_id,'U');
Line: 1766

         g_number_rows_processed,'PROCESSING','UPDATE')= false then
         g_status_message:=EDW_OWB_COLLECTION_UTIL.g_status_message;
Line: 1772

      insert_into_load_progress_d(g_load_pk,null,null,null,sysdate,null,null,'LIS2020'||l_count||' '||g_job_id,'U');
Line: 1780

End;--PROCEDURE insert_into_star IS
Line: 1784

 this function sets the status of the ilog from 0 to 1 and also deletes those that are 1 first
 returns:
 0: error
 1: no more records to change from 0 to 1
 2: success
*/
function set_gilog_status return number is
l_stmt varchar2(10000);
Line: 1801

  if g_type_ilog_generation='UPDATE' then
    if g_collection_size =0 then
      l_stmt:='update '||g_ilog||' set status=1 ';
Line: 1805

      l_stmt:='update '||g_ilog||' set status=1 where rownum <='||g_collection_size;
Line: 1818

      write_to_log_file_n('Updated '||l_count||' rows in '||g_ilog||get_time);
Line: 1840

        l_stmt:=l_stmt||'  as select row_id,'||g_ltc_pk||',decode(status,1,2,2,2,decode(sign(rownum-'||
        g_collection_size||'),1,0,1)) status from (select row_id,'||g_ltc_pk||',status from '||g_ilog_prev||
        ' order by status) abc ';
Line: 1844

        l_stmt:=l_stmt||'  as select row_id,decode(status,1,2,2,2,decode(sign(rownum-'||
        g_collection_size||'),1,0,1)) status from (select row_id,status from '||g_ilog_prev||
        ' order by status) abc ';
Line: 1850

        l_stmt:=l_stmt||'  as select row_id,'||g_ltc_pk||',decode(status,1,2,0,1,2) status from '||
        g_ilog_prev;
Line: 1853

        l_stmt:=l_stmt||'  as select row_id,decode(status,1,2,0,1,2) status from '||
        g_ilog_prev;
Line: 1891

function delete_gilog_status return boolean is
l_stmt varchar2(4000);
Line: 1895

    write_to_log_file_n('In delete_gilog_status');
Line: 1897

  l_stmt:='delete '||g_ilog||' where status=1';
Line: 1905

    write_to_log_file_n('Deleted '||sql%rowcount||' rows from '||g_ilog||get_time);
Line: 1938

  l_stmt:=l_stmt||' as select '||g_dim_user_pk||' from '||g_dim_name_temp_int;
Line: 1952

  l_stmt:=l_stmt||' as select /*+ORDERED USE_NL('||g_dim_name||')*/ ';
Line: 1986

  l_stmt:=l_stmt||' as select /*+ORDERED*/ ';
Line: 2062

  l_stmt:=l_stmt||' as select '||g_dim_user_pk||','||g_dim_pk;
Line: 2063

  if g_update_type='DELETE-INSERT' then
    l_stmt:=l_stmt||',CREATION_DATE ';
Line: 2145

  l_stmt:=l_stmt||' as select '||g_dim_user_pk||','||g_dim_pk;
Line: 2209

  g_temp_int_tm_stmt:='insert into '||g_dim_name_temp||'( ';
Line: 2210

  if g_update_type='DELETE-INSERT' then
    g_temp_int_tm_stmt:=g_temp_int_tm_stmt||g_dim_user_pk||','||g_dim_pk||
    ', row_id1, row_id3, operation_code1,CREATION_DATE,slow_flag) ';
Line: 2217

  g_temp_int_tm_stmt:=g_temp_int_tm_stmt||' select /*+ORDERED*/ ';
Line: 2225

    if g_update_type='DELETE-INSERT' then
      g_temp_int_tm_stmt:=g_temp_int_tm_stmt||','||g_dim_name_with_slow||'.CREATION_DATE ';
Line: 2242

    if g_update_type='DELETE-INSERT' then
      g_temp_int_tm_stmt:=g_temp_int_tm_stmt||','||g_dim_name_with_slow||'.CREATION_DATE ';
Line: 2258

procedure make_hold_insert_stmt is
l_divide number:=2;
Line: 2263

    write_to_log_file_n('In make_hold_insert_stmt');
Line: 2277

  g_hold_insert_stmt:='create table '||g_dim_name_hold||' tablespace '||g_op_table_space;
Line: 2279

    g_hold_insert_stmt:=g_hold_insert_stmt||' storage (initial '||l_extent||' next '||
    l_extent||' pctincrease 0 MAXEXTENTS 2147483645) ';
Line: 2283

    g_hold_insert_stmt:=g_hold_insert_stmt||' parallel (degree '||g_parallel||') ';
Line: 2285

  g_hold_insert_stmt:=g_hold_insert_stmt||'  as ';
Line: 2286

  g_hold_insert_stmt:=g_hold_insert_stmt||g_select_stmt_nopk;
Line: 2287

  g_hold_insert_stmt:=g_hold_insert_stmt||',TM.'||g_dim_pk||',TM.'||g_dim_user_pk||',TM.ROW_ID1 row_id';
Line: 2288

  if g_update_type='DELETE-INSERT' then
    g_hold_insert_stmt:=g_hold_insert_stmt||',TM.CREATION_DATE ';
Line: 2291

  g_hold_insert_stmt:=g_hold_insert_stmt||' '||g_from_stmt;
Line: 2292

  g_hold_insert_stmt:=g_hold_insert_stmt||','||g_dim_name_temp||' TM ';
Line: 2294

    g_hold_insert_stmt:=g_hold_insert_stmt||g_where_stmt||' And ';
Line: 2296

    g_hold_insert_stmt:=g_hold_insert_stmt||' where ';
Line: 2298

  g_hold_insert_stmt:=g_hold_insert_stmt||' TM.row_id3='||g_lowest_level_alias||'.ROWID';
Line: 2299

  g_hold_insert_stmt:=g_hold_insert_stmt||' And TM.operation_code1=1 ';
Line: 2300

  g_hold_insert_stmt_row:='insert into '||g_dim_name_hold||'(';
Line: 2301

  g_hold_insert_stmt_row:=g_hold_insert_stmt_row||g_insert_stmt_nopk;
Line: 2302

  g_hold_insert_stmt_row:=g_hold_insert_stmt_row||','||g_dim_pk||','||g_dim_user_pk||',row_id) ';
Line: 2303

  g_hold_insert_stmt_row:=g_hold_insert_stmt_row||g_select_stmt_nopk;
Line: 2304

  g_hold_insert_stmt_row:=g_hold_insert_stmt_row||','||g_dim_pk||','||g_dim_user_pk||',ROW_ID1';
Line: 2305

  g_hold_insert_stmt_row:=g_hold_insert_stmt_row||' '||g_from_stmt_hd_row;
Line: 2307

    g_hold_insert_stmt_row:=g_hold_insert_stmt_row||g_where_stmt||' and ';
Line: 2309

    g_hold_insert_stmt_row:=g_hold_insert_stmt_row||' where ';
Line: 2311

  g_hold_insert_stmt_row:=g_hold_insert_stmt_row||g_lowest_level_alias||'.rowid=:a';
Line: 2313

    write_to_log_file_n('g_hold_insert_stmt_row is '||g_hold_insert_stmt_row);
Line: 2356

  l_stmt:=l_stmt||'  as select ';
Line: 2371

  if g_update_type='DELETE-INSERT' then
    l_stmt:=l_stmt||','||g_dim_name||'.CREATION_DATE';
Line: 2404

    write_to_log_file_n('Inserted '||sql%rowcount||' rows into '||g_dim_name_temp||get_time);
Line: 2427

  we can boost performance by testing to see if there is updates or not
  if there is no update then dont even bother to execute it
  */
  if check_temp_table_for_status('UPDATE')=true then
    g_update_star_flag:=true;
Line: 2433

      write_to_log_file_n('Star Update Needed');
Line: 2436

    g_update_star_flag:=false;
Line: 2438

      write_to_log_file_n('Star Update NOT Needed');
Line: 2441

  if check_temp_table_for_status('INSERT')=true then
    g_insert_star_flag:=true;
Line: 2444

      write_to_log_file_n('Star Insert Needed');
Line: 2447

    g_insert_star_flag:=false;
Line: 2449

      write_to_log_file_n('Star Insert NOT Needed');
Line: 2453

    count_temp_table_records; --this prints out NOCOPY how many insert update etc
Line: 2464

see if in the temp table there are any records with opeartion_code1 of update or insert
*/
function check_temp_table_for_status(p_status varchar2) return boolean is
l_stmt varchar2(2000);
Line: 2476

  if p_status='INSERT' then
    l_status:=0;
Line: 2478

  elsif p_status='UPDATE' then
    l_status:=1;
Line: 2483

  l_stmt:='select 1 from '||g_dim_name_temp||' where operation_code1=:a and rownum=1';
Line: 2512

  l_stmt:='select count(*),  operation_code1 from '||g_dim_name_temp||' '||
    ' group by operation_code1 ';
Line: 2540

select relation.sequence_name
from edw_pvt_sequences_md_v relation,
   edw_pvt_map_properties_md_v map,
   edw_pvt_map_properties_md_v map2,
   edw_pvt_map_sources_md_v ru
where
     map.primary_target=p_dim_id
and  map2.primary_target=map.primary_source
and  ru.mapping_id=map2.mapping_id
and  ru.source_id=relation.sequence_id;
Line: 2635

PROCEDURE make_insert_update_stmt_star IS
l_iv varchar2(400);
Line: 2639

  write_to_log_file_n('In make_insert_update_stmt_star '||get_time);
Line: 2644

  g_insert_stmt_star:='insert into '||g_dim_name||'( ';
Line: 2646

  g_insert_stmt_star:='insert /*+ PARALLEL ('||g_dim_name||','||g_parallel||') */ into '||g_dim_name||'( ';
Line: 2648

g_insert_stmt_star_row:='insert into '||g_dim_name||'( ';
Line: 2651

    g_insert_stmt_star:=g_insert_stmt_star||' '||g_dim_col(i);
Line: 2653

    g_insert_stmt_star:=g_insert_stmt_star||','||g_dim_col(i);
Line: 2656

g_insert_stmt_star:=g_insert_stmt_star||g_insert_stmt_nopk_ins;
Line: 2657

g_insert_stmt_star:=g_insert_stmt_star||','||g_dim_pk||','||g_dim_user_pk;
Line: 2658

g_insert_stmt_star:=g_insert_stmt_star||',CREATION_DATE,LAST_UPDATE_DATE) ';
Line: 2659

g_insert_stmt_star:=g_insert_stmt_star||g_select_stmt_nopk_ins;
Line: 2660

g_insert_stmt_star:=g_insert_stmt_star||',TM.'||g_dim_pk||',TM.'||g_dim_user_pk;
Line: 2661

g_insert_stmt_star:=g_insert_stmt_star||',SYSDATE,SYSDATE ';
Line: 2662

g_insert_stmt_star:=g_insert_stmt_star||' '||g_from_stmt_ins;
Line: 2663

g_insert_stmt_star:=g_insert_stmt_star||','||g_dim_name_temp||' TM ';
Line: 2665

  g_insert_stmt_star:=g_insert_stmt_star||g_where_stmt_ins||' And ';
Line: 2667

  g_insert_stmt_star:=g_insert_stmt_star||' where ';
Line: 2669

g_insert_stmt_star:=g_insert_stmt_star||' TM.row_id3='||g_lowest_level_alias||'.ROWID';
Line: 2670

g_insert_stmt_star:=g_insert_stmt_star||' And TM.operation_code1=0 ';
Line: 2672

g_insert_stmt_star_row:=g_insert_stmt_star_row||g_insert_stmt_nopk_ins;
Line: 2673

g_insert_stmt_star_row:=g_insert_stmt_star_row||','||g_dim_pk||','||g_dim_user_pk;
Line: 2674

g_insert_stmt_star_row:=g_insert_stmt_star_row||',CREATION_DATE,LAST_UPDATE_DATE) ';
Line: 2675

g_insert_stmt_star_row:=g_insert_stmt_star_row||g_select_stmt_nopk_ins;
Line: 2676

g_insert_stmt_star_row:=g_insert_stmt_star_row||','||g_dim_pk||','||g_dim_user_pk;
Line: 2677

g_insert_stmt_star_row:=g_insert_stmt_star_row||',SYSDATE,SYSDATE ';
Line: 2678

g_insert_stmt_star_row:=g_insert_stmt_star_row||' '||g_from_stmt_ins_row;
Line: 2680

  g_insert_stmt_star_row:=g_insert_stmt_star_row||g_where_stmt_ins||' And ';
Line: 2682

  g_insert_stmt_star_row:=g_insert_stmt_star_row||' where ';
Line: 2684

g_insert_stmt_star_row:=g_insert_stmt_star_row||g_lowest_level_alias||'.rowid=:a';
Line: 2686

if g_update_type='DELETE-INSERT' then
  g_update_stmt_star:='insert into '||g_dim_name||' ( ';
Line: 2688

  g_update_stmt_star:=g_update_stmt_star||g_insert_stmt_nopk_ins;
Line: 2689

  g_update_stmt_star:=g_update_stmt_star||','||g_dim_pk||','||g_dim_user_pk;
Line: 2690

  g_update_stmt_star:=g_update_stmt_star||',CREATION_DATE,LAST_UPDATE_DATE';
Line: 2691

  g_update_stmt_star:=g_update_stmt_star||') select ';
Line: 2692

  g_update_stmt_star:=g_update_stmt_star||g_insert_stmt_nopk_ins;
Line: 2693

  g_update_stmt_star:=g_update_stmt_star||','||g_dim_pk||','||g_dim_user_pk;
Line: 2694

  g_update_stmt_star:=g_update_stmt_star||',CREATION_DATE,SYSDATE';
Line: 2695

  g_update_stmt_star:=g_update_stmt_star||' from '||g_dim_name_hold;
Line: 2697

  if g_update_type='ROW-BY-ROW' then
    g_update_stmt_star:='update '||g_dim_name||' set ( ';
Line: 2699

  elsif g_update_type='MASS' then
    if g_parallel is null then
      g_update_stmt_star:='update /*+ ORDERED USE_NL('||g_dim_name||')*/ '||g_dim_name||' set ( ';
Line: 2703

      g_update_stmt_star:='update /*+ ORDERED USE_NL('||g_dim_name||')*/ /*+PARALLEL ('||g_dim_name||','||
      g_parallel||')*/ '||g_dim_name||' set ( ';
Line: 2707

  g_update_stmt_star:=g_update_stmt_star||g_insert_stmt_nopk;
Line: 2708

  g_update_stmt_star:=g_update_stmt_star||','||g_dim_pk||','||g_dim_user_pk;
Line: 2709

  g_update_stmt_star:=g_update_stmt_star||',LAST_UPDATE_DATE) = ( select ';
Line: 2710

  g_update_stmt_star:=g_update_stmt_star||g_insert_stmt_nopk;
Line: 2711

  g_update_stmt_star:=g_update_stmt_star||','||g_dim_pk||','||g_dim_user_pk;
Line: 2712

  g_update_stmt_star:=g_update_stmt_star||',SYSDATE ';
Line: 2713

  g_update_stmt_star:=g_update_stmt_star||' from '||g_dim_name_hold||' where ';
Line: 2714

  if g_update_type='ROW-BY-ROW' then
    g_update_stmt_star:=g_update_stmt_star||g_dim_name_hold||'.row_id=:a) where '||g_dim_name||'.rowid=:b ';
Line: 2716

  elsif g_update_type='MASS' then
     g_update_stmt_star:=g_update_stmt_star||g_dim_name_hold||'.row_id='||g_dim_name||'.rowid) where '||
     g_dim_name||'.rowid in (select row_id from '||g_dim_name_hold||')';
Line: 2721

g_update_stmt_star_row:='update '||g_dim_name||' set ( '||
g_insert_stmt_nopk||','||g_dim_pk||','||g_dim_user_pk||',LAST_UPDATE_DATE) = ( select '||
g_insert_stmt_nopk||','||g_dim_pk||','||g_dim_user_pk||',SYSDATE '||' from '||g_dim_name_hold||' where '||
g_dim_name_hold||'.row_id=:a) where '||g_dim_name||'.rowid=:b ';
Line: 2762

procedure execute_hold_insert_stmt is
l_stmt varchar2(5000);
Line: 2773

    write_to_log_file_n('In execute_hold_insert_stmt'||get_time);
Line: 2787

    if create_ltc_copy_low_hd_ins('UPDATE')=false then
      return;
Line: 2796

      l_stmt:=l_stmt||'  as select rowid row_id from '||g_levels_copy_low_hd_ins;
Line: 2798

      l_stmt:=l_stmt||'  as select row_id3 row_id from '||g_dim_name_temp||
      ' where operation_code1=1';
Line: 2815

    l_stmt:='select row_id from '||l_table;
Line: 2823

      execute immediate g_hold_insert_stmt_row using l_rowid;
Line: 2834

      write_to_log_file_n('Inserted '||l_total_count||' rows into '||g_dim_name_hold||get_time);
Line: 2844

      execute immediate g_hold_insert_stmt;
Line: 2860

      write_to_log_file_n('Inserted '||g_count_dim_name_hold||' rows into '||g_dim_name_hold||get_time);
Line: 2887

  l_stmt:=l_stmt||'as select row_id from '||g_dim_name_hold;
Line: 2906

function execute_update_stmt return number is
l_stmt varchar2(5000);
Line: 2913

l_update_type varchar2(400);
Line: 2916

    write_to_log_file_n('In execute_update_stmt');
Line: 2918

  l_update_type:=g_update_type;
Line: 2920

  <>

  if l_update_type='MASS' or l_update_type='DELETE-INSERT' then
    --if create_dim_name_rowid_hold=false then
      --return false;
Line: 2927

    having the rowid table seemed to slow down the update!
    */
    null;
Line: 2931

  if l_update_type='ROW-BY-ROW' then
    l_stmt:='select row_id from '||g_dim_name_hold;
Line: 2943

          execute immediate g_update_stmt_star_row using l_rowid(i),l_rowid(i);
Line: 2956

        execute immediate g_update_stmt_star_row using l_rowid(i),l_rowid(i);
Line: 2960

  elsif l_update_type='MASS' then
    begin
      if g_debug then
        write_to_log_file_n('Going to execute g_update_stmt_star '||get_time);
Line: 2966

      execute immediate g_update_stmt_star;
Line: 2971

        write_to_log_file_n('Memory issue with Mass Update. Retrying using ROW_BY_ROW');
Line: 2972

        l_update_type:='ROW-BY-ROW';
Line: 2973

        goto start_update;
Line: 2979

        goto start_update;
Line: 2984

      write_to_log_file('Problem stmt '||g_update_stmt_star);
Line: 2987

  elsif l_update_type='DELETE-INSERT' then
    --first delete
    l_stmt:='delete '||g_dim_name||' where exists (select 1 from '||g_dim_name_hold||' where '||
      g_dim_name_hold||'.row_id='||g_dim_name||'.rowid)';
Line: 3000

        write_to_log_file('Deleted '||sql%rowcount||' rows');
Line: 3011

        write_to_log_file_n('Going to execute g_update_stmt_star');
Line: 3014

      execute immediate g_update_stmt_star;
Line: 3016

        write_to_log_file('Inserted '||sql%rowcount||' rows');
Line: 3023

      write_to_log_file('Problem stmt '||g_update_stmt_star);
Line: 3028

    write_to_log_file_n('Updated '||l_total_count||' records In Star Table '||get_time);
Line: 3041

PROCEDURE execute_insert_update_star(p_count number) IS
l_update_count number:=0;
Line: 3045

    write_to_log_file_n('In execute_insert_update_star '||get_time);
Line: 3047

  if g_insert_star_flag then
    Begin
      insert_into_load_progress_d(g_load_pk,g_dim_name,'Insert Into Star Table'||g_jobid_stmt,sysdate,null,
      'DIMENSION','INSERT','CDVT2030'||p_count||' '||g_job_id,'I');
Line: 3051

      if execute_insert_stmt=false then
        insert_into_load_progress_d(g_load_pk,null,null,null,sysdate,null,null,'CDVT2030'||p_count||' '||g_job_id,'U');
Line: 3055

      insert_into_load_progress_d(g_load_pk,null,null,null,sysdate,null,null,'CDVT2030'||p_count||' '||g_job_id,'U');
Line: 3060

     insert_into_load_progress_d(g_load_pk,null,null,null,sysdate,null,null,'CDVT2030'||p_count||' '||g_job_id,'U');
Line: 3063

  end if;--if g_insert_star_flag then
Line: 3065

  if g_update_star_flag then
    --if the dim is a part of any derv/summary fact, log all needed cols before update
    if g_derv_snp_change_flag then
      insert_into_load_progress_d(g_load_pk,g_dim_name,'Log Before Update Data'||g_jobid_stmt,sysdate,null,
      'DIMENSION','INSERT','LBUCDVT2040'||p_count||' '||g_job_id,'I');
Line: 3070

      if log_before_update_data=false then
        insert_into_load_progress_d(g_load_pk,null,null,null,sysdate,null,null,'LBUCDVT2040'||p_count||' '||g_job_id,'U');
Line: 3074

      insert_into_load_progress_d(g_load_pk,null,null,null,sysdate,null,null,'LBUCDVT2040'||p_count||' '||g_job_id,'U');
Line: 3076

    insert_into_load_progress_d(g_load_pk,g_dim_name,'Update Star Table'||g_jobid_stmt,sysdate,null,
    'DIMENSION','INSERT','CDVT2040'||p_count||' '||g_job_id,'I');
Line: 3078

    l_update_count:=execute_update_stmt;--creates update prot table inside
Line: 3079

    insert_into_load_progress_d(g_load_pk,null,null,null,sysdate,null,null,'CDVT2040'||p_count||' '||g_job_id,'U');
Line: 3080

    if l_update_count is null then
      g_status:=false;
Line: 3085

  g_number_rows_inserted:=g_number_rows_inserted+l_update_count;
Line: 3087

    write_to_log_file_n('Finished execute_insert_update_star '||get_time);
Line: 3095

function execute_insert_stmt return boolean is
l_stmt varchar2(4000);
Line: 3101

l_insert_type varchar2(200);
Line: 3105

    write_to_log_file_n('In execute_insert_stmt '||get_time);
Line: 3107

  l_insert_type:='MASS';
Line: 3108

  <>
  if g_ltc_merge_use_nl or l_insert_type='ROW-BY-ROW' then
    l_unique_violation:=false;
Line: 3112

      write_to_log_file_n('ROW-BY-ROW INSERTS');
Line: 3114

    g_number_rows_inserted:=0;
Line: 3115

    if create_ltc_copy_low_hd_ins('INSERT')=false then
      g_status:=false;
Line: 3125

      l_stmt:=l_stmt||'  as select rowid row_id from '||g_levels_copy_low_hd_ins;
Line: 3127

      l_stmt:=l_stmt||'  as select row_id3 row_id from '||g_dim_name_temp||
      ' where operation_code1=0';
Line: 3141

    l_stmt:='select row_id from '||l_table;
Line: 3150

        execute immediate g_insert_stmt_star_row using l_rowid;
Line: 3152

        g_number_rows_inserted:=g_number_rows_inserted+1;
Line: 3180

      write_to_log_file_n('going to execute g_insert_stmt_star ');
Line: 3184

      execute immediate g_insert_stmt_star;
Line: 3185

      g_number_rows_inserted:=sql%rowcount;
Line: 3190

          write_to_log_file_n('Out of memory error in mass insert. (Try row-by-row) '||sqlerrm||get_time);
Line: 3192

        l_insert_type:='ROW-BY-ROW';
Line: 3193

        goto start_insert;
Line: 3201

        goto start_insert;
Line: 3207

        goto start_insert;
Line: 3217

    write_to_log_file_n('Inserted '||g_number_rows_inserted||' rows'||get_time);
Line: 3244

  select upper(item.column_name),
  replace(upper(item.column_name),'_KEY'), --for now assume this...
  dim.dim_id
  from edw_unique_keys_md_v pk,
  edw_pvt_key_columns_md_v isu,
  edw_pvt_columns_md_v item,
  edw_dimensions_md_v dim
  where pk.entity_id=dim.dim_id
  and isu.key_id=pk.key_id
  and isu.column_id=item.column_id
  and pk.primarykey=1
  and dim.dim_name=p_dim_name;
Line: 3403

procedure make_select_from_where_stmt is
l_run integer:=0;
Line: 3422

    write_to_log_file_n('In make_select_from_where_stmt');
Line: 3539

  g_insert_stmt_nopk:=null;
Line: 3544

          g_insert_stmt_nopk:=g_insert_stmt_nopk||g_dim_col(i)||',';
Line: 3549

  if g_insert_stmt_nopk is not null then
    g_insert_stmt_nopk:=substr(g_insert_stmt_nopk,1,length(g_insert_stmt_nopk)-1);
Line: 3553

    write_to_log_file_n('Insert stmt NOPK is '||g_insert_stmt_nopk);
Line: 3571

  g_select_stmt:=' select ';
Line: 3572

  g_select_stmt_nopk:=' select ';
Line: 3577

        g_select_stmt:=g_select_stmt||l_alias(i)||'.'||g_level_col(i)||' '||g_dim_col(i)||',';
Line: 3579

          g_select_stmt_nopk:=g_select_stmt_nopk||l_alias(i)||'.'||g_level_col(i)||' '||g_dim_col(i)||',';
Line: 3584

  g_select_stmt:=substr(g_select_stmt,1,length(g_select_stmt)-1);
Line: 3585

  g_select_stmt_nopk:=substr(g_select_stmt_nopk,1,length(g_select_stmt_nopk)-1);
Line: 3587

    write_to_log_file_n('select stmt is '||g_select_stmt);
Line: 3588

    write_to_log_file_n('select stmt NOPK is '||g_select_stmt_nopk);
Line: 3673

          g_where_snplog_stmt:=g_where_snplog_stmt||'  '||'A_'||i||'.ROWID IN (select M_ROW$$ from '
          ||g_level_snapshot_logs(i)||') ';
Line: 3677

          g_where_snplog_stmt:=g_where_snplog_stmt||' Or '||'A_'||i||'.ROWID IN (select M_ROW$$ from '
          ||g_level_snapshot_logs(i)||') ';
Line: 3695

procedure make_select_from_where_ins is
l_run integer:=0;
Line: 3705

    write_to_log_file_n('In make_select_from_where_ins');
Line: 3708

  g_insert_stmt_nopk_ins:=null;
Line: 3712

        g_insert_stmt_nopk_ins:=g_insert_stmt_nopk_ins||g_dim_col(i)||',';
Line: 3716

  if g_insert_stmt_nopk_ins is not null then
    g_insert_stmt_nopk_ins:=substr(g_insert_stmt_nopk_ins,1,length(g_insert_stmt_nopk_ins)-1);
Line: 3720

    write_to_log_file_n('Insert stmt NOPK is '||g_insert_stmt_nopk_ins);
Line: 3738

  g_select_stmt_ins:=' select ';
Line: 3739

  g_select_stmt_nopk_ins:=' select ';
Line: 3743

        g_select_stmt_ins:=g_select_stmt_ins||l_alias(i)||'.'||g_level_col(i)||' '||g_dim_col(i)||',';
Line: 3745

          g_select_stmt_nopk_ins:=g_select_stmt_nopk_ins||l_alias(i)||'.'||g_level_col(i)||' '||g_dim_col(i)||',';
Line: 3749

  g_select_stmt_ins:=substr(g_select_stmt_ins,1,length(g_select_stmt_ins)-1);
Line: 3750

  g_select_stmt_nopk_ins:=substr(g_select_stmt_nopk_ins,1,length(g_select_stmt_nopk_ins)-1);
Line: 3752

    write_to_log_file_n('select stmt is '||g_select_stmt_ins);
Line: 3753

    write_to_log_file_n('select stmt NOPK is '||g_select_stmt_nopk_ins);
Line: 3823

  l_stmt:=l_stmt||' as select rowid row_id,';
Line: 3872

  l_stmt:='insert into '||p_ilog_temp||' (row_id) select ';
Line: 3998

        l_stmt:=l_stmt||' as select ';
Line: 4100

    l_stmt:=l_stmt||'  as select ';
Line: 4142

    l_stmt:=l_stmt||'  as select rowid row_id ';
Line: 4156

        l_stmt:='insert into '||g_snplogs_L(i)||'(row_id,'||g_ltc_pk||')';
Line: 4158

        l_stmt:='insert into '||g_snplogs_L(i)||'(row_id)';
Line: 4171

        l_stmt:=l_stmt||' as select ';
Line: 4185

        l_stmt:=l_stmt||' as select ';
Line: 4214

          write_to_log_file_n('Inserted into '||g_snplogs_L(i)||' '||sql%rowcount||' rows '||get_time);
Line: 4236

      l_stmt:=l_stmt||'  as select rowid row_id ';
Line: 4264

insert the rowids of the child level into the LT table for the child for all the changed records of the parent
p_mode=DOWN means we are drilling down. for changes to parent, we are finding change to child
p_mode=UP means we are drilling up. for changes to child, we are finding changes to parent
*/
function insert_into_LT(p_child_level varchar2, p_parent_level varchar2,p_mode varchar2) return boolean is
l_stmt varchar2(10000);
Line: 4287

    write_to_log_file_n('In insert_into_LT');
Line: 4365

    l_stmt:=l_stmt||' as select /*+ORDERED ';
Line: 4408

    l_stmt:=l_stmt||' as select /*+ORDERED ';
Line: 4449

        create table BIS.EDW_TRD_PARTNER_A_LTCLF parallel (degree 3)  as select distinct
        A1.PARENT_TPARTNER_FK_KEY from BIS.EDW_TPRT_P4_TPARTNER_LTCI A1,
        BIS.EDW_TPRT_P4_TPARTNER_LTCL Y where A1.row_id=Y.row_id oo01/29/2001 16:47:30
        was stuck forever. all the tables have only 1 row! if we remove the parallel (degree 3)
        statement, its very fast!! is this a database bug?
      */
      if l_fk_table_count >= 100 then
        l_stmt:=l_stmt||' parallel (degree '||g_parallel||') ';
Line: 4459

    l_stmt:=l_stmt||' as select /*+ORDERED ';
Line: 4509

    l_stmt:=l_stmt||' as select row_id from '||g_snplogs_LT(l_child_index)||
    ' MINUS select row_id from '||g_snplogs_L(l_child_index);
Line: 4524

      l_stmt:='insert into '||g_snplogs_L(l_child_index)||'(row_id,'||g_ltc_pk||') select A.row_id,A.'||g_ltc_pk||
      ' from '||l_snplogs_L||' B,'||g_snplogs_LT(l_child_index)||' A where A.row_id=B.row_id';
Line: 4527

      l_stmt:='insert into '||g_snplogs_L(l_child_index)||'(row_id) select row_id from '||l_snplogs_L;
Line: 4535

      write_to_log_file_n('Inserted '||sql%rowcount||' rows into '||g_snplogs_L(l_child_index)||get_time);
Line: 4584

            if insert_into_LT(p_level,g_levels(l_parent_index),'DOWN')=false then
              return false;
Line: 4635

            if insert_into_LT(p_level,g_levels(l_parent_index),'UP')=false then
              return false;
Line: 4662

after inserting into the L table, insert these rows into the ILOG table
we cannot drop and recreate ilog so we can support error recovery
*/
function insert_into_ilog_from_L(p_multi_thread boolean) return boolean is
l_stmt varchar2(10000);
Line: 4672

    write_to_log_file_n('In insert_into_ilog_from_L');
Line: 4683

    l_stmt:=l_stmt||' as select ';
Line: 4685

      g_skip_ilog_update:=true;
Line: 4687

      g_skip_ilog_update:=false;
Line: 4736

      l_stmt:=l_stmt||'  as select /*+ORDERED*/ A.'||g_ltc_pk||',A.rowid row_id,B.status from '||
      g_ilog||' B,'||g_lowest_level_global||' A where A.'||g_ltc_pk||'=B.'||g_ltc_pk;
Line: 4744

      l_stmt:=l_stmt||'  as select /*+ORDERED*/ B.row_id,B.status from '||
      g_ilog||' B,'||g_lowest_level_global||' A where A.rowid=B.row_id';
Line: 4769

      l_stmt:=l_stmt||'  as select row_id,'||g_ltc_pk||',0 status from '||g_snplogs_L(l_index)||
      ' MINUS select row_id,'||g_ltc_pk||',0 status from '||g_ilog;
Line: 4772

      l_stmt:=l_stmt||'  as select row_id,0 status from '||g_snplogs_L(l_index)||
      ' MINUS select row_id,0 status from '||g_ilog;
Line: 4788

     l_stmt:='insert into '||g_ilog||'(row_id,'||g_ltc_pk||',status) select row_id,'||g_ltc_pk||
     ',status from '||l_ilog;
Line: 4791

      l_stmt:='insert into '||g_ilog||'(row_id, status) select row_id,status from '||l_ilog;
Line: 4799

      write_to_log_file_n('Inserted '||sql%rowcount||' rows into '||g_ilog||get_time);
Line: 4835

  l_stmt:=l_stmt||' as select row_id from '||g_ilog||' where status=1';
Line: 4922

        l_stmt:=l_stmt||' as select rowid row_id from '||g_levels(i)||' where 1=2';
Line: 4941

        l_stmt:=l_stmt||' as select /*+ORDERED USE_NL('||g_levels(i)||')*/ ';
Line: 4943

        l_stmt:=l_stmt||' as select /*+ORDERED*/ ';
Line: 5135

  if insert_into_ilog_from_L(p_multi_thread)=false then
    return false;
Line: 5196

/*recreate the from stmt and change the g_lowest_level and insert the new row_id into g_ilog*/
function recreate_from_stmt return boolean is
l_index number;
Line: 5218

  g_from_stmt_ins:=substr(g_from_stmt_ins,1,length(g_from_stmt_ins)-1);--for insert stmt
Line: 5226

  g_from_stmt_ins_row:=substr(g_from_stmt_ins_row,1,length(g_from_stmt_ins_row)-1);--for insert stmt row by row
Line: 5261

procedure insert_into_ilog(p_multi_thread boolean) is
l_stmt varchar2(30000);
Line: 5273

    write_to_log_file_n('In insert_into_ilog');
Line: 5286

        if multi threading is true, we cannot make g_skip_ilog_update=true unless g_collection_size=0
      */
      if p_multi_thread=false or g_collection_size=0 then
        g_skip_ilog_update:=true;
Line: 5291

        g_skip_ilog_update:=false;
Line: 5295

        'as select /*+PARALLEL('||g_lowest_level||','||g_parallel||')*/ ';
Line: 5323

        'as select ';
Line: 5392

    if insert_L_ilog_parallel_dd(p_multi_thread)=false then
      l_drill_down:=true;
Line: 5427

Procedure make_temp_insert_sql IS
Begin
if g_debug then
  write_to_log_file_n('In make_temp_insert_sql'||get_time);
Line: 5433

g_temp_insert_stmt:='insert into '||g_dim_name_temp_int||' ( ';
Line: 5434

g_temp_insert_stmt:=g_temp_insert_stmt||g_dim_pk||','||g_dim_user_pk||', row_id3 ';
Line: 5437

    g_temp_insert_stmt:=g_temp_insert_stmt||','||g_slow_cols(i);
Line: 5441

  g_temp_insert_stmt:=g_temp_insert_stmt||') select '||g_lowest_level_alias||'.'||g_ltc_pk||','
  ||g_lowest_level_alias||'.'||g_ltc_user_pk||','||g_lowest_level_alias||'.ROWID ';
Line: 5445

      g_temp_insert_stmt:=g_temp_insert_stmt||','||g_slow_level_alias(i)||'.'||g_slow_level_col(i);
Line: 5450

      g_temp_insert_stmt:=g_temp_insert_stmt||g_from_stmt||' '||g_where_stmt;
Line: 5452

      g_temp_insert_stmt:=g_temp_insert_stmt||g_from_stmt;
Line: 5456

    g_temp_insert_stmt:=g_temp_insert_stmt||' from '||g_lowest_level||' '||g_lowest_level_alias;
Line: 5459

  g_temp_insert_stmt:=g_temp_insert_stmt||') select '||g_lowest_level_alias||'.'||g_ltc_pk||','
    ||g_lowest_level_alias||'.'||g_ltc_user_pk||','||g_lowest_level_alias||'.ROWID ';
Line: 5463

      g_temp_insert_stmt:=g_temp_insert_stmt||','||g_slow_level_alias(i)||'.'||g_slow_level_col(i);
Line: 5468

      g_temp_insert_stmt:=g_temp_insert_stmt||g_from_stmt||','||g_ilog||' '||g_where_stmt||' And ';
Line: 5470

      g_temp_insert_stmt:=g_temp_insert_stmt||g_from_stmt||','||g_ilog||' where ';
Line: 5472

    g_temp_insert_stmt:=g_temp_insert_stmt||g_ilog||'.row_id='||
    g_lowest_level_alias||'.rowid and '||g_ilog||'.status=1';
Line: 5476

    g_temp_insert_stmt:=g_temp_insert_stmt||' from '||g_lowest_level||' '||g_lowest_level_alias||','||g_ilog;
Line: 5477

    g_temp_insert_stmt:=g_temp_insert_stmt||' where '||g_lowest_level_alias||'.rowid='||
    g_ilog||'.row_id and '||g_ilog||'.status=1';
Line: 5486

End;--Procedure make_temp_insert_sql
Line: 5574

Procedure execute_temp_insert_sql IS
l_count number;
Line: 5578

  write_to_log_file_n('In execute_temp_insert_sql');
Line: 5582

    write_to_log_file_n('Going to execute g_temp_insert_sql, inserting into table '||g_dim_name_temp_int);
Line: 5585

  execute immediate g_temp_insert_stmt;
Line: 5589

    write_to_log_file_n('Inserted '||l_count||' records into '||g_dim_name_temp_int||get_time);
Line: 5605

  write_to_log_file_n('In execute_temp_insert_sql exec flag found false');
Line: 5610

 write_to_log_file_n('Problem statement '||g_temp_insert_stmt);
Line: 5612

End;--Procedure execute_temp_insert_sql
Line: 5756

  l_stmt:='select nvl(sum(number_processed),0) from edw_coll_progress_log where object_name=:a and object_type=:b '||
    ' and status=:c';
Line: 5796

g_insert_prot_table:=g_bis_owner||'.'||l_dim_name_org||'IP';--global only with slow change
Line: 5797

g_insert_prot_table_active:=g_bis_owner||'.'||l_dim_name_org||'IPA';--used in this session
Line: 5798

g_before_update_table_name:=g_bis_owner||'.'||l_dim_name_org||'BU';
Line: 5799

g_number_before_update_table:=1;
Line: 5800

g_bu_insert_prot_table:=g_bis_owner||'.'||l_dim_name_org||'BP';--global. used for derv fact sync
Line: 5801

g_bu_insert_prot_table_active:=g_bis_owner||'.'||l_dim_name_org||'BPA';--global. used for derv fact sync
Line: 5807

g_insert_stmt_star:=null;
Line: 5808

g_update_stmt_star:=null;
Line: 5810

g_number_rows_inserted :=0;
Line: 5811

g_number_rows_updated :=0;
Line: 5817

g_before_update_load_pk:=0;
Line: 5819

g_skip_ilog_update:=false;
Line: 5837

function get_number_rows_inserted return number is
begin
  return g_number_rows_inserted;
Line: 5840

End;--function get_number_rows_inserted return number is
Line: 5842

function get_number_rows_updated return number is
begin
  return g_number_rows_updated;
Line: 5845

End;--function get_number_rows_updated return number is
Line: 5896

procedure insert_into_load_progress(p_load_fk number,p_object_name varchar2,p_load_progress varchar2,
  p_start_date date,p_end_date date,p_category varchar2, p_operation varchar2,p_seq_id varchar2,p_flag varchar2) is
Begin
  EDW_OWB_COLLECTION_UTIL.insert_into_load_progress(p_load_fk,p_object_name,g_dim_id,p_load_progress,p_start_date,
  p_end_date,p_category,p_operation,p_seq_id,p_flag,1000);
Line: 5908

procedure insert_into_load_progress_d(p_load_fk number,p_object_name varchar2,p_load_progress varchar2,
  p_start_date date,p_end_date date,p_category varchar2, p_operation varchar2,p_seq_id varchar2,p_flag varchar2) is
Begin
  if g_debug then
    EDW_OWB_COLLECTION_UTIL.insert_into_load_progress(p_load_fk,p_object_name,g_dim_id,p_load_progress,p_start_date,
    p_end_date,p_category,p_operation,p_seq_id,p_flag,1000);
Line: 5926

  if g_before_update_table_final is not null then
    if EDW_OWB_COLLECTION_UTIL.check_table(g_before_update_table_final) then
      EDW_OWB_COLLECTION_UTIL.analyze_table_stats(substr(g_before_update_table_final,
      instr(g_before_update_table_final,'.')+1,length(g_before_update_table_final)),
      substr(g_before_update_table_final,1,instr(g_before_update_table_final,'.')-1),1);
Line: 5939

    insert_into_load_progress_d(g_load_pk,g_dim_name,'Analyze Star Table'||g_jobid_stmt,sysdate,null,'DIMENSION',
    'ANALYZE','AN2200'||g_job_id,'I');
Line: 5946

    insert_into_load_progress_d(g_load_pk,null,null,null,sysdate,null,null,'AN2200'||g_job_id,'U');
Line: 6175

  l_stmt:='select text from edw_pvt_map_properties_md_v where mapping_id=:a and text_type=''Filter''';
Line: 6230

function get_before_update_table_name return boolean is
Begin
  g_number_before_update_table:=1;
Line: 6234

    g_before_update_table(g_number_before_update_table):=g_before_update_table_name||g_number_before_update_table;
Line: 6235

    if EDW_OWB_COLLECTION_UTIL.check_table(g_before_update_table(g_number_before_update_table))=false then
      g_before_update_table_final:=g_before_update_table(g_number_before_update_table);
Line: 6239

      g_number_before_update_table:=g_number_before_update_table+1;
Line: 6245

  write_to_log_file_n('Error in get_before_update_table_name '||g_status_message);
Line: 6251

log_before_update_data is called in each loop. we will analyze the table in the very end
*/
function log_before_update_data return boolean is
l_stmt varchar2(32000);
Line: 6262

    write_to_log_file_n('In log_before_update_data'||get_time);
Line: 6265

  for every run of the load, the update data goes into a new table
  */
  if EDW_OWB_COLLECTION_UTIL.check_table(g_before_update_table_final)=false then
    if create_before_update_table=false then
      return false;
Line: 6272

  l_stmt:='insert into '||g_before_update_table_final||'('||g_dim_pk||','||g_dim_user_pk;
Line: 6281

  l_stmt:=l_stmt||',LAST_UPDATE_DATE) select /*+ORDERED USE_NL('||g_dim_name||')*/ '; --use nl?
Line: 6296

  ' and '||g_dim_name_hold||'.'||g_dim_pk||' not in (select '||g_dim_pk||' from '||g_bu_insert_prot_table_active||')';
Line: 6302

    write_to_log_file_n('Inserted '||sql%rowcount||' rows into '||
    g_before_update_table_final||get_time);
Line: 6305

  if log_pk_into_bu_insert_prot=false then
    return false;
Line: 6316

function create_before_update_table return boolean is
l_stmt varchar2(10000);
Line: 6327

  l_stmt:='create table '||g_before_update_table_final||' tablespace '||g_op_table_space||
  ' storage (initial '||l_next_extent||' next '||l_next_extent||' pctincrease 0 MAXEXTENTS 2147483645) ';
Line: 6332

  l_stmt:=l_stmt||' as select '||g_dim_pk||','||g_dim_user_pk;
Line: 6341

  l_stmt:=l_stmt||',LAST_UPDATE_DATE from '||g_dim_name||' where 1=2';
Line: 6351

        write_to_log_file_n('Error creating '||g_before_update_table_final||' '||sqlerrm||get_time);
Line: 6352

        write_to_log_file('This table '||g_before_update_table_final||' already exists! '||
        'Some other thread created it!');
Line: 6362

  l_stmt:='create unique index '||g_before_update_table_final||'u on '||
  g_before_update_table_final||'('||g_dim_pk||') tablespace '||g_op_table_space;
Line: 6388

  l_stmt:='select level_name||''_LTC'' from edw_levels_md_v where level_prefix=:a and dim_id=:b';
Line: 6471

    g_stmt:=g_stmt||' as select '||g_dim_pk||' from '||g_dim_name||' where 1=2';
Line: 6481

  g_stmt:=g_stmt||' as select * from '||p_table;
Line: 6530

    if EDW_OWB_COLLECTION_UTIL.check_table(g_before_update_table_name||l_count) then
      if EDW_OWB_COLLECTION_UTIL.drop_table(g_before_update_table_name||l_count)=false then
        null;
Line: 6539

  if drop_prot_table(g_insert_prot_table,g_insert_prot_table_active)=false then
    null;
Line: 6542

  if drop_prot_table(g_bu_insert_prot_table,g_bu_insert_prot_table_active)=false then
    null;
Line: 6560

  l_stmt:=l_stmt||'  as select row_id from '||g_ilog||' where status=1';
Line: 6588

  ' as select rowid row_id, 1 status from dual ';
Line: 6593

  g_skip_ilog_update:=true;
Line: 6594

  g_type_ilog_generation:='UPDATE';
Line: 6653

        l_flag:=EDW_OWB_COLLECTION_UTIL.get_join_nl(l_size,l_avg_row_len,g_ok_switch_update);
Line: 6680

  if p_mode='INSERT' then
    l_mode:=0;
Line: 6682

  elsif p_mode='UPDATE' then
    l_mode:=1;
Line: 6691

  l_stmt:=l_stmt||'  as select A.*,B.'||g_dim_pk||',B.'||g_dim_user_pk||',B.ROW_ID1 row_id1 from '||
  g_lowest_level||' A,'||g_dim_name_temp||' B where A.rowid=B.row_id3 and B.operation_code1='||l_mode;
Line: 6719

    write_to_log_file_n('Goin to execute '||g_hold_insert_stmt||' and 1=2');
Line: 6721

  execute immediate g_hold_insert_stmt||' and 1=2';
Line: 6746

  l_stmt:=l_stmt||'  as select '||g_dim_pk||' from '||g_dim_name_temp||
  ' where operation_code1=0';
Line: 6767

  l_stmt:=l_stmt||'  as select ';
Line: 6786

  l_stmt:='update /*+ordered use_nl(AA)*/ '||g_dim_name_temp||' AA set(row_id1,operation_code1)=(select row_id,'||
  '1 from '||l_table2||' where '||l_table2||'.'||g_dim_pk||'=AA.'||g_dim_pk||') where AA.'||g_dim_pk||
  ' in (select '||g_dim_pk||' from '||l_table2||') ';
Line: 6795

    write_to_log_file_n('Updated '||sql%rowcount||' rows '||get_time);
Line: 6955

      if l_percentage
Line: 6958

          write_to_log_file_n('g_type_ok_generation made UPDATE');
Line: 6970

function log_pk_into_insert_prot return boolean is
Begin
  if g_debug then
    write_to_log_file_n('In log_pk_into_insert_prot');
Line: 6975

  g_stmt:='insert into '||g_insert_prot_table||'('||g_dim_pk||') select '||g_dim_pk||
  ' from '||g_dim_name_temp||' where slow_flag=1';
Line: 6982

    write_to_log_file_n('Inserted '||sql%rowcount||' rows '||get_time);
Line: 6988

  write_to_log_file_n('Error in log_pk_into_insert_prot '||g_status_message);
Line: 6992

function log_pk_into_bu_insert_prot return boolean is
Begin
  if g_debug then
    write_to_log_file_n('In log_pk_into_bu_insert_prot');
Line: 6997

  g_stmt:='insert into '||g_bu_insert_prot_table||'('||g_dim_pk||') select '||g_dim_pk||
  ' from '||g_dim_name_hold;
Line: 7004

    write_to_log_file_n('Inserted '||sql%rowcount||' rows '||get_time);
Line: 7010

  write_to_log_file_n('Error in log_pk_into_bu_insert_prot '||g_status_message);
Line: 7025

l_skip_ilog_update varchar2(2);
Line: 7042

  g_stmt:='select '||
  'conc_id,'||
  'conc_name,'||
  'debug,'||
  'exec_flag,'||
  'bis_owner,'||
  'parallel,'||
  'collection_size,'||
  'table_owner,'||
  'forall_size,'||
  'update_type,'||
  'load_pk,'||
  'fresh_restart,'||
  'op_table_space,'||
  'rollback,'||
  'ltc_merge_use_nl,'||
  'dim_inc_refresh_derv,'||
  'check_fk_change,'||
  'ok_switch_update,'||
  'join_nl_percentage,'||
  'max_threads,'||
  'min_job_load_size,'||
  'sleep_time,'||
  'job_status_table,'||
  'hash_area_size,'||
  'sort_area_size,'||
  'trace,'||
  'read_cfig_options,'||
  'ilog_table ,'||
  'skip_ilog_update,'||
  'level_change,'||
  'dim_empty_flag,'||
  'before_update_table_final,'||
  'error_rec_flag,'||
  'max_fk_density'||
  ' from '||p_table_name;
Line: 7092

  g_update_type,
  g_load_pk,
  l_fresh_restart,
  g_op_table_space,
  g_rollback,
  l_ltc_merge_use_nl,
  l_dim_inc_refresh_derv,
  l_check_fk_change,
  g_ok_switch_update,
  g_join_nl_percentage,
  g_max_threads,
  g_min_job_load_size,
  g_sleep_time,
  g_job_status_table,
  g_hash_area_size,
  g_sort_area_size,
  l_trace,
  l_read_cfig_options,
  g_ilog_main_name,
  l_skip_ilog_update,
  l_level_change,
  l_dim_empty_flag,
  g_before_update_table_final,
  l_error_rec_flag,
  g_max_fk_density;
Line: 7128

    write_to_log_file('g_update_type='||g_update_type);
Line: 7136

    write_to_log_file('g_ok_switch_update='||g_ok_switch_update);
Line: 7147

    write_to_log_file('l_skip_ilog_update='||l_skip_ilog_update);
Line: 7150

    write_to_log_file('g_before_update_table_final='||g_before_update_table_final);
Line: 7162

  g_skip_ilog_update:=false;
Line: 7190

  if l_skip_ilog_update='Y' then
    g_skip_ilog_update:=true;
Line: 7202

  g_stmt:='select '||
  'levels,'||
  'child_level_number,'||
  'level_snapshot_logs,'||
  'level_order,'||
  'consider_snapshot,'||
  'levels_I, '||
  'use_ltc_ilog '||
  ' from '||l_level_table||' order by level_number';
Line: 7251

  g_stmt:='select '||
  'child_levels,'||
  'child_fk,'||
  'parent_pk'||
  ' from '||l_level_child_table||' order by run_number';
Line: 7274

  g_stmt:='select '||
  'skip_cols'||
  ' from '||l_skip_table;
Line: 7325

    g_skip_ilog_update:=true;
Line: 7444

function insert_L_ilog_parallel_dd(p_multi_thread boolean) return boolean is
--
l_status edw_owb_collection_util.varcharTableType;
Line: 7456

    write_to_log_file_n('In insert_L_ilog_parallel_dd'||get_time);
Line: 7511

  if insert_into_ilog_from_L(p_multi_thread)=false then
    return false;
Line: 7520

  write_to_log_file_n('Error in insert_L_ilog_parallel_dd '||g_status_message);