Thursday, July 7, 2016

Migrating User Modifiable Metadata Files in OIM 11g R2 PS3

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 Accessoimoim(VERSION). Right-click and navigate to System MBean Browser


  • Under Application Defined MBeans, navigate to oracle.mds.lcmServer:oim_server1Application:OIMMetadataMDSAppRuntime.
  • 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 Accessoimoim(VERSION). Right-click and navigate to System MBean Browser.

  • Under Application Defined MBeans, navigate to oracle.mds.lcmServer:oim_server1Application:OIMMetadataMDSAppRuntime.

  • 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 Deploymentsoracle.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:
  1. Setup the environment as a prerequisite:
    1. To perform MDS operations, log in to the Oracle Identity Manager server host with the account used to install and run WebLogic Application Server.
    2. 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:
      $ cd MIDDLEWARE_HOME/user_projects/domains/OIMDomain/bin
      $ .setDomainEnv.sh
      
    3. Create a temporary directory, such as /tmp/OIM/MDSData/, which will be used to store the resulting XML files from the database.
    4. Verify that the application server is up and running.
    5. Ensure that you know the WebLogic administrator username and the URL to the Admin Server.
  2. Perform the export, as follows:In the command shell or console window, go to the OIM_ORACLE_HOME/common/bin/ directory.
    1. Run the wlst.sh command, and then run the connect() command, as shown:
      $ ./wlst.sh
      CLASSPATH=/opt/oracle/Middleware/wlserver_10.3/server/ext/jdbc/oracle/11g/ojdbc6dms.jar:...
      ...
      Your environment has been set.
      ...
      Initializing WebLogic Scripting Tool (WLST) ...
       
      Welcome to WebLogic Server Administration Scripting Shell
       
      Type help() for help on available commands
      wls:/offline> connect()
      Please enter your username [weblogic] :
      Please enter your password [welcome1] :
      Please enter your server URL [t3://localhost:port] :
      Connecting to t3://localhost:port with userid weblogic ...
      Successfully connected to Admin Server 'AdminServer' that belongs to domain 'OIMDomain'.
       
      Warning: An insecure protocol was used to connect to the server. To ensure on-the-wire security, the SSL port or Admin port should be used instead.
      
    2. Provide the WebLogic administrator username and password and the URL to the Admin Server.
    3. Run the exportMetadata command providing at least the applicationserver, and toLocation arguments, as shown:
      Note:
      Be sure to pass the argument data in single quotes, such as:
      server='oim_server1'
      
      wls:/OIMDomain/serverConfig> exportMetadata(application='OIMMetadata', server='oim_server1', toLocation='/tmp/OIM/MDSData')
      
    4. A list of the files exported is displayed. At this point, you can run the disconnect() command followed by the exit() command, as shown:
      wls:/OIMDomain/serverConfig> disconnect()
      Disconnected from weblogic server: AdminServer
      wls:/offline> exit()
       
       
      Exiting WebLogic Scripting Tool.
       
      $
      
    5. 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

No comments:

Post a Comment

Other Posts