Cleanup Oracle Fusion Middleware 12c Repository manually

Posted by Dirk Nachbar on Thursday, February 20, 2020
Currently I was cleaning up some of my Oracle Fusion Middleware Forms & Reports test and demo environments manually and wanted to setup them freshly.

As I was lazy, I didn't used the RCU (Repository Creation Utility) for the cleanup, I just did a manual drop user and drop tablespace and cleaned up my $DOMAIN_HOME.

In my case it was a Forms & Reports environment with the Prefix FR12213, so I manually dropped all the Repository Users starting with FR12213 and the corresponding tablespaces.

#
sqlplus / as sysdba

SQL> drop user FR12213_OPSS cascade;
SQL> drop user FR12213_STB cascade;
SQL> drop user FR12213_MDS cascade;
SQL> drop user FR12213_IAU_APPEND cascade;
SQL> drop user FR12213_IAU_VIEWER cascade;
SQL> drop user FR12213_IAU cascade;
SQL> drop user FR12213_WLS_RUNTIME cascade;
SQL> drop user FR12213_WLS cascade;
SQL> drop user FR12213_UMS cascade;

SQL> drop tablespace FR12213_IAS_OPSS including content and datafiles;
SQL> drop tablespace FR12213_IAS_TEMP including content and datafiles;
SQL> drop tablespace FR12213_IAS_UMS including content and datafiles;
SQL> drop tablespace FR12213_IAU including content and datafiles;
SQL> drop tablespace FR12213_MDS including content and datafiles;
SQL> drop tablespace FR12213_STB including content and datafiles;
SQL> drop tablespace FR12213_WLS including content and datafiles;

After that I simply cleaned up the $DOMAIN_HOME and wanted to create the complete WebLogic Domain again including the run of the RCU, everything in silent mode.

While running the RCU following error came up:

#
Processing command line ....
Repository Creation Utility - Checking Prerequisites
Checking Global Prerequisites

ERROR - RCU-6016 Invalid prefix specified.
CAUSE - RCU-6016 The specified prefix already exists.
ACTION - RCU-6016 Specify another prefix.

ERROR - RCU-6091 Component validation failed.
CAUSE - RCU-6091 One or more component specific validation failed.
ACTION - RCU-6091 Check log for more details and fix the validation error.

After a bit of searching around and think, I came to the table SYSTEM.SCHEMA_VERSION_REGISTRY$

#
sqlplus / as sysdba
SQL> select distinct(MRC_NAME) from SYSTEM.SCHEMA_VERSION_REGISTRY$;

MRC_NAME
------------------------------
FR12213

SQL> delete from SYSTEM.SCHEMA_VERSION_REGISTRY$ where MRC_NAME = 'FR12213';
SQL> commit;

After deleting the corresponding rows in the SYSTEM.SCHEMA_VERSION_REGISTRY$ table, the silent execution of the RCU was running without any errors.
So don't forget to cleanup the SYSTEM.SCHEMA_VERSION_REGISTRY$ if you are performing a manual cleanup :-)

The above concept applies to any Oracle Fusion Middleware Component which is using Repository Users created by the RCU (SOA Suite, Forms & Reports and so on)