DBA Data[Home] [Help]

APPS.BIS_TRUNCATE_EMPTY_MV_LOG_PKG dependencies on BIS_COLLECTION_UTILITIES

Line 50: BIS_COLLECTION_UTILITIES.put_line('Checking if DBI Refresh Request Sets are running ...');

46:
47: BEGIN
48: prog_running := 0;
49: OPEN rs_running;
50: BIS_COLLECTION_UTILITIES.put_line('Checking if DBI Refresh Request Sets are running ...');
51: BIS_COLLECTION_UTILITIES.put_line(' ');
52: LOOP
53: FETCH rs_running INTO rs_running_rec;
54: EXIT WHEN rs_running%NOTFOUND;

Line 51: BIS_COLLECTION_UTILITIES.put_line(' ');

47: BEGIN
48: prog_running := 0;
49: OPEN rs_running;
50: BIS_COLLECTION_UTILITIES.put_line('Checking if DBI Refresh Request Sets are running ...');
51: BIS_COLLECTION_UTILITIES.put_line(' ');
52: LOOP
53: FETCH rs_running INTO rs_running_rec;
54: EXIT WHEN rs_running%NOTFOUND;
55: prog_running := 1;

Line 56: BIS_COLLECTION_UTILITIES.put_line(' - ' || rs_running_rec.Name||'(Req. Id:'||rs_running_rec.request||') Phase:'|| rs_running_rec.Phase || ' Started:' || to_char(rs_running_rec.s_Date,'DD-MON-YY HH24:MI:SS'));

52: LOOP
53: FETCH rs_running INTO rs_running_rec;
54: EXIT WHEN rs_running%NOTFOUND;
55: prog_running := 1;
56: BIS_COLLECTION_UTILITIES.put_line(' - ' || rs_running_rec.Name||'(Req. Id:'||rs_running_rec.request||') Phase:'|| rs_running_rec.Phase || ' Started:' || to_char(rs_running_rec.s_Date,'DD-MON-YY HH24:MI:SS'));
57: END LOOP;
58:
59: IF (prog_running <> 0) THEN
60: RETURN prog_running;

Line 63: BIS_COLLECTION_UTILITIES.put_line('Checking if MV Refresh Program are running ...');

59: IF (prog_running <> 0) THEN
60: RETURN prog_running;
61: END IF;
62:
63: BIS_COLLECTION_UTILITIES.put_line('Checking if MV Refresh Program are running ...');
64: BIS_COLLECTION_UTILITIES.put_line(' ');
65: OPEN mv_refresh_prog;
66: LOOP
67: FETCH mv_refresh_prog INTO mv_refresh_prog_rec;

Line 64: BIS_COLLECTION_UTILITIES.put_line(' ');

60: RETURN prog_running;
61: END IF;
62:
63: BIS_COLLECTION_UTILITIES.put_line('Checking if MV Refresh Program are running ...');
64: BIS_COLLECTION_UTILITIES.put_line(' ');
65: OPEN mv_refresh_prog;
66: LOOP
67: FETCH mv_refresh_prog INTO mv_refresh_prog_rec;
68: EXIT WHEN mv_refresh_prog%NOTFOUND;

Line 70: BIS_COLLECTION_UTILITIES.put_line(' - ' || mv_refresh_prog_rec.Name||'(Req. Id:'||mv_refresh_prog_rec.request||') - Getting Refreshed');

66: LOOP
67: FETCH mv_refresh_prog INTO mv_refresh_prog_rec;
68: EXIT WHEN mv_refresh_prog%NOTFOUND;
69: prog_running := 2;
70: BIS_COLLECTION_UTILITIES.put_line(' - ' || mv_refresh_prog_rec.Name||'(Req. Id:'||mv_refresh_prog_rec.request||') - Getting Refreshed');
71: END LOOP;
72: CLOSE mv_refresh_prog;
73:
74: IF (prog_running <> 0) THEN

Line 78: BIS_COLLECTION_UTILITIES.put_line('Checking if any MV being refreshed ...');

74: IF (prog_running <> 0) THEN
75: RETURN prog_running;
76: END IF;
77:
78: BIS_COLLECTION_UTILITIES.put_line('Checking if any MV being refreshed ...');
79: BIS_COLLECTION_UTILITIES.put_line(' ');
80: OPEN mv_refresh;
81: LOOP
82: FETCH mv_refresh INTO mv_refresh_rec;

Line 79: BIS_COLLECTION_UTILITIES.put_line(' ');

75: RETURN prog_running;
76: END IF;
77:
78: BIS_COLLECTION_UTILITIES.put_line('Checking if any MV being refreshed ...');
79: BIS_COLLECTION_UTILITIES.put_line(' ');
80: OPEN mv_refresh;
81: LOOP
82: FETCH mv_refresh INTO mv_refresh_rec;
83: EXIT WHEN mv_refresh%NOTFOUND;

Line 85: BIS_COLLECTION_UTILITIES.put_line(' - ' || mv_refresh_rec.Name ||' - Getting Refreshed');

81: LOOP
82: FETCH mv_refresh INTO mv_refresh_rec;
83: EXIT WHEN mv_refresh%NOTFOUND;
84: prog_running := 3;
85: BIS_COLLECTION_UTILITIES.put_line(' - ' || mv_refresh_rec.Name ||' - Getting Refreshed');
86: END LOOP;
87: CLOSE mv_refresh;
88:
89: RETURN prog_running;

Line 92: BIS_COLLECTION_UTILITIES.put_line('Error in Check_Refresh_Prog_running '|| sqlerrm);

88:
89: RETURN prog_running;
90: EXCEPTION
91: WHEN OTHERS THEN
92: BIS_COLLECTION_UTILITIES.put_line('Error in Check_Refresh_Prog_running '|| sqlerrm);
93: l_program_status := fnd_concurrent.set_completion_status('Error' ,NULL);
94: END;
95:
96:

Line 119: BIS_COLLECTION_UTILITIES.put_line('Error in get_Table_size('|| p_obj_owner || ',' || p_log_table || sqlerrm);

115: BEGIN
116: Dbms_Space.Unused_Space(p_obj_owner, p_log_table, 'TABLE',op1,total_bytes,op3,op4,op5,op6,op7);
117: EXCEPTION
118: WHEN OTHERS THEN
119: BIS_COLLECTION_UTILITIES.put_line('Error in get_Table_size('|| p_obj_owner || ',' || p_log_table || sqlerrm);
120: END;
121: return total_bytes;
122: END;
123:

Line 157: BIS_COLLECTION_UTILITIES.put_line('Starting Truncate Empty MV Logs');

153: l_refresh_progs number;
154: l_threshold_bytes number;
155: default_threshold number := 80;
156: BEGIN
157: BIS_COLLECTION_UTILITIES.put_line('Starting Truncate Empty MV Logs');
158: BIS_COLLECTION_UTILITIES.put_line(' ');
159: l_refresh_progs := Check_Refresh_Prog_running;
160: if(l_refresh_progs <> 0) then
161: raise e_refresh_prog_running;

Line 158: BIS_COLLECTION_UTILITIES.put_line(' ');

154: l_threshold_bytes number;
155: default_threshold number := 80;
156: BEGIN
157: BIS_COLLECTION_UTILITIES.put_line('Starting Truncate Empty MV Logs');
158: BIS_COLLECTION_UTILITIES.put_line(' ');
159: l_refresh_progs := Check_Refresh_Prog_running;
160: if(l_refresh_progs <> 0) then
161: raise e_refresh_prog_running;
162: end if;

Line 166: BIS_COLLECTION_UTILITIES.put_line('Threshold for Empty MV Logs (by default) = ' || to_char(default_threshold) || 'MB');

162: end if;
163:
164: if (threshold is null) then
165: l_threshold_bytes := default_threshold * 1024 * 1024;
166: BIS_COLLECTION_UTILITIES.put_line('Threshold for Empty MV Logs (by default) = ' || to_char(default_threshold) || 'MB');
167: else
168: l_threshold_bytes := threshold * 1024 * 1024;
169: BIS_COLLECTION_UTILITIES.put_line('Threshold for Empty MV Logs = ' || to_char(threshold) || 'MB');
170: end if;

Line 169: BIS_COLLECTION_UTILITIES.put_line('Threshold for Empty MV Logs = ' || to_char(threshold) || 'MB');

165: l_threshold_bytes := default_threshold * 1024 * 1024;
166: BIS_COLLECTION_UTILITIES.put_line('Threshold for Empty MV Logs (by default) = ' || to_char(default_threshold) || 'MB');
167: else
168: l_threshold_bytes := threshold * 1024 * 1024;
169: BIS_COLLECTION_UTILITIES.put_line('Threshold for Empty MV Logs = ' || to_char(threshold) || 'MB');
170: end if;
171:
172: open impl_tables;
173: BIS_COLLECTION_UTILITIES.put_line(RPAD('Object Name',35,' ') || RPAD('Owner',10,' ') || RPAD('Log table name',35,' ') ||' Action');

Line 173: BIS_COLLECTION_UTILITIES.put_line(RPAD('Object Name',35,' ') || RPAD('Owner',10,' ') || RPAD('Log table name',35,' ') ||' Action');

169: BIS_COLLECTION_UTILITIES.put_line('Threshold for Empty MV Logs = ' || to_char(threshold) || 'MB');
170: end if;
171:
172: open impl_tables;
173: BIS_COLLECTION_UTILITIES.put_line(RPAD('Object Name',35,' ') || RPAD('Owner',10,' ') || RPAD('Log table name',35,' ') ||' Action');
174: loop
175: fetch impl_tables into impl_tables_rec;
176: exit when impl_tables%notfound;
177: if(impl_tables_rec.obj_owner = 'NOTFOUND' ) then

Line 192: BIS_COLLECTION_UTILITIES.put_line(RPAD(impl_tables_rec.object_name,35,' ') || RPAD(impl_tables_rec.obj_owner,10,' ') || RPAD(log_table_rec.log_table,35,' ') ||' Truncated');

188: if (c1%NotFound) then
189: if (get_Table_size(impl_tables_rec.obj_owner,log_table_rec.log_table) >= l_threshold_bytes) then
190: l_stmt := 'TRUNCATE TABLE '|| impl_tables_rec.obj_owner || '.' ||log_table_rec.log_table;
191: execute immediate l_stmt;
192: BIS_COLLECTION_UTILITIES.put_line(RPAD(impl_tables_rec.object_name,35,' ') || RPAD(impl_tables_rec.obj_owner,10,' ') || RPAD(log_table_rec.log_table,35,' ') ||' Truncated');
193: else
194: BIS_COLLECTION_UTILITIES.put_line(RPAD(impl_tables_rec.object_name,35,' ') || RPAD(impl_tables_rec.obj_owner,10,' ') || RPAD(log_table_rec.log_table,35,' ') ||' Empty under threshold');
195: end if;
196: else

Line 194: BIS_COLLECTION_UTILITIES.put_line(RPAD(impl_tables_rec.object_name,35,' ') || RPAD(impl_tables_rec.obj_owner,10,' ') || RPAD(log_table_rec.log_table,35,' ') ||' Empty under threshold');

190: l_stmt := 'TRUNCATE TABLE '|| impl_tables_rec.obj_owner || '.' ||log_table_rec.log_table;
191: execute immediate l_stmt;
192: BIS_COLLECTION_UTILITIES.put_line(RPAD(impl_tables_rec.object_name,35,' ') || RPAD(impl_tables_rec.obj_owner,10,' ') || RPAD(log_table_rec.log_table,35,' ') ||' Truncated');
193: else
194: BIS_COLLECTION_UTILITIES.put_line(RPAD(impl_tables_rec.object_name,35,' ') || RPAD(impl_tables_rec.obj_owner,10,' ') || RPAD(log_table_rec.log_table,35,' ') ||' Empty under threshold');
195: end if;
196: else
197: BIS_COLLECTION_UTILITIES.put_line(RPAD(impl_tables_rec.object_name,35,' ') || RPAD(impl_tables_rec.obj_owner,10,' ') || RPAD(log_table_rec.log_table,35,' ') ||' Not Empty');
198: end if;

Line 197: BIS_COLLECTION_UTILITIES.put_line(RPAD(impl_tables_rec.object_name,35,' ') || RPAD(impl_tables_rec.obj_owner,10,' ') || RPAD(log_table_rec.log_table,35,' ') ||' Not Empty');

193: else
194: BIS_COLLECTION_UTILITIES.put_line(RPAD(impl_tables_rec.object_name,35,' ') || RPAD(impl_tables_rec.obj_owner,10,' ') || RPAD(log_table_rec.log_table,35,' ') ||' Empty under threshold');
195: end if;
196: else
197: BIS_COLLECTION_UTILITIES.put_line(RPAD(impl_tables_rec.object_name,35,' ') || RPAD(impl_tables_rec.obj_owner,10,' ') || RPAD(log_table_rec.log_table,35,' ') ||' Not Empty');
198: end if;
199: close c1;
200: exception
201: when others then

Line 202: BIS_COLLECTION_UTILITIES.put_line(RPAD(impl_tables_rec.object_name,35,' ') || RPAD(impl_tables_rec.obj_owner,10,' ') || 'Exception while accessing ' ||log_table_rec.log_table || ': ' || sqlerrm);

198: end if;
199: close c1;
200: exception
201: when others then
202: BIS_COLLECTION_UTILITIES.put_line(RPAD(impl_tables_rec.object_name,35,' ') || RPAD(impl_tables_rec.obj_owner,10,' ') || 'Exception while accessing ' ||log_table_rec.log_table || ': ' || sqlerrm);
203: if (c1%isopen) then
204: close c1;
205: end if;
206: end;

Line 211: BIS_COLLECTION_UTILITIES.put_line(' ');

207: end loop;
208: close log_table;
209: end loop;
210: close impl_tables;
211: BIS_COLLECTION_UTILITIES.put_line(' ');
212: BIS_COLLECTION_UTILITIES.put_line('Completing Truncate Empty MV Logs');
213:
214: EXCEPTION
215: WHEN e_refresh_prog_running THEN

Line 212: BIS_COLLECTION_UTILITIES.put_line('Completing Truncate Empty MV Logs');

208: close log_table;
209: end loop;
210: close impl_tables;
211: BIS_COLLECTION_UTILITIES.put_line(' ');
212: BIS_COLLECTION_UTILITIES.put_line('Completing Truncate Empty MV Logs');
213:
214: EXCEPTION
215: WHEN e_refresh_prog_running THEN
216: BIS_COLLECTION_UTILITIES.put_line(' ');

Line 216: BIS_COLLECTION_UTILITIES.put_line(' ');

212: BIS_COLLECTION_UTILITIES.put_line('Completing Truncate Empty MV Logs');
213:
214: EXCEPTION
215: WHEN e_refresh_prog_running THEN
216: BIS_COLLECTION_UTILITIES.put_line(' ');
217: IF (l_refresh_progs = 1) THEN
218: BIS_COLLECTION_UTILITIES.put_line('Error in Truncate Empty MV Logs - DBI Refresh program is running' );
219: ELSE
220: BIS_COLLECTION_UTILITIES.put_line('Error in Truncate Empty MV Logs - MV is being refreshed' );

Line 218: BIS_COLLECTION_UTILITIES.put_line('Error in Truncate Empty MV Logs - DBI Refresh program is running' );

214: EXCEPTION
215: WHEN e_refresh_prog_running THEN
216: BIS_COLLECTION_UTILITIES.put_line(' ');
217: IF (l_refresh_progs = 1) THEN
218: BIS_COLLECTION_UTILITIES.put_line('Error in Truncate Empty MV Logs - DBI Refresh program is running' );
219: ELSE
220: BIS_COLLECTION_UTILITIES.put_line('Error in Truncate Empty MV Logs - MV is being refreshed' );
221: END IF;
222: BIS_COLLECTION_UTILITIES.put_line('Please run Truncate Empty MV Logs when there are no Refresh request-set/programs running');

Line 220: BIS_COLLECTION_UTILITIES.put_line('Error in Truncate Empty MV Logs - MV is being refreshed' );

216: BIS_COLLECTION_UTILITIES.put_line(' ');
217: IF (l_refresh_progs = 1) THEN
218: BIS_COLLECTION_UTILITIES.put_line('Error in Truncate Empty MV Logs - DBI Refresh program is running' );
219: ELSE
220: BIS_COLLECTION_UTILITIES.put_line('Error in Truncate Empty MV Logs - MV is being refreshed' );
221: END IF;
222: BIS_COLLECTION_UTILITIES.put_line('Please run Truncate Empty MV Logs when there are no Refresh request-set/programs running');
223: l_program_status := fnd_concurrent.set_completion_status('Error' ,NULL);
224: errbuf := 'DBI Refresh Program Running';

Line 222: BIS_COLLECTION_UTILITIES.put_line('Please run Truncate Empty MV Logs when there are no Refresh request-set/programs running');

218: BIS_COLLECTION_UTILITIES.put_line('Error in Truncate Empty MV Logs - DBI Refresh program is running' );
219: ELSE
220: BIS_COLLECTION_UTILITIES.put_line('Error in Truncate Empty MV Logs - MV is being refreshed' );
221: END IF;
222: BIS_COLLECTION_UTILITIES.put_line('Please run Truncate Empty MV Logs when there are no Refresh request-set/programs running');
223: l_program_status := fnd_concurrent.set_completion_status('Error' ,NULL);
224: errbuf := 'DBI Refresh Program Running';
225: WHEN OTHERS THEN
226: BIS_COLLECTION_UTILITIES.put_line('Error in Truncate Empty MV Logs '|| sqlerrm);

Line 226: BIS_COLLECTION_UTILITIES.put_line('Error in Truncate Empty MV Logs '|| sqlerrm);

222: BIS_COLLECTION_UTILITIES.put_line('Please run Truncate Empty MV Logs when there are no Refresh request-set/programs running');
223: l_program_status := fnd_concurrent.set_completion_status('Error' ,NULL);
224: errbuf := 'DBI Refresh Program Running';
225: WHEN OTHERS THEN
226: BIS_COLLECTION_UTILITIES.put_line('Error in Truncate Empty MV Logs '|| sqlerrm);
227: l_program_status := fnd_concurrent.set_completion_status('Error' ,NULL);
228: errbuf := sqlerrm;
229: retcode := sqlcode;
230: END;