This post covers the user modifiable metadata XML files can be exported to MDS, imported from MDS, and deleted from MDS by using Oracle Enterprise Manager.
Exporting Metadata Files to MDS
Login into Oracle Enterprise Manager as web logic Administrator. http://ADMINSTRATION_SERVER/em
Make sure that the Administrative Server and at least one Oracle Identity Manager Managed Server are running.
Navigate to Identity and Access, oim, oim(VERSION). Right-click and navigate to System MBean Browser
Under Application Defined MBeans, navigate to oracle.mds.lcm, Server:oim_server1, Application:OIMMetadata, MDSAppRuntime.
Export metadata by using the operations. To do so:
Select and open the first exportMetadata operation in the list.
For toLocation, provide the path to a temporary directory, in which this file is to be exported. This file will be exported to the computer on which Oracle Identity Manager is running. Therefore, make sure that the directory path you specify exist on that computer.
For docs, click the pencil icon, click Add, and in the Element box, provide the full path of the file to be exported. By clicking Add, you can provide the path to multiple docs. Click OK at the bottom after adding the metadata docs to be exported.
Invoke the operation.
Importing Metadata Files from MDS
To import metadata XML files from MDS:
Login to Oracle Enterprise Manager as the admin user. Make sure that the Administrative Server and at least one Oracle Identity Manager Managed Server are running if the Domain is clustered.
Navigate to Identity and Access, oim, oim(VERSION). Right-click and navigate to System MBean Browser.
Under Application Defined MBeans, navigate to oracle.mds.lcm, Server:oim_server1, Application:OIMMetadata, MDSAppRuntime.
Import metadata by using the operations. To do so:
In the Operations tab, select the first importMetadata operation in the list.
For fromLocation, provide the directory path of the Oracle Identity Manager host from where documents are to be imported.
For docs, click the pencil icon, click Add, and in the Element box, provide the full path of the file to be imported. By clicking Add, you can provide the path to multiple docs. If no value is provided, then it imports everything under the fromLocation directory recursively.
Invoke the operation.
Deleting Metadata Files from MDS
To delete metadata XML files from MDS.
Navigate to MDSAppRuntime mbeans, as described in step 1 of Exporting Metadata Files to MDS.
Delete metadata by using the operations. To do so:
In the Operations tab, select the first deleteMetadata operation in the list.
For docs, click the pencil icon, click Add, and in the Element box, provide the full path of the file to be deleted. By clicking Add, you can provide the path to multiple docs to be deleted.
Invoke the operation.
Creating MDS Backup
You might need to create a backup of the MDS before performing customizations. To create a backup of the MDS by using Oracle Enterprise Manager:
Login to Oracle Enterprise Manager as the administrator.
Navigate to Application Deployments, oracle.iam.console.identity.self-service.ear(V2.0). Right-click and navigate to MDS configuration.
Under Export, select the Export metadata documents to an archive on the machine where this web browser is running option, and then click Export.
All the metadata is exported in a ZIP file.
Exporting All MDS Data using Scripts
Some configurations for Oracle Identity Manager are stored in an MDS repository rather than on a file system on the Oracle Identity Manager Server. Troubleshooting configuration issues can sometimes require exporting all MDS data in order to examine it and make corrections if required.
To export all of the Oracle Identity Manager metadata contained in the MDS repository:
Setup the environment as a prerequisite:
To perform MDS operations, log in to the Oracle Identity Manager server host with the account used to install and run WebLogic Application Server.
Set you environment variables for the Oracle Identity Manager domain by running the appropriate setDomainEnv script found in theMIDDLEWAR_HOME/user_projects/domains/DOMAIN_NAME/bin/ directory. The command is as shown:
Create a temporary directory, such as /tmp/OIM/MDSData/, which will be used to store the resulting XML files from the database.
Verify that the application server is up and running.
Ensure that you know the WebLogic administrator username and the URL to the Admin Server.
Perform the export, as follows:In the command shell or console window, go to the OIM_ORACLE_HOME/common/bin/ directory.
Run the wlst.sh command, and then run the connect() command, as shown:
Provide the WebLogic administrator username and password and the URL to the Admin Server.
Run the exportMetadata command providing at least the application, server, and toLocation arguments, as shown:
Note:
Be sure to pass the argument data in single quotes, such as:
A list of the files exported is displayed. At this point, you can run the disconnect() command followed by the exit() command, as shown:
Go to the /tmp/OIM/MDSData/ directory, and view the db/oim-config.xml file, or the db/form-metadata/FormMetaData.xml file, or any other exported MDS file