MINI MINI MANI MO

Path : /opt/oracle/product/18c/dbhomeXE/md/admin/
File Upload :
Current File : //opt/oracle/product/18c/dbhomeXE/md/admin/semremov.sql

Rem
Rem $Header: sdo/admin/semremov.sql /main/30 2017/08/06 16:56:57 anestrad Exp $
Rem
Rem semremov.sql
Rem
Rem Copyright (c) 2009, 2017, Oracle and/or its affiliates. 
Rem All rights reserved.
Rem
Rem    NAME
Rem      semremov.sql - <one-line expansion of the name>
Rem
Rem    DESCRIPTION
Rem      <short description of component this file declares/defines>
Rem
Rem    NOTES
Rem      <other useful comments, qualifications, etc.>
Rem
Rem    BEGIN SQL_FILE_METADATA
Rem    SQL_SOURCE_FILE: sdo/admin/semremov.sql
Rem    SQL_SHIPPED_FILE: md/admin/semremov.sql
Rem    SQL_PHASE: DOWNGRADE
Rem    SQL_STARTUP_MODE: NORMAL
Rem    SQL_IGNORABLE_ERRORS: NONE
Rem    SQL_CALLING_FILE: NONE
Rem    END SQL_FILE_METADATA
Rem
Rem    MODIFIED   (MM/DD/YY)
Rem    anestrad    06/23/17 - Add user name to drop_rdf_network call
Rem    rjanders    05/10/17 - #26037683: Raise 'when other' exceptions
Rem    rjanders    04/27/17 - Correct "SQL_PHASE" metadata values
Rem    sdas        04/07/17 - bug 25223880
Rem    rjanders    03/23/17 - #25437999: Remove 'when others then NULL'
Rem                           handlers
Rem    sravada     01/11/17 - bug 25370681
Rem    matperry    01/27/16 - drop a few missed synonyms
Rem    matperry    12/02/15 - call sdo_rdf_internal.drop_rdf_network to avoid
Rem                           running RDF API as SYS
Rem    anestrad    02/19/15 - Drop sem_match_nl
Rem    rjanders    01/02/15 - long identifier project phase 1
Rem    anestrad    11/14/14 - Drop update context
Rem    matperry    03/12/14 - update for pg_match
Rem    matperry    12/06/13 - drop GROUP_CONCAT_VC
Rem    matperry    10/17/13 - drop varchar versions of sparql aggregates
Rem    rjanders    09/16/13 - OCCS: Remove hardtabs
Rem    rjanders    03/15/13 - #16473696: Start/End _ORACLE_SCRIPT
Rem                           initialization
Rem    matperry    06/19/12 - drop RDF_PARAM$ view and _TBL table
Rem    matperry    05/15/12 - drop sdo_rdf_entailments type
Rem    jazarago    02/29/12 - Remove aggrate types and functions
Rem    sdas        01/24/12 - drop sdo_rdf_rel2rdf_internal package
Rem    matperry    08/29/11 - update for sdo_rdf_term object type
Rem    matperry    12/03/10 - update for refactored semgeo packages
Rem    sdas        11/22/10 - XbranchMerge sdas_ng_11.2.0.2.0_11.2.0.3.0 from
Rem                           st_sdo_11.2.0
Rem    sdas        11/22/10 - XbranchMerge sdas_ng_11.2.0.2.0 from
Rem    matperry    08/25/10 - remove SEM_GRAPHS type
Rem    vkolovsk    07/29/10 - XbranchMerge
Rem                           vkolovsk_rdf_ols_set_triple_label_11.2.0.2.0 from
Rem                           st_sdo_11.2.0
Rem    vkolovsk    06/10/10 - remove sem_inf_internal
Rem    vkolovsk    05/04/10 - add session-specific application context
Rem    matperry    04/02/10 - update for optional RDFGEO component
Rem    vkolovsk    11/03/09 - moved sdosemsam type creation and removal to
Rem                           sdordfty and semremov
Rem    matperry    05/13/09 - change behavior to drop force
Rem    matperry    04/23/09 - copied from seme102
Rem    matperry    04/23/09 - Created
Rem

Rem ********************************************************************
Rem #16473696: Indicate Oracle-Supplied object
@@?/rdbms/admin/sqlsessstart.sql
Rem ********************************************************************

-------------------------------------------------------------------------------------------
-- Each SERVER component has a "remov" script, mycremov.sql where 'MYC' is the component --
-- abbreviation. The removal script drops all of the component's objects and schemas     --
-- from the database.                                                                    --
--                                                                                       --
-- In 11g, there is a script, catcmprm.sql, that takes a single parameter, the component --
-- ID of the component to be removed. If the component exists in the database and has no --
-- dependent components in the database, then the relevant component removal script is   --
-- invoked. The catcmprm.sql script will use the dependencies set by the                 --
-- dbms_registry.set_required_comps procedure and the component removal script will only --
-- be called if there are no existing dependencies. If your removal script is going to   --
-- drop the entire schema you do not need to call dbms_registry interfaces because the   --
-- entry in the component registry is deleted when the component schema is dropped.      --
-------------------------------------------------------------------------------------------

ALTER SESSION SET CURRENT_SCHEMA = MDSYS;

-- make sure we don't fail --
whenever sqlerror continue;

-- PL/SQL block to raise errors
declare
  network_exists     NUMBER;
begin

  -- first try to remove any semantic data using drop_sem_network cascade --
  select count(*) into network_exists
  from SYS.all_objects
  where object_name = 'RDF_VALUE$' and owner = 'MDSYS';

  if (network_exists > 0) then
    execute immediate
      'begin
         mdsys.sdo_rdf_internal.drop_rdf_network(:1,:2,true);
       end;' USING sys_context('userenv', 'current_user'),' DBA PDB_DBA ';
  end if;

  -- see if drop_network was successful --
  select count(*) into network_exists
  from SYS.all_objects
  where object_name = 'RDF_VALUE$' and owner = 'MDSYS';

  if (network_exists > 0) then
    raise_application_error(-20000, 
      'Cannot remove component: a semantic network exists');
  end if;

end;
/
show errors;

-- PL/SQL blocks to do work

-- first uninstall OLS / VPD / CTX / WM optional components --
COLUMN :script_name1 NEW_VALUE comp_file1 NOPRINT
VARIABLE script_name1 VARCHAR2(128)

COLUMN :script_name2 NEW_VALUE comp_file2 NOPRINT
VARIABLE script_name2 VARCHAR2(128)

COLUMN :script_name3 NEW_VALUE comp_file3 NOPRINT
VARIABLE script_name3 VARCHAR2(128)

declare
  network_exists  number := 0;
  refcount        number := 0;
  table_not_found exception;
  pragma exception_init(table_not_found, -00942);
begin

  select count(*) into network_exists
  from SYS.all_objects
  where object_name = 'RDF_VALUE$' and owner = 'MDSYS';

  if (network_exists > 0) then
    :script_name1 := dbms_registry.nothing_script;
    :script_name2 := dbms_registry.nothing_script;
    :script_name3 := dbms_registry.nothing_script;
  else

    refcount := 0;
    begin
      execute immediate
        'select count(*) from mdsys.rdf_parameter
         where namespace = ''COMPONENT'' and attribute = ''RDFCTX'''
      into refcount;
      exception
        when table_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')1]: ' || SQLERRM); -- RAISE;
    end;
    if (refcount > 0) then 
      :script_name1 := '@sdordfctx_rm.sql';
    else
      :script_name1 := dbms_registry.nothing_script;
    end if; 

    refcount := 0;
    begin
      execute immediate
        'select count(*) from mdsys.rdf_parameter
         where namespace = ''COMPONENT'' and attribute = ''RDFOWM'''
      into refcount;
      exception
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')2]: ' || SQLERRM); -- RAISE;
    end;
    if (refcount > 0) then 
      :script_name2 := '@sdordfwm_rm.sql';
    else
      :script_name2 := dbms_registry.nothing_script;
    end if;

    refcount := 0;
    begin
      execute immediate
        'select count(*) from mdsys.rdf_parameter
         where namespace = ''COMPONENT'' and attribute in (''RDFVPD'', ''RDFOLS'')'
      into refcount;
      exception
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')3]: ' || SQLERRM); -- RAISE;
    end;
    if (refcount > 0) then 
      :script_name3 := '@sdordfsa_rm.sql';
    else
      :script_name3 := dbms_registry.nothing_script;
    end if; 

  end if;

end;
/
show errors;

SELECT :script_name1 FROM SYS.DUAL;
@&comp_file1
SELECT :script_name2 FROM SYS.DUAL;
@&comp_file2
SELECT :script_name3 FROM SYS.DUAL;
@&comp_file3

-- make sure schema is set to MDSYS --
ALTER SESSION SET CURRENT_SCHEMA = MDSYS;

-- get rid of standard semantics components --
COLUMN :jscript NEW_VALUE comp_file4 NOPRINT
VARIABLE jscript VARCHAR2(50)

declare
  stmt           VARCHAR2(1000);
  network_exists NUMBER;
  indextype_not_found exception;
  pragma exception_init(indextype_not_found, -29833);
  operator_not_found exception;
  pragma exception_init(operator_not_found, -29807);
  object_not_found exception;
  pragma exception_init(object_not_found, -04043);
  synonym_not_found exception;
  pragma exception_init(synonym_not_found, -01432);
  trigger_not_found exception;
  pragma exception_init(trigger_not_found, -04080);
  view_not_found exception;
  pragma exception_init(view_not_found, -00942);
  table_not_found exception;
  pragma exception_init(table_not_found, -00942);
  sequence_not_found exception;
  pragma exception_init(sequence_not_found, -02289);
  compilation_error exception;
  pragma exception_init(compilation_error, -22324);
begin

  -- only continue if no network exists
  select count(*) into network_exists
  from SYS.all_objects
  where object_name = 'RDF_VALUE$' and owner = 'MDSYS';

  if (network_exists = 0) then
    -- no network ... ok to remove 

    -- get java removal script
    :jscript := '@semremovj.sql';

    -- VPD / OLS / WM / CTX Types and Tables and packages --
    begin
      stmt := 'drop package mdsys.sem_rdfsa_ir'; execute immediate stmt;
      exception
        when object_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')4]: ' || SQLERRM); -- RAISE;
    end;

    begin
      stmt := 'drop procedure mdsys.RDF$GRANT_OLS_PRIVS'; execute immediate stmt;
      exception
        when object_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')5]: ' || SQLERRM); -- RAISE;
    end;

    begin
      stmt := 'drop type mdsys.rdfsa_resource force'; execute immediate stmt;
      exception
        when object_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')6]: ' || SQLERRM); -- RAISE;
    end;

    begin
      stmt := 'drop public synonym rdfsa_resource'; execute immediate stmt;
      exception
        when synonym_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')7]: ' || SQLERRM); -- RAISE;
    end;

    begin
      stmt := 'drop type mdsys.rdfsa_labelgen force'; execute immediate stmt;
      exception
        when object_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')8]: ' || SQLERRM); -- RAISE;
    end;

    -- drop RDF_PARAMETER table, RDF_PARAM$ view and _TBL table
    begin
      stmt := 'drop table mdsys.rdf_parameter'; execute immediate stmt;
      exception
        when table_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')9]: ' || SQLERRM); -- RAISE;
    end;

    begin
      stmt := 'drop view mdsys.rdf_param$'; execute immediate stmt;
      exception
        when table_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')10]: ' || SQLERRM); -- RAISE;
    end;

    begin
      stmt := 'drop table mdsys.rdf_param$_tbl'; execute immediate stmt;
      exception
        when table_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')11]: ' || SQLERRM); -- RAISE;
    end;

    -- delete RDF exp/imp related rows and drop SDO_RDF_EXO_IMP package --
    begin
      stmt := '
        delete from SYS.EXPPKGACT$ 
         where package=''SDO_RDF_EXP_IMP'' and schema=''SYS''';
      execute immediate stmt;
      exception
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')12]: ' || SQLERRM); -- RAISE;
    end;
  
    begin
      stmt := '
        delete from SYS.impcalloutreg$ 
         where package=''SDO_RDF_EXP_IMP'' and schema=''SYS''
           and tag=''SEMANTIC''';
      execute immediate stmt;
      exception
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')13]: ' || SQLERRM); -- RAISE;
    end;

    begin
      stmt := 'drop package SYS.SDO_RDF_EXP_IMP';
      execute immediate stmt;
      exception
        when object_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                             'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')14]: ' || SQLERRM); -- RAISE;
    end;

    -- RDB2RDF (R2RML) Types and Tables and packages --
    begin
      stmt := 'drop package mdsys.sdo_rdf_rel2rdf_internal'; execute immediate stmt;
      exception
        when object_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                             'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')15]: ' || SQLERRM); -- RAISE;
    end;

    -- Standard Semantics types, tables and packages --
    begin
      stmt := 'drop type sdo_sem_stats force'; execute immediate stmt;
      exception
        when object_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')16]: ' || SQLERRM); -- RAISE;
     end;

    begin
      stmt := 'drop indextype sem_indextype force';  execute immediate stmt;
      exception
        when indextype_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')17]: ' || SQLERRM); -- RAISE;
     end;

    begin
      stmt := 'drop public synonym sem_path'; execute immediate stmt;
      exception
        when synonym_not_found then NULL;  
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')18]: ' || SQLERRM); -- RAISE;
     end;

    begin
      stmt := 'drop operator sem_path force'; execute immediate stmt;
      exception
        when operator_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')19]: ' || SQLERRM); -- RAISE;
     end;

    begin
      stmt := 'drop public synonym sem_distance'; execute immediate stmt;
      exception
        when synonym_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')20]: ' || SQLERRM); -- RAISE;
     end;

    begin
      stmt := 'drop operator sem_distance force'; execute immediate stmt;
      exception
        when operator_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')21]: ' || SQLERRM); -- RAISE;
     end;

    begin
      stmt := 'drop public synonym sem_related'; execute immediate stmt;
      exception
        when synonym_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')22]: ' || SQLERRM); -- RAISE;
     end;

    begin
      stmt := 'drop operator sem_related force'; execute immediate stmt;
      exception
        when operator_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')23]: ' || SQLERRM); -- RAISE;
     end;

    begin
      stmt := 'drop package sdo_sem_operator'; execute immediate stmt;
      exception
        when object_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')24]: ' || SQLERRM); -- RAISE;
     end;

    begin
      stmt := 'drop type sem_sameas_list force';  execute immediate stmt;
      exception
        when object_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')25]: ' || SQLERRM); -- RAISE;
    end;

    begin
      stmt := 'drop type sem_sameas_rec force';  execute immediate stmt;
      exception
        when object_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')26]: ' || SQLERRM); -- RAISE;
     end;

    begin
      stmt := 'drop type sem_indextype_im force';  execute immediate stmt;
      exception
        when object_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')27]: ' || SQLERRM); -- RAISE;
     end;

    begin
      stmt := 'drop type sdo_bt_handle force'; execute immediate stmt;
      exception
        when object_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')28]: ' || SQLERRM); -- RAISE;
     end;

    begin
      stmt := 'drop package sdo_sem_bt'; execute immediate stmt;
      exception
        when object_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')29]: ' || SQLERRM); -- RAISE;
     end;

    begin
      stmt := 'drop library mdsys.ORDMD_SEM_LIBS'; execute immediate stmt;
      exception
        when object_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')30]: ' || SQLERRM); -- RAISE;
    end;

    begin
      stmt := 'drop package rdf_apis_oper_internal'; execute immediate stmt;
      exception
        when object_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')31]: ' || SQLERRM); -- RAISE;
     end;

    begin
      stmt := 'drop package sdo_sem_inference'; execute immediate stmt;
      exception
        when object_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')32]: ' || SQLERRM); -- RAISE;
    end;

    begin
      stmt := 'drop package sdo_sem_inf_internal'; execute immediate stmt;
      exception
        when object_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')33]: ' || SQLERRM); -- RAISE;
    end;

    begin
      stmt := 'drop package sdo_sem_infh'; execute immediate stmt;
      exception
        when object_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')34]: ' || SQLERRM); -- RAISE;
    end;

    begin
      stmt := 'drop package sdo_sem_infi'; execute immediate stmt;
      exception
        when object_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')35]: ' || SQLERRM); -- RAISE;
    end;

    begin
      stmt := 'drop package sdo_sem_utl'; execute immediate stmt;
      exception
        when object_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                            'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')36]: ' || SQLERRM); -- RAISE;
    end;

    begin
      stmt := 'drop package sem_upgrade_to_11'; execute immediate stmt;
      exception
        when object_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                            'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')37]: ' || SQLERRM); -- RAISE;
    end;

    begin
      stmt := 'drop public synonym sem_upgrade_to_11'; execute immediate stmt;
      exception
        when synonym_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')38]: ' || SQLERRM); -- RAISE;
    end;

    begin
      stmt := 'drop package sdo_sem_downgrade_utl'; execute immediate stmt;
      exception
        when object_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')39]: ' || SQLERRM); -- RAISE;
    end;

    begin
      stmt := 'drop public synonym sdo_sem_downgrade_utl'; execute immediate stmt;
      exception
        when synonym_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')40]: ' || SQLERRM); -- RAISE;
    end;

    begin
      stmt := 'drop package sdo_rdf_mig'; execute immediate stmt;
      exception
        when object_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')41]: ' || SQLERRM); -- RAISE;
    end;

    begin
      stmt := 'drop package sdo_sem_validate'; execute immediate stmt;
      exception
        when object_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')42]: ' || SQLERRM); -- RAISE;
    end;

    begin
      stmt := 'drop package sdo_sem_downgrade'; execute immediate stmt;
      exception
        when object_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')43]: ' || SQLERRM); -- RAISE;
    end;

    begin
      stmt := 'drop public synonym sdo_sem_downgrade'; execute immediate stmt;
      exception
        when synonym_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')44]: ' || SQLERRM); -- RAISE;
    end;

    begin
      stmt := 'drop package sdo_sem_perf'; execute immediate stmt;
      exception
        when object_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')45]: ' || SQLERRM); -- RAISE;
    end;

    begin
      stmt := 'drop package sdo_sem_cli'; execute immediate stmt;
      exception
        when object_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')46]: ' || SQLERRM); -- RAISE;
    end;

    begin
      stmt := 'drop public synonym SEM_INF_HIST'; execute immediate stmt;
      exception
        when synonym_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')47]: ' || SQLERRM); -- RAISE;
    end;

    begin
      stmt := 'drop public synonym SEM_PERF'; execute immediate stmt;
      exception
        when synonym_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')48]: ' || SQLERRM); -- RAISE;
    end;

    begin
      stmt := 'drop view mdsys.sem_inf_hist'; execute immediate stmt;
      exception
        when view_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')49]: ' || SQLERRM); -- RAISE;
    end;

    begin
      stmt := 'drop table mdsys.rdf_hist$'; execute immediate stmt;
      exception
        when table_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')50]: ' || SQLERRM); -- RAISE;
    end;

    begin
      stmt := 'drop sequence mdsys.rdf_hist_id_sq'; execute immediate stmt;
      exception
        when sequence_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')51]: ' || SQLERRM); -- RAISE;
    end;

    begin
      stmt := 'drop package mdsys.sdo_sem_log'; execute immediate stmt;
      exception
        when object_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')52]: ' || SQLERRM); -- RAISE;
    end;

    begin
      stmt := 'drop package mdsys.sdo_sem_magic'; execute immediate stmt;
      exception
        when object_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')53]: ' || SQLERRM); -- RAISE;
    end;

    begin
      stmt := 'drop type mdsys.sem_vars_table force'; execute immediate stmt;
      exception
        when object_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')54]: ' || SQLERRM); -- RAISE;
    end;

    begin
      stmt := 'drop type mdsys.sem_pred_array force'; execute immediate stmt;
      exception
        when object_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')55]: ' || SQLERRM); -- RAISE;
    end;

    begin
      stmt := 'drop type mdsys.sem_predicate force'; execute immediate stmt;
      exception
        when object_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')56]: ' || SQLERRM); -- RAISE;
    end;

    begin
      stmt := 'drop type mdsys.sem_rule force'; execute immediate stmt;
      exception
        when object_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')57]: ' || SQLERRM); -- RAISE;
    end;

    begin
      stmt := 'drop type mdsys.sem_node force'; execute immediate stmt;
      exception
        when object_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')58]: ' || SQLERRM); -- RAISE;
    end;

    begin
      stmt := 'drop type mdsys.sem_nodes_array force'; execute immediate stmt;
      exception
        when object_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')59]: ' || SQLERRM); -- RAISE;
    end;

    begin
      stmt := 'drop type mdsys.sem_rule_node force'; execute immediate stmt;
      exception
        when object_not_found then NULL;
        when compilation_error then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')60]: ' || SQLERRM); -- RAISE;
    end;

    begin
      stmt := 'drop type mdsys.sem_goal_node force'; execute immediate stmt;
      exception
        when object_not_found then NULL;
        when compilation_error then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                           'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')61]: ' || SQLERRM); -- RAISE;
    end;

    begin
      stmt := 'drop type mdsys.sem_rules_table force'; execute immediate stmt;
      exception
        when object_not_found then NULL;
        when compilation_error then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                           'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')62]: ' || SQLERRM); -- RAISE;
    end;

    begin
      stmt := 'drop type mdsys.sem_graph force'; execute immediate stmt;
      exception
        when object_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')63]: ' || SQLERRM); -- RAISE;
    end;

    begin
      stmt := 'drop type mdsys.sem_terms_table'; execute immediate stmt;
      exception
        when object_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')64]: ' || SQLERRM); -- RAISE;
    end;

    begin
      stmt := 'drop type mdsys.sem_term'; execute immediate stmt;
      exception
        when object_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')65]: ' || SQLERRM); -- RAISE;
    end;

    begin
      stmt := 'drop type mdsys.sem_term'; execute immediate stmt;
      exception
        when object_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')66]: ' || SQLERRM); -- RAISE;
    end;

    begin
      stmt := 'drop trigger mdsys.sdo_sem_drop_trigger'; execute immediate stmt;
      exception
        when trigger_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')67]: ' || SQLERRM); -- RAISE;
    end;

    begin
      stmt := 'drop trigger mdsys.sdo_sem_alter_trigger'; execute immediate stmt;
      exception
        when trigger_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                           'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')68]: ' || SQLERRM); -- RAISE;
    end;

    begin
      stmt := 'drop public synonym SEM_APIS'; execute immediate stmt;
      exception
        when synonym_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')69]: ' || SQLERRM); -- RAISE;
    end;

    begin
      stmt := 'drop package mdsys.sdo_rdf'; execute immediate stmt;
      exception
        when object_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')70]: ' || SQLERRM); -- RAISE;
    end;

    begin
      stmt := 'drop package mdsys.rdf_apis_user'; execute immediate stmt;
      exception
        when object_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')71]: ' || SQLERRM); -- RAISE;
    end;

    begin
      stmt := 'drop package mdsys.rdf_apis'; execute immediate stmt;
      exception
        when object_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')72]: ' || SQLERRM); -- RAISE;
    end;

    begin
      stmt := 'drop package mdsys.sdo_rdf_inference'; execute immediate stmt;
      exception
        when object_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')73]: ' || SQLERRM); -- RAISE;
    end;

    begin
      stmt := 'drop package mdsys.rdf_apis_internal'; execute immediate stmt;
      exception
        when object_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')74]: ' || SQLERRM); -- RAISE;
    end;

    begin
      stmt := 'drop package mdsys.sdo_rdf_internal'; execute immediate stmt;
      exception
        when object_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')75]: ' || SQLERRM); -- RAISE;
    end;

    begin
      stmt := 'drop package mdsys.sdo_sem_const'; execute immediate stmt;
      exception
        when object_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')76]: ' || SQLERRM); -- RAISE;
    end;

    begin
      stmt := 'drop package mdsys.sem_hash_internal'; execute immediate stmt;
      exception
        when object_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')77]: ' || SQLERRM); -- RAISE;
    end;

    begin
      stmt := 'drop public synonym SEM_VARCHARARRAY force'; execute immediate stmt;
      exception
        when synonym_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')78]: ' || SQLERRM); -- RAISE;
    end;

    begin
      stmt := 'drop type mdsys.RDF_VARCHARARRAY force'; execute immediate stmt;
      exception
        when object_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')79]: ' || SQLERRM); -- RAISE;
    end;

    begin
      stmt := 'drop public synonym SEM_LONGVARCHARARRAY force'; execute immediate stmt; 
      exception
        when synonym_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')80]: ' || SQLERRM); -- RAISE;
    end;

    begin
      stmt := 'drop type mdsys.RDF_LONGVARCHARARRAY force'; execute immediate stmt;
      exception
        when object_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')81]: ' || SQLERRM); -- RAISE;
    end;

    begin
      stmt := 'drop public synonym SEM_MATCH'; execute immediate stmt;
      exception
        when synonym_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')82]: ' || SQLERRM); -- RAISE;
    end;

    begin
      stmt := 'drop public synonym RDF_MATCH'; execute immediate stmt;
      exception
        when synonym_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                           'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')83]: ' || SQLERRM); -- RAISE;
    end;

    begin
      stmt := 'drop function mdsys.RDF_MATCH'; execute immediate stmt;
      exception
        when object_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')84]: ' || SQLERRM); -- RAISE;
    end;

    begin
      stmt := 'drop type mdsys.RDF_MATCH_IMPL_T force'; execute immediate stmt;
      exception
        when object_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')85]: ' || SQLERRM); -- RAISE;
    end;

    begin
      stmt := 'drop public synonym PG_MATCH'; execute immediate stmt;
      exception
        when synonym_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                           'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')86]: ' || SQLERRM); -- RAISE;
    end;

    begin
      stmt := 'drop public synonym SDO_PG_MATCH'; execute immediate stmt;
      exception
        when synonym_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                           'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')87]: ' || SQLERRM); -- RAISE;
    end;

    begin
      stmt := 'drop function mdsys.PG_MATCH'; execute immediate stmt;
      exception
        when object_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')88]: ' || SQLERRM); -- RAISE;
    end;

    begin
      stmt := 'drop type mdsys.PG_MATCH_IMPL_T'; execute immediate stmt;
      exception
        when object_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')89]: ' || SQLERRM); -- RAISE;
    end;
    
    begin
      stmt := 'drop public synonym SEM_MATCH_NL'; execute immediate stmt;
      exception
        when synonym_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')90]: ' || SQLERRM); -- RAISE;
    end;

    begin
      stmt := 'drop function mdsys.SEM_MATCH_NL'; execute immediate stmt;
      exception
        when object_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')91]: ' || SQLERRM); -- RAISE;
    end;

    begin
      stmt := 'drop type mdsys.SEM_MATCH_NL_IMPL_T'; execute immediate stmt;
      exception
        when object_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')92]: ' || SQLERRM); -- RAISE;
    end;

    begin
      stmt := 'drop context SDO_SEM_HTTP_CTX'; execute immediate stmt;
      exception
        when object_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')93]: ' || SQLERRM); -- RAISE;
    end;

    begin
      stmt := 'drop package mdsys.SDO_SEM_HTTP_CTX'; execute immediate stmt;
      exception
        when object_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')94]: ' || SQLERRM); -- RAISE;
    end;

    begin
      stmt := 'drop public synonym SPARQL_SERVICE'; execute immediate stmt;
      exception
        when synonym_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')95]: ' || SQLERRM); -- RAISE;
    end;

    begin
      stmt := 'drop function mdsys.SPARQL_SERVICE'; execute immediate stmt;
      exception
        when object_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')96]: ' || SQLERRM); -- RAISE;
    end;

    begin
      stmt := 'drop type mdsys.SPARQL_SERVICE_IMPL_T force'; execute immediate stmt;
      exception
        when object_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')97]: ' || SQLERRM); -- RAISE;
    end;
    
    begin
      stmt := 'drop public synonym SEM_ALIASES'; execute immediate stmt;
      exception
        when synonym_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')98]: ' || SQLERRM); -- RAISE;
    end;

    begin
      stmt := 'drop type mdsys.RDF_ALIASES force'; execute immediate stmt;
      exception
        when object_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')99]: ' || SQLERRM); -- RAISE;
    end;

    begin
      stmt := 'drop public synonym SEM_ALIAS'; execute immediate stmt;
      exception
        when synonym_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')100]: ' || SQLERRM); -- RAISE;
    end;

    begin
      stmt := 'drop type mdsys.RDF_ALIAS force'; execute immediate stmt;
      exception
        when object_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')101]: ' || SQLERRM); -- RAISE;
    end;

    begin
      stmt := 'drop type mdsys.SDO_RDF_TERM_LIST force'; execute immediate stmt;
      exception
        when object_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')102]: ' || SQLERRM); -- RAISE;
    end;

    begin
      stmt := 'drop public synonym SDO_RDF_TERM_LIST'; execute immediate stmt;
      exception
        when synonym_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')103]: ' || SQLERRM); -- RAISE;
    end;

    begin
      stmt := 'drop type mdsys.SDO_RDF_TERM force'; execute immediate stmt;
      exception
        when object_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')104]: ' || SQLERRM); -- RAISE;
    end;

    begin
      stmt := 'drop type mdsys.SDO_RDF_TRIPLE force'; execute immediate stmt;
      exception
        when object_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')105]: ' || SQLERRM); -- RAISE;
    end;

    begin
      stmt := 'drop type mdsys.SDO_RDF_TRIPLE_S force'; execute immediate stmt;
      exception
        when object_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')106]: ' || SQLERRM); -- RAISE;
    end;

    begin
      stmt := 'drop procedure mdsys.LOAD_PREDEFINED_RULEBASES'; execute immediate stmt;
      exception
        when object_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')107]: ' || SQLERRM); -- RAISE;
    end;

    begin
      stmt := 'drop context SDO_SEM_CTX'; execute immediate stmt;
      exception
        when object_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')108]: ' || SQLERRM); -- RAISE;
    end;

    begin
      stmt := 'drop package mdsys.SDO_SEM_CTX'; execute immediate stmt;
      exception
        when object_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')109]: ' || SQLERRM); -- RAISE;
    end;

    begin
      stmt := 'drop context SDO_SEM_CTX_SESSION'; execute immediate stmt;
      exception
        when object_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')110]: ' || SQLERRM); -- RAISE;
    end;

    begin
      stmt := 'drop package mdsys.SDO_SEM_CTX_SESSION'; execute immediate stmt;
      exception
        when object_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')111]: ' || SQLERRM); -- RAISE;
    end;
    
    begin
      stmt := 'drop context SDO_SEM_UPDATE_CTX'; execute immediate stmt;
      exception
        when object_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')112]: ' || SQLERRM); -- RAISE;
    end;

    begin
      stmt := 'drop package mdsys.SDO_SEM_UPDATE_CTX'; execute immediate stmt;
      exception
        when object_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')113]: ' || SQLERRM); -- RAISE;
    end;

    begin
      stmt := 'drop public synonym SEM_CLOBS'; execute immediate stmt;
      exception
        when synonym_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')114]: ' || SQLERRM); -- RAISE;
    end;

    begin
      stmt := 'drop public synonym SDO_RDF_CLOBS'; execute immediate stmt;
      exception
        when synonym_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')115]: ' || SQLERRM); -- RAISE;
    end;

    begin
      stmt := 'drop type mdsys.RDF_CLOBS force'; execute immediate stmt;
      exception
        when object_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')116]: ' || SQLERRM); -- RAISE;
    end;

    begin
      stmt := 'drop public synonym SEM_MODELS'; execute immediate stmt;
      exception
        when synonym_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')117]: ' || SQLERRM); -- RAISE;
    end;

    begin
      stmt := 'drop type mdsys.RDF_MODELS force'; execute immediate stmt;
      exception
        when object_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')118]: ' || SQLERRM); -- RAISE;
    end;

    begin
      stmt := 'drop public synonym SEM_GRAPHS'; execute immediate stmt;
      exception
        when synonym_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')119]: ' || SQLERRM); -- RAISE;
    end;

    begin
      stmt := 'drop type mdsys.RDF_GRAPHS force'; execute immediate stmt;
      exception
        when object_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')120]: ' || SQLERRM); -- RAISE;
    end;

    begin
      stmt := 'drop public synonym SDO_RDF_Entailments'; execute immediate stmt;
      exception
        when synonym_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')121]: ' || SQLERRM); -- RAISE;
    end;

    begin
      stmt := 'drop public synonym SEM_Entailments'; execute immediate stmt;
      exception
        when synonym_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')122]: ' || SQLERRM); -- RAISE;
    end;

    begin
      stmt := 'drop type mdsys.RDF_Entailments force'; execute immediate stmt;
      exception
        when object_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')123]: ' || SQLERRM); -- RAISE;
    end;

    begin
      stmt := 'drop public synonym SEM_RULEBASES'; execute immediate stmt;
      exception
        when synonym_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')124]: ' || SQLERRM); -- RAISE;
    end;

    begin
      stmt := 'drop type mdsys.RDF_RULEBASES force'; execute immediate stmt;
      exception
        when object_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')125]: ' || SQLERRM); -- RAISE;
    end;

    begin
      stmt := 'drop type sem_sameas_rec'; execute immediate stmt;
      exception
        when object_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')126]: ' || SQLERRM); -- RAISE;
    end;

    begin
      stmt := 'drop type sem_sameas_list'; execute immediate stmt;
      exception
        when object_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')127]: ' || SQLERRM); -- RAISE;
    end;

    begin
      stmt := 'drop public synonym SDO_RDF_RULEBASES'; execute immediate stmt;
      exception
        when synonym_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')128]: ' || SQLERRM); -- RAISE;
    end;

    begin
      stmt := 'drop public synonym SDO_RDF_MODELS'; execute immediate stmt;
      exception
        when synonym_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')129]: ' || SQLERRM); -- RAISE;
    end;

    begin
      stmt := 'drop public synonym SDO_RDF_GRAPHS'; execute immediate stmt;
      exception
        when synonym_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')130]: ' || SQLERRM); -- RAISE;
    end;

    begin
      stmt := 'drop public synonym SDO_RDF_ALIAS'; execute immediate stmt;
      exception
        when synonym_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')131]: ' || SQLERRM); -- RAISE;
    end;

    begin
      stmt := 'drop public synonym SDO_RDF_ALIASES'; execute immediate stmt;
      exception
        when synonym_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')132]: ' || SQLERRM); -- RAISE;
    end;

    begin
      stmt := 'drop public synonym SDO_RDF_INFERENCE'; execute immediate stmt;
      exception
        when synonym_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')133]: ' || SQLERRM); -- RAISE;
    end;

    begin
      stmt := 'drop public synonym SDO_RDF_MATCH'; execute immediate stmt;
      exception
        when synonym_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')134]: ' || SQLERRM); -- RAISE;
    end;

    begin
      stmt := 'drop public synonym SDO_RDF_INTERNAL'; execute immediate stmt;
      exception
        when synonym_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')135]: ' || SQLERRM); -- RAISE;
    end;

    begin
      stmt := 'drop public synonym SDO_RDF'; execute immediate stmt;
      exception
        when synonym_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')136]: ' || SQLERRM); -- RAISE;
    end;

    begin
      stmt := 'drop public synonym SDO_RDF_TERM force'; execute immediate stmt;
      exception
        when synonym_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')136]: ' || SQLERRM); -- RAISE;
    end;

    begin
      stmt := 'drop public synonym SDO_RDF_TERM'; execute immediate stmt;
      exception
        when synonym_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')137]: ' || SQLERRM); -- RAISE;
    end;

    begin
      stmt := 'drop public synonym SDO_RDF_TRIPLE'; execute immediate stmt;
      exception
        when synonym_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')138]: ' || SQLERRM); -- RAISE;
    end;

    begin
      stmt := 'drop public synonym SDO_RDF_TRIPLE_S'; execute immediate stmt;
      exception
        when synonym_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')139]: ' || SQLERRM); -- RAISE;
    end;

    begin
      stmt := 'drop public synonym SDO_SEM_INFERENCE'; execute immediate stmt;
      exception
        when synonym_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')140]: ' || SQLERRM); -- RAISE;
    end;

    begin
      stmt := 'drop public synonym SDO_SEM_VALIDATE'; execute immediate stmt;
      exception
        when synonym_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')141]: ' || SQLERRM); -- RAISE;
    end;

    begin
      stmt := 'drop public synonym SDO_SEM'; execute immediate stmt;
      exception
        when synonym_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')142]: ' || SQLERRM); -- RAISE;
    end;

    begin
      stmt := 'drop type MDSYS.SPARQL_Group_Concat force'; execute immediate stmt;
      exception
        when object_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')143]: ' || SQLERRM); -- RAISE;
    end;

    begin
      stmt := 'drop type MDSYS.SPARQL_Sample force'; execute immediate stmt;
      exception
        when object_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')144]: ' || SQLERRM); -- RAISE;
    end;

    begin
      stmt := 'drop type MDSYS.SPARQL_min force'; execute immediate stmt;
      exception
        when object_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')145]: ' || SQLERRM); -- RAISE;
    end;

    begin
      stmt := 'drop type MDSYS.SPARQL_max force'; execute immediate stmt;
      exception
        when object_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')146]: ' || SQLERRM); -- RAISE;
    end;

    begin
      stmt := 'drop type MDSYS.SPARQL_Group_Concat_VC force'; execute immediate stmt;
      exception
        when object_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')147]: ' || SQLERRM); -- RAISE;
    end;

    begin
      stmt := 'drop type MDSYS.SPARQL_Sample_VC force'; execute immediate stmt;
      exception
        when object_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')148]: ' || SQLERRM); -- RAISE;
    end;

    begin
      stmt := 'drop type MDSYS.SPARQL_min_VC force'; execute immediate stmt;
      exception
        when object_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')149]: ' || SQLERRM); -- RAISE;
    end;

    begin
      stmt := 'drop type MDSYS.SPARQL_max_VC force'; execute immediate stmt;
      exception
        when object_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')150]: ' || SQLERRM); -- RAISE;
    end;

    begin
      stmt := 'drop function mdsys.sparql_groupconcat'; execute immediate stmt;
      exception
        when object_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')151]: ' || SQLERRM); -- RAISE;
    end;

    begin
      stmt := 'drop function mdsys.sparql_sampleagg'; execute immediate stmt;
      exception
        when object_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')152]: ' || SQLERRM); -- RAISE;
    end;

    begin
      stmt := 'drop function mdsys.sparql_minagg'; execute immediate stmt;
      exception
        when object_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')153]: ' || SQLERRM); -- RAISE;
    end;

    begin
      stmt := 'drop function mdsys.sparql_maxagg'; execute immediate stmt;
      exception
        when object_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')154]: ' || SQLERRM); -- RAISE;
    end;

    begin
      stmt := 'drop function mdsys.sparql_groupconcat_vc'; execute immediate stmt;
      exception
        when object_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')155]: ' || SQLERRM); -- RAISE;
    end;

    begin
      stmt := 'drop function mdsys.sparql_sampleagg_vc'; execute immediate stmt;
      exception
        when object_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')156]: ' || SQLERRM); -- RAISE;
    end;

    begin
      stmt := 'drop function mdsys.sparql_minagg_vc'; execute immediate stmt;
      exception
        when object_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')157]: ' || SQLERRM); -- RAISE;
    end;

    begin
      stmt := 'drop function mdsys.sparql_maxagg_vc'; execute immediate stmt;
      exception
        when object_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')158]: ' || SQLERRM); -- RAISE;
    end;

    begin
      stmt := 'drop public synonym SEM_APIS_GROUP_CONCAT'; execute immediate stmt;
      exception
        when synonym_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')159]: ' || SQLERRM); -- RAISE;
    end;

    begin
      stmt := 'drop public synonym SEM_APIS_SAMPLE'; execute immediate stmt;
      exception
        when synonym_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')160]: ' || SQLERRM); -- RAISE;
    end;

    begin
      stmt := 'drop public synonym SEM_APIS_MIN'; execute immediate stmt;
      exception
        when synonym_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')161]: ' || SQLERRM); -- RAISE;
    end;

    begin
      stmt := 'drop public synonym SEM_APIS_MAX'; execute immediate stmt;
      exception
        when synonym_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')162]: ' || SQLERRM); -- RAISE;
    end;

    begin
      stmt := 'drop public synonym SEM_APIS_GROUP_CONCAT_VC'; execute immediate stmt;
      exception
        when synonym_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')162]: ' || SQLERRM); -- RAISE;
    end;

    begin
      stmt := 'drop public synonym SEM_APIS_SAMPLE_VC'; execute immediate stmt;
      exception
        when synonym_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')163]: ' || SQLERRM); -- RAISE;
    end;

    begin
      stmt := 'drop public synonym SEM_APIS_MIN_VC'; execute immediate stmt;
      exception
        when synonym_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')164]: ' || SQLERRM); -- RAISE;
    end;

    begin
      stmt := 'drop public synonym SEM_APIS_MAX_VC'; execute immediate stmt;
      exception
        when synonym_not_found then NULL;
        when others then
          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
                                 'EXCEPTION[semremov.sql(' || $$PLSQL_LINE || ')165]: ' || SQLERRM); -- RAISE;
    end;

  -- else network exists ... so do nothing
  else
   :jscript := dbms_registry.nothing_script;
  end if;

end;
/

ALTER SESSION SET CURRENT_SCHEMA = SYS;

-- get rid of java packages
SELECT :jscript FROM SYS.DUAL;
@&comp_file4

Rem ********************************************************************
Rem #16473696: Indicate Oracle-Supplied object
@?/rdbms/admin/sqlsessend.sql
Rem ********************************************************************


OHA YOOOO