Oracle8i Application Developer's Guide - XML Release 3 (8.1.7) Part Number A86030-01 |
Library | Service | Contents | Index

Using XML Parser for Java, 19 of 22

## Uninstalling Parsers

### Removing XML Parser from the Database

#### Question

I am deinstalling a version of XML Parser and installing a newer version. How do I do that? I know that there is something like dropjava , but still there are other packages which are loaded into the schema. I want to clean out the earlier version and install the new version in a clean manner.

#### Answer

You'll need to write SQL to write SQLbased on the USER_OBJECTS table where:

    SELECT 'drop java class '''&#0124; &#0124;       dbms_java.longname(object_
    name)&#0124; &#0124;''';

from user_objects where

    OBJECT_TYPE = 'JAVA CLASS'and DBMS_JAVA.LONGNAME(OBJECT_NAME)     LIKE
    'oracle/xml/parser/%'

This will spew out a set of DROP JAVA CLASS command which you can capture in a file using SQL*Plus': SPOOL somefilenamecommand.

Then run that spool file as a SQL script and all the right classeswill be dropped.

| Copyright © 1996-2000, Oracle Corporation. All Rights Reserved. |
Library | Service | Contents | Index