3:
4: procedure execute(p_stmt varchar2) is
5: Begin
6: if g_debug then
7: bsc_aw_utility.log_s('@@ '||p_stmt);
8: bsc_aw_utility.log_s(' (S:'||bsc_aw_utility.get_time);
9: end if;
10: dbms_aw.interp_silent(p_stmt);
11: if g_debug then
4: procedure execute(p_stmt varchar2) is
5: Begin
6: if g_debug then
7: bsc_aw_utility.log_s('@@ '||p_stmt);
8: bsc_aw_utility.log_s(' (S:'||bsc_aw_utility.get_time);
9: end if;
10: dbms_aw.interp_silent(p_stmt);
11: if g_debug then
12: bsc_aw_utility.log(',E:'||bsc_aw_utility.get_time||')');
8: bsc_aw_utility.log_s(' (S:'||bsc_aw_utility.get_time);
9: end if;
10: dbms_aw.interp_silent(p_stmt);
11: if g_debug then
12: bsc_aw_utility.log(',E:'||bsc_aw_utility.get_time||')');
13: end if;
14: Exception when others then
15: if bsc_aw_utility.is_sqlerror(sqlcode,'ignore') then
16: if g_debug then
11: if g_debug then
12: bsc_aw_utility.log(',E:'||bsc_aw_utility.get_time||')');
13: end if;
14: Exception when others then
15: if bsc_aw_utility.is_sqlerror(sqlcode,'ignore') then
16: if g_debug then
17: bsc_aw_utility.log('Exception '||sqlcode||' ignored');
18: end if;
19: else
13: end if;
14: Exception when others then
15: if bsc_aw_utility.is_sqlerror(sqlcode,'ignore') then
16: if g_debug then
17: bsc_aw_utility.log('Exception '||sqlcode||' ignored');
18: end if;
19: else
20: bsc_aw_utility.log('Exception in execute '||p_stmt||' '||sqlerrm);
21: raise;
16: if g_debug then
17: bsc_aw_utility.log('Exception '||sqlcode||' ignored');
18: end if;
19: else
20: bsc_aw_utility.log('Exception in execute '||p_stmt||' '||sqlerrm);
21: raise;
22: end if;
23: End;
24:
27: Begin
28: execute(p_stmt);
29: Exception when others then
30: if g_debug then
31: bsc_aw_utility.log('This error can be ignored');
32: end if;
33: End;
34:
35: --if we need the output from aw of executing a command
38: l_output varchar2(10000);
39: l_length number;
40: Begin
41: if g_debug then
42: bsc_aw_utility.log_s('@@ '||p_stmt);
43: bsc_aw_utility.log_s(' (S:'||bsc_aw_utility.get_time);
44: end if;
45: l_length:=10000;
46: l_clob:=dbms_aw.interp(p_stmt);
39: l_length number;
40: Begin
41: if g_debug then
42: bsc_aw_utility.log_s('@@ '||p_stmt);
43: bsc_aw_utility.log_s(' (S:'||bsc_aw_utility.get_time);
44: end if;
45: l_length:=10000;
46: l_clob:=dbms_aw.interp(p_stmt);
47: dbms_lob.read(l_clob,l_length,1,l_output);
45: l_length:=10000;
46: l_clob:=dbms_aw.interp(p_stmt);
47: dbms_lob.read(l_clob,l_length,1,l_output);
48: if g_debug then
49: bsc_aw_utility.log(',E:'||bsc_aw_utility.get_time||'), output='||l_output);
50: end if;
51: l_output:=ltrim(rtrim(l_output));
52: return l_output;
53: Exception when others then
50: end if;
51: l_output:=ltrim(rtrim(l_output));
52: return l_output;
53: Exception when others then
54: if bsc_aw_utility.is_sqlerror(sqlcode,'ignore') then
55: if g_debug then
56: bsc_aw_utility.log('Exception '||sqlcode||' ignored');
57: end if;
58: else
52: return l_output;
53: Exception when others then
54: if bsc_aw_utility.is_sqlerror(sqlcode,'ignore') then
55: if g_debug then
56: bsc_aw_utility.log('Exception '||sqlcode||' ignored');
57: end if;
58: else
59: bsc_aw_utility.log('Exception in interp '||p_stmt||' '||sqlerrm);
60: raise;
55: if g_debug then
56: bsc_aw_utility.log('Exception '||sqlcode||' ignored');
57: end if;
58: else
59: bsc_aw_utility.log('Exception in interp '||p_stmt||' '||sqlerrm);
60: raise;
61: end if;
62: End;
63:
63:
64:
65: procedure init_all is
66: Begin
67: g_debug:=bsc_aw_utility.g_debug;
68: Exception when others then
69: null;
70: End;
71: