Plugging in Your FMW Repository
The new pluggable database feature of Oracle Database 12c is incredibly useful for quickly spinning up new FMW repositories. PDBs are now supported with FMW 12.1.3 (See Oracle Fusion Middleware 12c (12.1.3) Interoperability and Compatibility). This allows you to run the Repository Configuration Assistant once, install the schemas you need, and then clone the database to get as many instances of the repository as you need with minimal effort on your part. For example I recently was building a new image for some workshops. I decided I probably wanted several different domains for different labs. So I installed the schemas I needed in to a pluggable database using the RCU. I then created a clone of my Pluggable Database (PDB) which I then used in a domain. When I needed a new domain, I cloned the original PDB again and away I went.
How to Do It
- Create a Pluggable Database or use an existing one.
- Run the Repository Configuration Utility to create the schemas you need. For the rest of this blog we will assume the prefix used was DEV.
- Clone the database by executing the following command (documented here)
CREATE PLUGGABLE DATABASE soa3 from soa1;
- For convenience you may want to add the new instance to your TNS Names file. This simplifies step 6.
- Start the Database
STARTUP PLUGGABLE DATABASE soa3;
- Switch to PDB
- Updated COMPONENT_SCHEMA_INFO table to refer to new database instance.
UPDATE component_schema_info SET DB_SERVICE='SOA3.VBOX';
- If you want to auto-start the new PDB then from the CDB execute the command (only available from DB version 220.127.116.11)
ALTER PLUGGABLE DATABASE soa3 SAVE STATE;
The <PREFIX>_STB holds the credentials and connection details of all the schemas created in a given database with that prefix. These details include the service name as well as host and port details of the listener. Because each PDB has a unique name unless we change the service name we will still be pointing to the schemas in the original PDB, hence the need to update the DB_SERVICE column with the new PDB service name.
So why is this useful. A number of benefits spring to mind;
- Easy to create additional dev/test/uat environments, especially helpful if other components also need to create schemas as not all applications use the <prefix> to keep multiple instances in the same database separate.
- Easy to clone a production environment to allow testing in a copy of the production schemas without impacting the production environment.
- Provides excellent isolation between environments over above having different prefixes.
- Reduces time taken to run the RCU.
- A helpful adjunct to the copy/paste commands provided by FMW for software and domain configurations, making it possible to clone entire environments very quickly.
Hope you find my first post as a member of the SOA Suite Product Management Team helpful.