Skip Headers
Oracle® Application Server Metadata Repository Creation Assistant User's Guide
10g Release 2 (10.1.2) for UNIX
B14129-03
  Go To Documentation Library
Home
Go To Table Of Contents
Contents
Go To Index
Index

Previous
Previous
Next
Next
 

4 Deregistering and Removing OracleAS Metadata Repository

You can also use OracleAS Metadata Repository Creation Assistant to remove OracleAS Metadata Repository tablespaces and schemas from your database and deregister it from Oracle Internet Directory.

Contents:

Earlier Versions Are Not Compatible

You cannot use this version of OracleAS Metadata Repository Creation Assistant to remove or deregister OracleAS Metadata Repository that was loaded or registered by an earlier version of OracleAS Metadata Repository Creation Assistant. For example, you cannot use this version of OracleAS Metadata Repository Creation Assistant to remove or deregister an OracleAS Metadata Repository that was loaded and registered by OracleAS Metadata Repository Creation Assistant from 9.0.4.x. To remove or deregister OracleAS Metadata Repository from 9.0.4.x, use the same version of OracleAS Metadata Repository Creation Assistant that was used to load it.

Use the Wizard or the Script?

You can deregister and remove the OracleAS Metadata Repository using the wizard or the cleanMR script. Note that the script performs the removal operation only; it does not deregister the OracleAS Metadata Repository for you.

4.1 Oracle Internet Directory Objects Not Removed

If you are removing the OracleAS Metadata Repository from a Release 2 (9.2.0.6) database, OracleAS Metadata Repository Creation Assistant does not remove the Oracle Internet Directory schema (ODS) or tablespaces (OLTS_ATTRSTORE, OLTS_BATTRSTORE, OLTS_CT_STORE, OLTS_DEFAULT, OLTS_SVRMGSTORE) from the database.

If you reload the OracleAS Metadata Repository on the same database, OracleAS Metadata Repository Creation Assistant will succeed. It will reuse the Oracle Internet Directory objects.

4.2 If the Database Is an Oracle Internet Directory Database

If the database is an Oracle Internet Directory database, you cannot deregister it. OracleAS Metadata Repository Creation Assistant displays an error and does not continue with the deregistration.

An Oracle Internet Directory database is a database that is in use by Oracle Internet Directory. Examples of Oracle Internet Directory databases:

4.3 If Middle Tiers Are Using the OracleAS Metadata Repository

If the database is not an Oracle Internet Directory database, OracleAS Metadata Repository Creation Assistant then checks if there are any middle tiers using the OracleAS Metadata Repository database that you want to remove or deregister.

If it finds that middle tiers are using the OracleAS Metadata Repository, then it displays a warning. If you continue with the deregistration or removal, the middle tiers will no longer be functional.

4.4 Deregistering and Removing OracleAS Metadata Repository Using the Wizard

This section describes how to use the wizard to deregister and remove the OracleAS Metadata Repository.

If you just want to deregister the OracleAS Metadata Repository from Oracle Internet Directory, see Section 4.6, "Deregistering the OracleAS Metadata Repository".

If you just want to remove the OracleAS Metadata Repository, see Section 4.5, "Removing the OracleAS Metadata Repository".

To deregister and remove the OracleAS Metadata Repository, follow these steps:

  1. Stop all Oracle Application Server instances that are using the OracleAS Metadata Repository that you want to remove or deregister.

    Although you have shut down the Oracle Application Server instances, it is possible that the database still shows some OracleAS Metadata Repository schemas as being active. You can check this by running the following query against the database:

    prompt> sqlplus "sys/password as sysdba"
    SQL> select schemaname from v$session;
    
    

    password specifies the password for the SYS user.

    If you see any OracleAS Metadata Repository schemas in "schemaname", then those schemas are still active. The OracleAS Metadata Repository schemas are listed in Table 1-9.

    If you are sure the instances are shut down, restart the database to clear the session information.

    If you do not do this, OracleAS Metadata Repository Creation Assistant will detect that some sessions from Oracle Application Server instances are still active, and it will display a warning.

  2. Start up OracleAS Metadata Repository Creation Assistant. See Section 1.7, "Starting OracleAS Metadata Repository Creation Assistant" for details.

  3. Follow these screens:

    Table 4-1 Deregistering and Removing OracleAS Metadata Repository


    Screen Action

    1.

    Welcome

    Click Next.

    2.

    Specify Oracle Home

    Oracle Home: Enter the full path of the Oracle home directory for the database. Be sure you use the conventions of the computer that is running the database (for example, use the proper slashes).

    Log File Directory: Enter the full path of the directory where you want OracleAS Metadata Repository Creation Assistant to write its log files. This path is on the computer where you are running OracleAS Metadata Repository Creation Assistant.

    Note that once you click Next to move to the next screen, you cannot change the log file directory. If you click Back to return to this screen, the Log File Directory field becomes read-only. This is to prevent OracleAS Metadata Repository Creation Assistant from writing log files in different directories.

    Click Next.

    3.

    Select Operation

    Select Remove.

    Click Next.

    4.

    Select Remove Option

    Deregister and Remove: Select this option to remove the OracleAS Metadata Repository tablespaces and schemas from your database, and deregister it from Oracle Internet Directory.

    Click Next.

    5.

    Specify Database Connection Information

    Enter connect information for the existing database.

    SYS Password: Enter the password for the SYS user.

    Select either Single Node Instance or Real Application Clusters Database, depending on the type of your database, and complete the appropriate fields.

    Fields for Single Node Instance:

    • Hostname: Enter the name of the computer that is running the database. If your middle tier instances are located in a different domain, you need to append the domain name to the hostname.

    • Port: Enter the port number for the database.

    • Service Name: Enter the service name of the database. Note that the service name must include the database domain name.

      Example: orcl.mydomain.com

    Fields for Real Application Clusters Database:

    • Hostname and Port: Enter the names of all the computers running the Real Application Clusters database and the port numbers used by the listener. Use the format host:port, and separate each host:port with a comma character:

      hostname1:port1,hostname2:port2,hostname3:port3, ...
      
      

      If your middle tier instances are located in a different domain, you need to append the domain name to the hostname.

      Example 1 (same domain): myhost:1521,myhost2:1521

      Example 2 (different domain): myhost.mydomain.com:1521,myhost2.mydomain.com:1521

    • Service Name: Enter the service name of the database. The service name must include the database domain name. The service name must be the same for all instances in the cluster.

      Example: orcl.mydomain.com

    Click Next.

    6.

    Specify Oracle Internet Directory Connection

    Enter connect information for the Oracle Internet Directory from which you want to deregister the OracleAS Metadata Repository.

    Internet Directory Hostname: Enter the name of the computer that is running Oracle Internet Directory. If your middle tier instances are located in a different domain, you need to append the domain name to the hostname.

    Internet Directory Port: Enter the port number for Oracle Internet Directory.

    Use SSL to Connect to Oracle Internet Directory for Deregistration Purposes: Select this option if you want OracleAS Metadata Repository Creation Assistant to connect to Oracle Internet Directory using SSL when performing the deregistration.

    Click Next.

    7.

    Specify Login for Oracle Internet Directory

    Enter the Username and Password to log in to Oracle Internet Directory. The user must belong to the iAS Admins group. You can use the user's simple name (for example, jdoe) or the user's DN (for example, cn=orcladmin).

    If your Oracle Internet Directory contains more than one realm, you need to enter the realm that contains the specified user.

    Note: If you log in as the Oracle Internet Directory superuser (cn=orcladmin), the realm value is not used because the superuser does not belong to any realm. The realm value is used only if you log in using a simple name.

    Click Next.

    8.

    Specify Oracle Context

    Specify the location in Oracle Internet Directory from which you want to deregister the OracleAS Metadata Repository.

    Root Oracle Context (cn=OracleContext): Select this option to deregister OracleAS Metadata Repository from the root Oracle context.

    Custom Oracle Context: Select this option to deregister OracleAS Metadata Repository from a specific realm in Oracle Internet Directory. Enter the DN of the realm in the provided field.

    NOTE: Once you click Next on this screen, it is important that you do not cancel the operation. If you cancel the operation before it completes, you will not be able to register or deregister the database. If you do cancel it, you will have to perform some manual steps to clean up the database before you can proceed. See Section 4.10, "Cleaning up the Database If You Cancelled a Deregistration Operation".

    Click Next.

    9.

    Success

    Click OK to exit OracleAS Metadata Repository Creation Assistant.


4.5 Removing the OracleAS Metadata Repository

This section describes how to use the wizard to remove the OracleAS Metadata Repository.

If you just want to deregister the OracleAS Metadata Repository from Oracle Internet Directory, see Section 4.6, "Deregistering the OracleAS Metadata Repository".

If you want to deregister and remove the OracleAS Metadata Repository, see Section 4.4, "Deregistering and Removing OracleAS Metadata Repository Using the Wizard".

To remove the OracleAS Metadata Repository, follow these steps:

  1. Stop all Oracle Application Server instances that are using the OracleAS Metadata Repository that you want to remove.

    Although you have shut down the Oracle Application Server instances, it is possible that the database still shows some OracleAS Metadata Repository schemas as being active. You can check this by running the following query against the database:

    prompt> sqlplus "sys/password as sysdba"
    SQL> select schemaname from v$session;
    
    

    password specifies the password for the SYS user.

    If you see any OracleAS Metadata Repository schemas in "schemaname", then those schemas are still active. The OracleAS Metadata Repository schemas are listed in Table 1-9.

    If you are sure the instances are shut down, restart the database to clear the session information.

    If you do not do this, OracleAS Metadata Repository Creation Assistant will detect that some sessions from Oracle Application Server instances are still active, and it will display a warning.

  2. Start up OracleAS Metadata Repository Creation Assistant. See Section 1.7, "Starting OracleAS Metadata Repository Creation Assistant" for details.

  3. Follow these screens:

    Table 4-2 Removing OracleAS Metadata Repository


    Screen Action

    1.

    Welcome

    Click Next.

    2.

    Specify Oracle Home

    Oracle Home: Enter the full path of the Oracle home directory for the database. Be sure you use the conventions of the computer that is running the database (for example, use the proper slashes).

    Log File Directory: Enter the full path of the directory where you want OracleAS Metadata Repository Creation Assistant to write its log files. This path is on the computer where you are running OracleAS Metadata Repository Creation Assistant.

    Note that once you click Next to move to the next screen, you cannot change the log file directory. If you click Back to return to this screen, the Log File Directory field becomes read-only. This is to prevent OracleAS Metadata Repository Creation Assistant from writing log files in different directories.

    Click Next.

    3.

    Select Operation

    Select Remove.

    Click Next.

    4.

    Select Remove Option

    Remove: Select this option to remove the OracleAS Metadata Repository tablespaces and schemas from your database.

    Click Next.

    5.

    Specify Database Connection Information

    Enter connect information for the existing database.

    SYS Password: Enter the password for the SYS user.

    Select either Single Node Instance or Real Application Clusters Database, depending on the type of your database, and complete the appropriate fields.

    Fields for Single Node Instance:

    • Hostname: Enter the name of the computer that is running the database. If your middle tier instances are located in a different domain, you need to append the domain name to the hostname.

    • Port: Enter the port number for the database.

    • Service Name: Enter the service name of the database. Note that the service name must include the database domain name.

      Example: orcl.mydomain.com

    Fields for Real Application Clusters Database:

    • Hostname and Port: Enter the names of all the computers running the Real Application Clusters database and the port numbers used by the listener. Use the format host:port, and separate each host:port with a comma character:

      hostname1:port1,hostname2:port2,hostname3:port3, ...
      
      

      If your middle tier instances are located in a different domain, you need to append the domain name to the hostname.

      Example 1 (same domain): myhost:1521,myhost2:1521

      Example 2 (different domain): myhost.mydomain.com:1521,myhost2.mydomain.com:1521

    • Service Name: Enter the service name of the database. The service name must include the database domain name. The service name must be the same for all instances in the cluster.

      Example: orcl.mydomain.com

    Click Next.

    6.

    Success

    Click OK to exit OracleAS Metadata Repository Creation Assistant.


4.6 Deregistering the OracleAS Metadata Repository

This section how to use the wizard to deregister the OracleAS Metadata Repository from Oracle Internet Directory. The OracleAS Metadata Repository objects are not removed from the database.

If you just want to remove the OracleAS Metadata Repository, see Section 4.5, "Removing the OracleAS Metadata Repository".

If you want to deregister and remove the OracleAS Metadata Repository, see Section 4.4, "Deregistering and Removing OracleAS Metadata Repository Using the Wizard".

  1. Stop all Oracle Application Server instances that are using the OracleAS Metadata Repository that you want to deregister.

    Although you have shut down the Oracle Application Server instances, it is possible that the database still shows some OracleAS Metadata Repository schemas as being active. You can check this by running the following query against the database:

    prompt> sqlplus "sys/password as sysdba"
    SQL> select schemaname from v$session;
    
    

    password specifies the password for the SYS user.

    If you see any OracleAS Metadata Repository schemas in "schemaname", then those schemas are still active. The OracleAS Metadata Repository schemas are listed in Table 1-9.

    If you are sure the instances are shut down, restart the database to clear the session information.

    If you do not do this, OracleAS Metadata Repository Creation Assistant will detect that some sessions from Oracle Application Server instances are still active, and it will display a warning.

  2. Start up OracleAS Metadata Repository Creation Assistant. See Section 1.7, "Starting OracleAS Metadata Repository Creation Assistant" for details.

  3. Follow these screens:

    Table 4-3 Deregistering OracleAS Metadata Repository


    Screen Action

    1.

    Welcome

    Click Next.

    2.

    Specify Oracle Home

    Oracle Home: Enter the full path of the Oracle home directory for the database. Be sure you use the conventions of the computer that is running the database (for example, use the proper slashes).

    Log File Directory: Enter the full path of the directory where you want OracleAS Metadata Repository Creation Assistant to write its log files. This path is on the computer where you are running OracleAS Metadata Repository Creation Assistant.

    Note that once you click Next to move to the next screen, you cannot change the log file directory. If you click Back to return to this screen, the Log File Directory field becomes read-only. This is to prevent OracleAS Metadata Repository Creation Assistant from writing log files in different directories.

    Click Next.

    3.

    Select Operation

    Select Remove.

    Click Next.

    4.

    Select Remove Option

    Select Deregister.

    Click Next.

    5.

    Specify Database Connection Information

    Enter connect information for the existing database.

    DBA Username and Password: Enter the username and password to log in to the database. The user must have DBA privileges.

    Select either Single Node Instance or Real Application Clusters Database, depending on the type of your database, and complete the appropriate fields.

    Fields for Single Node Instance:

    • Hostname: Enter the name of the computer that is running the database. If your middle tier instances are located in a different domain, you need to append the domain name to the hostname.

    • Port: Enter the port number for the database.

    • Service Name: Enter the service name of the database. Note that the service name must include the database domain name.

      Example: orcl.mydomain.com

    Fields for Real Application Clusters Database:

    • Hostname and Port: Enter the names of all the computers running the Real Application Clusters database and the port numbers used by the listener. Use the format host:port, and separate each host:port with a comma character:

      hostname1:port1,hostname2:port2,hostname3:port3, ...
      
      

      If your middle tier instances are located in a different domain, you need to append the domain name to the hostname.

      Example 1 (same domain): myhost:1521,myhost2:1521

      Example 2 (different domain): myhost.mydomain.com:1521,myhost2.mydomain.com:1521

    • Service Name: Enter the service name of the database. The service name must include the database domain name. The service name must be the same for all instances in the cluster.

      Example: orcl.mydomain.com

    Click Next.

    6.

    Specify Oracle Internet Directory Connection

    Internet Directory Hostname: Enter the name of the computer that is running Oracle Internet Directory. If your middle tier instances are located in a different domain, you need to append the domain name to the hostname.

    Internet Directory Port: Enter the port number for Oracle Internet Directory.

    Use SSL to Connect to Oracle Internet Directory for Deregistration Purposes: Select this option if you want OracleAS Metadata Repository Creation Assistant to connect to Oracle Internet Directory using SSL when performing the deregistration.

    Click Next.

    7.

    Specify Login for Oracle Internet Directory

    Enter the Username and Password to log in to Oracle Internet Directory. The user must belong to the iAS Admins group. You can use the user's simple name (for example, jdoe) or the user's DN (for example, cn=orcladmin).

    If your Oracle Internet Directory contains more than one realm, you need to enter the realm that contains the specified user.

    Note: If you log in as the Oracle Internet Directory superuser (cn=orcladmin), the realm value is not used because the superuser does not belong to any realm. The realm value is used only if you log in using a simple name.

    Click Next.

    8.

    Specify Oracle Context

    Specify the location in Oracle Internet Directory from which you want to deregister the OracleAS Metadata Repository.

    Root Oracle Context (cn=OracleContext): Select this option to deregister OracleAS Metadata Repository from the root Oracle context.

    Custom Oracle Context: Select this option to deregister OracleAS Metadata Repository from a specific realm in Oracle Internet Directory. Enter the DN of the realm in the provided field.

    NOTE: Once you click Next on this screen, it is important that you do not cancel the operation. If you cancel the operation before it completes, you will not be able to register or deregister the database. If you do cancel it, you will have to perform some manual steps to clean up the database before you can proceed. See Section 4.10, "Cleaning up the Database If You Cancelled a Deregistration Operation".

    Click Next.

    9.

    Success

    Click OK to exit OracleAS Metadata Repository Creation Assistant.


Schemas Locked and Passwords Expired After Deregistration

If you are only deregistering the OracleAS Metadata Repository (without removing the OracleAS Metadata Repository objects), OracleAS Metadata Repository Creation Assistant locks the schemas and expires the schemas' passwords. This means that if you want to reuse the schemas, you have to:

For a list of schemas, see Table 1-9.

4.7 Removing OracleAS Metadata Repository Using the cleanMR Script


Note:

The script only removes the OracleAS Metadata Repository. It does not deregister the OracleAS Metadata Repository. If you want to deregister the OracleAS Metadata Repository, you have to use the wizard.

The cleanMR script is located in the ORACLE_HOME/repca/clean directory, where ORACLE_HOME specifies the directory where you installed OracleAS Metadata Repository Creation Assistant.

You must run cleanMR on the computer that is running the database.

If you are running cleanMR against a Real Application Clusters database, you just have to run it on one of the nodes.

Stop All Oracle Application Server Instances Before Running the Script

Before running the script, stop all Oracle Application Server instances that are using the OracleAS Metadata Repository that you want to remove.

Although you have shut down the Oracle Application Server instances, it is possible that the database still shows some OracleAS Metadata Repository schemas as being active. You can check this by running the following query against the database:

prompt> sqlplus "sys/password as sysdba"
SQL> select schemaname from v$session;

password specifies the password for the SYS user.

If you see any OracleAS Metadata Repository schemas in "schemaname", then those schemas are still active. The OracleAS Metadata Repository schemas are listed in Table 1-9.

If you are sure the instances are shut down, restart the database to clear the session information.

If you do not do this, you may get some errors that you are trying to drop a user that is currently connected to the database.

Syntax for cleanMR

prompt> cleanMR -HOST db_host -PORT db_port -SERVICE_NAME service_name
         [-DBUSER dbuser] -DBPASSWD password [-DBROLE dbrole]

Table 4-4 Parameters for cleanMR

Parameter Optional or Required Description

-HOST db_host

Required

Specifies the name of the computer running the database.

-PORT db_port

Required

Specifies the port number on which the database listener is listening.

-SERVICE_NAME service_name

Required

Specifies the service name of the database.

-DBUSER dbuser

Optional

Specifies the database user that the script will use to connect to the database. If not specified, the default user is "SYS".

-DBPASSWD password

Required

Specifies the password for DBUSER.

-DBROLE dbrole

Optional

Specifies the database user role. If not specified, the default role is "SYSDBA".


Example:

cleanMR -HOST myhost -PORT 1521 -SERVICE_NAME orcl -DBPASSWD topsecret

Notes

If You See ORA-2000, ORU-10027 Errors

If you see the following errors from the cleanMR script:

ORA-20000: ORU-10027: buffer overflow, limit of 2000 bytes
ORA-06512: at "SYS.DBMS_OUTPUT", line 35
ORA-06512: at "SYS.DBMS_OUTPUT", line 198
ORA-06512: at "SYS.DBMS_OUTPUT", line 139
ORA-06512: at line 201

you need to rerun the script to remove the remaining objects that were not removed the first time.

4.8 Harmless Errors in the Log File

If the database does not have an OracleAS Metadata Repository and you attempt to remove it, you may see the following error in the log file. You may ignore it.

ERROR - SQLFilterAction perform failed 
java.sql.SQLException: ORA-00942: table or view does not exist 
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134) 
...

4.9 Removing Oracle Internet Directory Objects

Be sure you want to remove Oracle Internet Directory objects before you run the repca_cleanOID.sql script. If your database contained Oracle Internet Directory objects before you loaded the OracleAS Metadata Repository, you might to double-check that you are not using these objects in an Oracle Internet Directory that you need.

The Oracle Internet Directory objects are:

You can run the script as follows (ORACLE_HOME specifies the directory where you installed OracleAS Metadata Repository Creation Assistant):

prompt> cd ORACLE_HOME/repca/clean
prompt> sqlplus "sys/password as sysdba"
SQL> @repca_cleanOID.sql

4.10 Cleaning up the Database If You Cancelled a Deregistration Operation

If you cancelled a deregistration operation before it completed, you will not be able to register or deregister the database. You have to perform these clean-up steps first:

  1. Remove the database registration entries from Oracle Internet Directory manually. See Section C.5, "Manual Steps: Cleaning Up a Failed Registration or Deregistering OracleAS Metadata Repository" for details.

  2. Edit the registration entry in the database by running the following statements in SQL*Plus.

    prompt> sqlplus "sys/password as sysdba"
    SQL> execute dbms_ias_version.set_component_loading (
        component_id=>'MRC',
        component_name=>'Oracle Application Server Metadata Repository Version',
        schema_name=>'SYS' );
    SQL> execute dbms_ias_version.set_component_valid( component_id=>'MRC' );