Skip to content

Commit f43b76e

Browse files
author
Peter Ocelka
committed
Added missing objects to avoid errors when new installation is not performed also with new user creation; Added purge for UT_OUTPUT_BUFFER_TMP$ to drop also overflow segment table
1 parent 3121382 commit f43b76e

File tree

1 file changed

+76
-1
lines changed

1 file changed

+76
-1
lines changed

source/uninstall.sql

Lines changed: 76 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ drop type ut_output_buffer_base force;
242242

243243
drop view ut_output_buffer_tmp;
244244

245-
drop table ut_output_buffer_tmp$;
245+
drop table ut_output_buffer_tmp$ purge;
246246

247247
drop view ut_output_buffer_info_tmp;
248248

@@ -276,6 +276,16 @@ drop type ut_varchar2_list force;
276276

277277
drop type ut_varchar2_rows force;
278278

279+
drop package ut_coverage_profiler;
280+
281+
drop package ut_compound_data_helper;
282+
283+
drop package ut_coverage_helper_profiler;
284+
285+
drop type ut_have_count;
286+
287+
drop type ut_compound_data_value;
288+
279289
set echo off
280290
set feedback off
281291
declare
@@ -306,6 +316,71 @@ begin
306316
dbms_output.put_line(i||' synonyms dropped');
307317
end;
308318
/
319+
320+
declare
321+
i integer := 0;
322+
begin
323+
dbms_output.put_line('Dropping synonyms pointing to PL/SQL code coverage objects on 12.2 ' || upper('&&ut3_owner'));
324+
for syn in (
325+
select
326+
case when owner = 'PUBLIC' then 'public synonym '
327+
else 'synonym ' || owner || '.'
328+
end || synonym_name as syn_name,
329+
table_owner || '.' || table_name as for_object
330+
from all_synonyms s
331+
where 1 = 1
332+
and table_owner = upper('&&ut3_owner')
333+
and synonym_name in ('DBMSPCC_BLOCKS','DBMSPCC_RUNS','DBMSPCC_UNITS')
334+
)
335+
loop
336+
337+
begin
338+
339+
execute immediate 'drop '||syn.syn_name;
340+
sys.dbms_output.put_line('Dropped '||syn.syn_name||' for object '||syn.for_object);
341+
342+
i := i + 1;
343+
exception
344+
when others then
345+
sys.dbms_output.put_line('FAILED to drop '||syn.syn_name||' for object '||syn.for_object);
346+
end;
347+
end loop;
348+
sys.dbms_output.put_line('&&line_separator');
349+
sys.dbms_output.put_line(i||' synonyms dropped');
350+
end;
351+
/
352+
353+
declare
354+
i integer := 0;
355+
begin
356+
sys.dbms_output.put_line('Dropping packages created for 12.2+ ' || upper('&&ut3_owner'));
357+
358+
for pkg in (select object_name, owner
359+
from all_objects
360+
where 1 = 1
361+
and owner = upper('&&ut3_owner')
362+
and object_type = 'PACKAGE'
363+
and object_name in ('UT_COVERAGE_HELPER_BLOCK','UT_COVERAGE_BLOCK'))
364+
loop
365+
366+
begin
367+
execute immediate 'drop package ' || pkg.owner || '.' || pkg.object_name;
368+
369+
sys.dbms_output.put_line('Dropped '|| pkg.object_name);
370+
i := i + 1;
371+
372+
exception
373+
when others then
374+
dbms_output.put_line('FAILED to drop ' || pkg.object_name);
375+
end;
376+
377+
end loop;
378+
379+
sys.dbms_output.put_line('&&line_separator');
380+
sys.dbms_output.put_line(i || ' packages dropped');
381+
end;
382+
/
383+
309384
begin
310385
dbms_output.put_line('&&line_separator');
311386
dbms_output.put_line('Uninstall complete');

0 commit comments

Comments
 (0)