How to uninstall Oracle Context manually?

    In previous chapter, we have learned how to install it, now we will remove manually. Check the status of the options from dba_registry(9i or above) view.

SQL> col version format a14
SQL> col comp_name format a30
SQL> select COMP_NAME,VERSION,STATUS from dba_registry;

COMP_NAME                      VERSION        STATUS
------------------------------ -------------- -----------
Oracle9i Catalog Views        9.2.0.5.0      VALID
Oracle9i Packages and Types    9.2.0.5.0      VALID
Oracle Text                    9.2.0.5.0      VALID

    Drop all the context index in the database, here I will drop the index created in previous chapter.

SQL> select * from tab;

TNAME                          TABTYPE  CLUSTERID
------------------------------ ------- ----------
CR_CTXDEMO                    TABLE
DR$IDX_CR_CTXDEMO_COL2$I      TABLE
DR$IDX_CR_CTXDEMO_COL2$K      TABLE
DR$IDX_CR_CTXDEMO_COL2$N      TABLE
DR$IDX_CR_CTXDEMO_COL2$R      TABLE

SQL> DROP TABLE CR_CTXDEMO;

Table dropped.

SQL> select * from tab;

no rows selected

    Then we need to run two scripts, first run as ctxsys user ($ORACLE_HOME/ctx/admin/dr0drop.sql), second run as sys ($ORACLE_HOME/ctx/admin/dr0dsys.sql). Finally check the rows in dba_registry again.

SQL> col version format a14
SQL> col comp_name format a30
SQL> select COMP_NAME,VERSION,STATUS from dba_registry;

COMP_NAME                      VERSION        STATUS
------------------------------ -------------- -----------
Oracle9i Catalog Views        9.2.0.5.0      VALID
Oracle9i Packages and Types    9.2.0.5.0      VALID

    You could see that we have successfully remove it.

Post a comment

SCode:
Mail(*, but will not be displayed):
Home: