DBA Data[Home] [Help]

APPS.BSC_IM_UTILS dependencies on BSC_IM_UTILS

Line 1: package body BSC_IM_UTILS AS

1: package body BSC_IM_UTILS AS
2: /*$Header: BSCOLUTB.pls 120.9 2006/07/10 07:54:19 rkumar ship $*/
3:
4: -- Start of apis added by arun for bug 3876730
5: -- from s or sb table name, parse the indicator number

Line 173: if(BSC_IM_UTILS.needs_zero_code_b_pt(p_b_pt_table_name, colColumns(i))) then

169: i := colColumns.first;
170: LOOP
171: EXIT WHEN colColumns.count = 0;
172: if (colColumns(i) not in ('PERIODICITY_ID', 'YEAR', 'PERIOD', 'TYPE')) then
173: if(BSC_IM_UTILS.needs_zero_code_b_pt(p_b_pt_table_name, colColumns(i))) then
174: l_zero_code_cols := l_zero_code_cols||colColumns(i)||',';
175: else
176: l_stmt:=l_stmt||colColumns(i)||',';
177: end if;

Line 260: BSC_IM_UTILS.g_status_message:=sqlerrm;

256: procedure write_to_log(p_message varchar2,p_new_line boolean) is
257: Begin
258: write_to_file('LOG',p_message,p_new_line);
259: Exception when others then
260: BSC_IM_UTILS.g_status_message:=sqlerrm;
261: null;
262: End;
263:
264: procedure write_to_log_file(p_message varchar2) is

Line 521: BSC_IM_UTILS.g_status_message:=sqlerrm;

517: procedure set_globals(p_debug boolean) is
518: Begin
519: g_debug:=p_debug;
520: Exception when others then
521: BSC_IM_UTILS.g_status_message:=sqlerrm;
522: null;
523: End;
524:
525: function get_db_user(

Line 550: BSC_IM_UTILS.g_status_message:=sqlerrm;

546: end if;
547: g_id:=g_id+1;
548: return g_id;
549: Exception when others then
550: BSC_IM_UTILS.g_status_message:=sqlerrm;
551: write_to_log_file_n('Error in read_global '||sqlerrm);
552: return -1;
553: End;
554:

Line 565: BSC_IM_UTILS.g_status_message:=sqlerrm;

561: write_to_debug_n(g_stmt);
562: execute immediate g_stmt into l_id;
563: return l_id;
564: Exception when others then
565: BSC_IM_UTILS.g_status_message:=sqlerrm;
566: write_to_log_file_n('Error in read_sequence '||sqlerrm);
567: return -1;
568: End;
569:

Line 631: BSC_IM_UTILS.g_status_message:=sqlerrm;

627: end loop;
628: return 0;
629: Exception when others then
630: write_to_log_file_n('Error in get_index '||sqlerrm);
631: BSC_IM_UTILS.g_status_message:=sqlerrm;
632: return -1;
633: End;
634:
635: function get_index(p_table number_tabletype,p_number_table number,p_value number) return number is

Line 644: BSC_IM_UTILS.g_status_message:=sqlerrm;

640: end if;
641: end loop;
642: return 0;
643: Exception when others then
644: BSC_IM_UTILS.g_status_message:=sqlerrm;
645: write_to_log_file_n('Error in get_index '||sqlerrm);
646: return -1;
647: End;
648:

Line 664: BSC_IM_UTILS.g_status_message:=sqlerrm;

660: end if;
661: end loop;
662: return 0;
663: Exception when others then
664: BSC_IM_UTILS.g_status_message:=sqlerrm;
665: write_to_log_file_n('Error in get_index '||sqlerrm);
666: return -1;
667: End;
668:

Line 684: BSC_IM_UTILS.g_status_message:=sqlerrm;

680: end if;
681: end loop;
682: return 0;
683: Exception when others then
684: BSC_IM_UTILS.g_status_message:=sqlerrm;
685: write_to_log_file_n('Error in get_index '||sqlerrm);
686: return -1;
687: End;
688:

Line 1106: BSC_IM_UTILS.g_status_message:=sqlerrm;

1102: else
1103: return read_sequence(p_seq);
1104: end if;
1105: Exception when others then
1106: BSC_IM_UTILS.g_status_message:=sqlerrm;
1107: return -1;
1108: End;
1109:
1110: function drop_db_object(p_object varchar2,p_type varchar2,p_owner varchar2) return boolean is

Line 1227: BSC_IM_UTILS.g_status_message:=sqlerrm;

1223: write_to_log_file_n('Owner for '||p_table||' is '||l_owner);
1224: end if;
1225: return l_owner;
1226: Exception when others then
1227: BSC_IM_UTILS.g_status_message:=sqlerrm;
1228: write_to_log_file_n('Error in get_table_owner '||sqlerrm);
1229: return null;
1230: End;
1231:

Line 1256: BSC_IM_UTILS.g_status_message:=sqlerrm;

1252: write_to_log_file_n('Owner for '||p_object||' is '||l_owner);
1253: end if;
1254: return l_owner;
1255: Exception when others then
1256: BSC_IM_UTILS.g_status_message:=sqlerrm;
1257: write_to_log_file_n('Error in get_object_owner '||sqlerrm);
1258: return null;
1259: End;
1260:

Line 1309: BSC_IM_UTILS.g_status_message:=sqlerrm;

1305: write_to_log_file_n('object type '||l_type);
1306: end if;
1307: return l_type;
1308: Exception when others then
1309: BSC_IM_UTILS.g_status_message:=sqlerrm;
1310: write_to_log_file_n('Error in get_object_type '||sqlerrm);
1311: return null;
1312: End;
1313:

Line 1447: BSC_IM_UTILS.g_status_message:=sqlerrm;

1443: end if;
1444: begin
1445: execute immediate g_stmt;
1446: exception when others then
1447: BSC_IM_UTILS.g_status_message:=sqlerrm;
1448: write_to_log_file_n('Error in creating primary key constraint '||sqlerrm);
1449: end;
1450: end if; */
1451:

Line 1483: BSC_IM_UTILS.g_status_message:=sqlerrm;

1479: begin
1480: execute immediate g_stmt;
1481: p_snplog_creates:=true;
1482: exception when others then
1483: BSC_IM_UTILS.g_status_message:=sqlerrm;
1484: write_to_log_file_n('Error in creating mv log '||sqlerrm);
1485: end;
1486: return true;
1487: Exception when others then

Line 1660: BSC_IM_UTILS.g_status_message:=sqlerrm;

1656: return get_table_owner(p_mv_name);
1657: -- RETURN BSC SCHEMA NAME
1658: --return BSC_APPS.get_user_schema;
1659: Exception when others then
1660: BSC_IM_UTILS.g_status_message:=sqlerrm;
1661: write_to_log_file_n('Error in get_mv_owner '||sqlerrm);
1662: return null;
1663: End;
1664:

Line 1830: write_to_log_file_n('In BSC_IM_UTILS.refresh_mv '||p_mv_owner||'.'||p_mv_name||' kpi='||p_kpi||get_time);

1826: l_staleness varchar2(200);
1827: --------------------
1828: Begin
1829: if g_debug then
1830: write_to_log_file_n('In BSC_IM_UTILS.refresh_mv '||p_mv_owner||'.'||p_mv_name||' kpi='||p_kpi||get_time);
1831: write_to_log_file('Options:-');
1832: for i in 1..p_number_options loop
1833: write_to_log_file(p_options(i));
1834: end loop;

Line 1871: l_index_tablespace:=BSC_IM_UTILS.get_option_value(p_options,p_number_options,'INDEX TABLESPACE');

1867: end if;
1868: l_parallel:=get_option_value(p_options,p_number_options,'PARALLEL');
1869: l_drop_index:=get_option_value(p_options,p_number_options,'DROP INDEX');
1870: -----------------
1871: l_index_tablespace:=BSC_IM_UTILS.get_option_value(p_options,p_number_options,'INDEX TABLESPACE');
1872: l_index_storage:=BSC_IM_UTILS.get_option_value(p_options,p_number_options,'INDEX STORAGE');
1873: if l_index_tablespace is not null then
1874: if instr(lower(l_index_tablespace),'tablespace')<=0 then
1875: l_index_tablespace:=' tablespace '||l_index_tablespace;

Line 1872: l_index_storage:=BSC_IM_UTILS.get_option_value(p_options,p_number_options,'INDEX STORAGE');

1868: l_parallel:=get_option_value(p_options,p_number_options,'PARALLEL');
1869: l_drop_index:=get_option_value(p_options,p_number_options,'DROP INDEX');
1870: -----------------
1871: l_index_tablespace:=BSC_IM_UTILS.get_option_value(p_options,p_number_options,'INDEX TABLESPACE');
1872: l_index_storage:=BSC_IM_UTILS.get_option_value(p_options,p_number_options,'INDEX STORAGE');
1873: if l_index_tablespace is not null then
1874: if instr(lower(l_index_tablespace),'tablespace')<=0 then
1875: l_index_tablespace:=' tablespace '||l_index_tablespace;
1876: end if;

Line 1951: BSC_IM_UTILS.g_status_message:=sqlerrm;

1947: end if;
1948: exception when others then
1949: --Enh#4239064: add commit here
1950: commit;
1951: BSC_IM_UTILS.g_status_message:=sqlerrm;
1952: if g_debug then
1953: write_to_log_file_n('Could not refresh MV '||sqlerrm);
1954: end if;
1955: if l_method='f' then

Line 1963: write_to_out_file('Error refreshing '||p_mv_name||' '||BSC_IM_UTILS.g_status_message);

1959: l_method:='c';
1960: goto start_mv_refresh;
1961: end if;
1962: --error
1963: write_to_out_file('Error refreshing '||p_mv_name||' '||BSC_IM_UTILS.g_status_message);
1964: return false;
1965: end;
1966: --Enh#4239064: add commit here
1967: commit;

Line 2001: if BSC_IM_UTILS.get_option_value(p_options,p_number_options,'ANALYZE')='Y' then

1997: end if;
1998: end if;
1999: --Enh#4239064: add commit here
2000: commit;
2001: if BSC_IM_UTILS.get_option_value(p_options,p_number_options,'ANALYZE')='Y' then
2002: l_start_time:=get_time;
2003: analyze_object(p_mv_name,l_mv_owner,null,l_parallel,null);
2004: --Enh#4239064: add commit here
2005: commit;

Line 2439: BSC_IM_UTILS.g_status_message:=sqlerrm;

2435: write_to_log_file(p_check_option||'='||l_value);
2436: end if;
2437: return l_value;
2438: Exception when others then
2439: BSC_IM_UTILS.g_status_message:=sqlerrm;
2440: write_to_log_file_n('Error in get_option_value '||sqlerrm);
2441: return null;
2442: End;
2443:

Line 2459: BSC_IM_UTILS.g_status_message:=sqlerrm;

2455: end if;
2456: l_value:=get_option_value(l_array,l_number_array,p_check_option);
2457: return l_value;
2458: Exception when others then
2459: BSC_IM_UTILS.g_status_message:=sqlerrm;
2460: write_to_log_file_n('Error in get_option_value '||sqlerrm);
2461: return null;
2462: End;
2463:

Line 2678: BSC_IM_UTILS.g_status_message:=sqlerrm;

2674: procedure set_trace is
2675: Begin
2676: execute immediate 'alter session set sql_trace=true';
2677: Exception when others then
2678: BSC_IM_UTILS.g_status_message:=sqlerrm;
2679: write_to_log_file_n('Error in set_trace '||sqlerrm);
2680: End;
2681:
2682: procedure analyze_object(

Line 2780: l_append_string:=BSC_IM_UTILS.get_option_value(p_options,p_number_options,'MV NAME APPEND');

2776: if parse_values(p_map_table_list,',',l_table_list,p_number_corr_table)=false then
2777: return false;
2778: end if;
2779: p_corr_table_name:=p_map_table;
2780: l_append_string:=BSC_IM_UTILS.get_option_value(p_options,p_number_options,'MV NAME APPEND');
2781: for i in 1..p_number_corr_table loop
2782: p_corr_table_list(i):=l_table_list(i);
2783: p_original_table_list(i):=l_table_list(i);
2784: if get_synonym_property(l_table_list(i),l_syn_owner,l_syn_object) then

Line 3093: if BSC_IM_UTILS.get_db_user('BSC',l_bsc_owner)=false then

3089:
3090: function get_bsc_owner return varchar2 is
3091: l_bsc_owner varchar2(200);
3092: Begin
3093: if BSC_IM_UTILS.get_db_user('BSC',l_bsc_owner)=false then
3094: l_bsc_owner:='BSC';
3095: end if;
3096: if l_bsc_owner is null then
3097: l_bsc_owner:='BSC';

Line 3101: BSC_IM_UTILS.g_status_message:=sqlerrm;

3097: l_bsc_owner:='BSC';
3098: end if;
3099: return l_bsc_owner;
3100: Exception when others then
3101: BSC_IM_UTILS.g_status_message:=sqlerrm;
3102: raise;
3103: End;
3104:
3105: function get_lang return varchar2 is

Line 3109: BSC_IM_UTILS.g_status_message:=sqlerrm;

3105: function get_lang return varchar2 is
3106: Begin
3107: return userenv('LANG');
3108: Exception when others then
3109: BSC_IM_UTILS.g_status_message:=sqlerrm;
3110: raise;
3111: End;
3112:
3113: function is_like(p_string varchar2,p_comp_string varchar2) return boolean is

Line 3132: BSC_IM_UTILS.g_status_message:=sqlerrm;

3128: else
3129: return false;
3130: end if;
3131: Exception when others then
3132: BSC_IM_UTILS.g_status_message:=sqlerrm;
3133: raise;
3134: End;
3135:
3136: function execute_immediate(

Line 3363: END BSC_IM_UTILS;

3359: write_to_log_file_n('Exception in get_apps_owner '||sqlerrm);
3360: return null;
3361: End;
3362:
3363: END BSC_IM_UTILS;